|
|
|
|
@ -46,37 +46,12 @@ class _ProgressNoteState extends State<OperationReportScreen> {
|
|
|
|
|
AuthenticationViewModel authenticationViewModel;
|
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
|
|
|
|
|
|
getProgressNoteList(BuildContext context, PatientViewModel model,
|
|
|
|
|
{bool isLocalBusy = false}) async {
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
PatiantInformtion patient = routeArgs['patient'];
|
|
|
|
|
String token = await sharedPref.getString(TOKEN);
|
|
|
|
|
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
|
|
|
|
|
|
|
|
|
|
print(type);
|
|
|
|
|
ProgressNoteRequest progressNoteRequest = ProgressNoteRequest(
|
|
|
|
|
visitType: widget.visitType,
|
|
|
|
|
// if equal 5 then this will return progress note
|
|
|
|
|
admissionNo: int.parse(patient.admissionNo),
|
|
|
|
|
projectID: patient.projectId,
|
|
|
|
|
tokenID: token,
|
|
|
|
|
patientTypeID: patient.patientType,
|
|
|
|
|
languageID: 2);
|
|
|
|
|
model
|
|
|
|
|
.getPatientProgressNote(progressNoteRequest.toJson(),
|
|
|
|
|
isLocalBusy: isLocalBusy)
|
|
|
|
|
.then((c) {
|
|
|
|
|
notesList = model.patientProgressNoteList;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
authenticationViewModel = Provider.of(context);
|
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
PatiantInformtion patient = routeArgs['patient'];
|
|
|
|
|
String arrivalType = routeArgs['arrivalType'];
|
|
|
|
|
if (routeArgs.containsKey('isDischargedPatient'))
|
|
|
|
|
isDischargedPatient = routeArgs['isDischargedPatient'];
|
|
|
|
|
return BaseView<OperationReportViewModel>(
|
|
|
|
|
@ -133,283 +108,9 @@ class _ProgressNoteState extends State<OperationReportScreen> {
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
if (model.operationReportList[index]
|
|
|
|
|
.status ==
|
|
|
|
|
1 &&
|
|
|
|
|
authenticationViewModel
|
|
|
|
|
.doctorProfile.doctorID !=
|
|
|
|
|
model
|
|
|
|
|
.operationReportList[
|
|
|
|
|
index]
|
|
|
|
|
.createdBy)
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.notePending,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Color(0xFFCC9B14),
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
),
|
|
|
|
|
if (model.operationReportList[index]
|
|
|
|
|
.status ==
|
|
|
|
|
4)
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.noteCanceled,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.red.shade700,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
),
|
|
|
|
|
if (model.operationReportList[index]
|
|
|
|
|
.status ==
|
|
|
|
|
2)
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.noteVerified,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.green[600],
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
),
|
|
|
|
|
if (model.operationReportList[index]
|
|
|
|
|
.status !=
|
|
|
|
|
2 &&
|
|
|
|
|
model.operationReportList[index]
|
|
|
|
|
.status !=
|
|
|
|
|
4 &&
|
|
|
|
|
authenticationViewModel
|
|
|
|
|
.doctorProfile.doctorID ==
|
|
|
|
|
model
|
|
|
|
|
.operationReportList[
|
|
|
|
|
index]
|
|
|
|
|
.createdBy)
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
// onTap: () {
|
|
|
|
|
// Navigator.push(
|
|
|
|
|
// context,
|
|
|
|
|
// MaterialPageRoute(
|
|
|
|
|
// builder: (context) =>
|
|
|
|
|
// UpdateNoteOrder(
|
|
|
|
|
// note: model
|
|
|
|
|
// .operationReportList[
|
|
|
|
|
// index],
|
|
|
|
|
// patientModel:
|
|
|
|
|
// model,
|
|
|
|
|
// patient:
|
|
|
|
|
// patient,
|
|
|
|
|
// visitType: widget
|
|
|
|
|
// .visitType,
|
|
|
|
|
// isUpdate: true,
|
|
|
|
|
// )),
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(
|
|
|
|
|
10),
|
|
|
|
|
),
|
|
|
|
|
// color:Colors.red[600],
|
|
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
DoctorApp.edit_1,
|
|
|
|
|
size: 12,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 2,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.update,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
padding: EdgeInsets.all(6),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
),
|
|
|
|
|
// InkWell(
|
|
|
|
|
// onTap: () async {
|
|
|
|
|
// showMyDialog(
|
|
|
|
|
// context: context,
|
|
|
|
|
// actionName: "verify",
|
|
|
|
|
// confirmFun: () async {
|
|
|
|
|
// GifLoaderDialogUtils
|
|
|
|
|
// .showMyDialog(
|
|
|
|
|
// context);
|
|
|
|
|
// UpdateNoteReqModel
|
|
|
|
|
// reqModel =
|
|
|
|
|
// UpdateNoteReqModel(
|
|
|
|
|
// admissionNo: int
|
|
|
|
|
// .parse(patient
|
|
|
|
|
// .admissionNo),
|
|
|
|
|
// cancelledNote:
|
|
|
|
|
// false,
|
|
|
|
|
// lineItemNo: model
|
|
|
|
|
// .patientProgressNoteList[
|
|
|
|
|
// index]
|
|
|
|
|
// .lineItemNo,
|
|
|
|
|
// createdBy: model
|
|
|
|
|
// .patientProgressNoteList[
|
|
|
|
|
// index]
|
|
|
|
|
// .createdBy,
|
|
|
|
|
// notes: model
|
|
|
|
|
// .patientProgressNoteList[
|
|
|
|
|
// index]
|
|
|
|
|
// .notes,
|
|
|
|
|
// verifiedNote: true,
|
|
|
|
|
// patientTypeID:
|
|
|
|
|
// patient
|
|
|
|
|
// .patientType,
|
|
|
|
|
// patientOutSA: false,
|
|
|
|
|
// );
|
|
|
|
|
// await model
|
|
|
|
|
// .updatePatientProgressNote(
|
|
|
|
|
// reqModel);
|
|
|
|
|
// await getProgressNoteList(
|
|
|
|
|
// context, model,
|
|
|
|
|
// isLocalBusy:
|
|
|
|
|
// true);
|
|
|
|
|
// GifLoaderDialogUtils
|
|
|
|
|
// .hideDialog(
|
|
|
|
|
// context);
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// child: Container(
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// color: Colors.green[600],
|
|
|
|
|
// borderRadius:
|
|
|
|
|
// BorderRadius.circular(
|
|
|
|
|
// 10),
|
|
|
|
|
// ),
|
|
|
|
|
// // color:Colors.red[600],
|
|
|
|
|
//
|
|
|
|
|
// child: Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// Icon(
|
|
|
|
|
// FontAwesomeIcons
|
|
|
|
|
// .check,
|
|
|
|
|
// size: 12,
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// width: 2,
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// TranslationBase.of(
|
|
|
|
|
// context)
|
|
|
|
|
// .noteVerify,
|
|
|
|
|
// fontSize: 10,
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// padding: EdgeInsets.all(6),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
),
|
|
|
|
|
// InkWell(
|
|
|
|
|
// onTap: () async {
|
|
|
|
|
// showMyDialog(
|
|
|
|
|
// context: context,
|
|
|
|
|
// actionName:
|
|
|
|
|
// TranslationBase.of(
|
|
|
|
|
// context)
|
|
|
|
|
// .cancel,
|
|
|
|
|
// confirmFun: () async {
|
|
|
|
|
// GifLoaderDialogUtils
|
|
|
|
|
// .showMyDialog(
|
|
|
|
|
// context,
|
|
|
|
|
// );
|
|
|
|
|
// UpdateNoteReqModel
|
|
|
|
|
// reqModel =
|
|
|
|
|
// UpdateNoteReqModel(
|
|
|
|
|
// admissionNo: int
|
|
|
|
|
// .parse(patient
|
|
|
|
|
// .admissionNo),
|
|
|
|
|
// cancelledNote: true,
|
|
|
|
|
// lineItemNo: model
|
|
|
|
|
// .patientProgressNoteList[
|
|
|
|
|
// index]
|
|
|
|
|
// .lineItemNo,
|
|
|
|
|
// createdBy: model
|
|
|
|
|
// .patientProgressNoteList[
|
|
|
|
|
// index]
|
|
|
|
|
// .createdBy,
|
|
|
|
|
// notes: model
|
|
|
|
|
// .patientProgressNoteList[
|
|
|
|
|
// index]
|
|
|
|
|
// .notes,
|
|
|
|
|
// verifiedNote: false,
|
|
|
|
|
// patientTypeID:
|
|
|
|
|
// patient
|
|
|
|
|
// .patientType,
|
|
|
|
|
// patientOutSA: false,
|
|
|
|
|
// );
|
|
|
|
|
// await model
|
|
|
|
|
// .updatePatientProgressNote(
|
|
|
|
|
// reqModel);
|
|
|
|
|
// await getProgressNoteList(
|
|
|
|
|
// context, model,
|
|
|
|
|
// isLocalBusy:
|
|
|
|
|
// true);
|
|
|
|
|
// GifLoaderDialogUtils
|
|
|
|
|
// .hideDialog(
|
|
|
|
|
// context);
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// child: Container(
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// color: Colors.red[600],
|
|
|
|
|
// borderRadius:
|
|
|
|
|
// BorderRadius.circular(
|
|
|
|
|
// 10),
|
|
|
|
|
// ),
|
|
|
|
|
// // color:Colors.red[600],
|
|
|
|
|
//
|
|
|
|
|
// child: Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// Icon(
|
|
|
|
|
// FontAwesomeIcons
|
|
|
|
|
// .trash,
|
|
|
|
|
// size: 12,
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// width: 2,
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// 'Cancel',
|
|
|
|
|
// fontSize: 10,
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// padding: EdgeInsets.all(6),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
@ -506,25 +207,153 @@ class _ProgressNoteState extends State<OperationReportScreen> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
model
|
|
|
|
|
.operationReportList[
|
|
|
|
|
index]
|
|
|
|
|
.remarks,
|
|
|
|
|
if (model.operationReportList[index]
|
|
|
|
|
.operationDate !=
|
|
|
|
|
null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
"Operation Date : ",
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
])
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
AppDateUtils.getDayMonthYearDateFormatted(
|
|
|
|
|
AppDateUtils
|
|
|
|
|
.getDateTimeFromServerFormat(model
|
|
|
|
|
.operationReportList[
|
|
|
|
|
index]
|
|
|
|
|
.operationDate),
|
|
|
|
|
isArabic:
|
|
|
|
|
projectViewModel
|
|
|
|
|
.isArabic,
|
|
|
|
|
isMonthShort: true),
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
|
|
if (model.operationReportList[index]
|
|
|
|
|
.timeStart !=
|
|
|
|
|
null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
"Operation Time Start : ",
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
model.operationReportList[index]
|
|
|
|
|
.timeStart,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
if (model.operationReportList[index]
|
|
|
|
|
.remarks !=
|
|
|
|
|
null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
"Remarks : ",
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
model
|
|
|
|
|
.operationReportList[
|
|
|
|
|
index]
|
|
|
|
|
.remarks ??
|
|
|
|
|
'',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
])
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// if (
|
|
|
|
|
// authenticationViewModel
|
|
|
|
|
// .doctorProfile.doctorID ==
|
|
|
|
|
// model
|
|
|
|
|
// .operationReportList[
|
|
|
|
|
// index]
|
|
|
|
|
// .createdBy)
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) =>
|
|
|
|
|
UpdateOperationReport(
|
|
|
|
|
operationReport: model
|
|
|
|
|
.operationReportList[
|
|
|
|
|
index],
|
|
|
|
|
operationReportViewModel:
|
|
|
|
|
model,
|
|
|
|
|
patient: patient,
|
|
|
|
|
isUpdate: true,
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.green[600],
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
// color:Colors.red[600],
|
|
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
DoctorApp.edit_1,
|
|
|
|
|
size: 12,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 2,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.update,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
padding: EdgeInsets.all(6),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|