|
|
|
@ -65,34 +65,24 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
IsLoginForDoctorApp: true,
|
|
|
|
IsLoginForDoctorApp: true,
|
|
|
|
PatientOutSA: false);
|
|
|
|
PatientOutSA: false);
|
|
|
|
|
|
|
|
|
|
|
|
if(patient.patientType ==1 || patient.admissionNo==null || patient.admissionNo =="0" ) {
|
|
|
|
if (patientType == "1" &&
|
|
|
|
patientViewModel.getPatientList(patientReq, "1", isBusyLocal: false).then((response) {
|
|
|
|
(patient.admissionNo == null ||
|
|
|
|
|
|
|
|
patient.admissionNo == "0")) {
|
|
|
|
|
|
|
|
patientViewModel
|
|
|
|
|
|
|
|
.getPatientList(patientReq, "1", isBusyLocal: false)
|
|
|
|
|
|
|
|
.then((response) {
|
|
|
|
if (response['MessageStatus'] == 1) {
|
|
|
|
if (response['MessageStatus'] == 1) {
|
|
|
|
|
|
|
|
|
|
|
|
if (response['List_MyInPatient'] != null) {
|
|
|
|
if (response['List_MyInPatient'] != null) {
|
|
|
|
|
|
|
|
List<PatiantInformtion> patientList = ModelResponse.fromJson(response['List_MyInPatient']).list;
|
|
|
|
List<PatiantInformtion> patientList =
|
|
|
|
|
|
|
|
ModelResponse.fromJson(response['List_MyInPatient'])
|
|
|
|
|
|
|
|
.list;
|
|
|
|
|
|
|
|
patient.admissionNo = patientList[0].admissionNo;
|
|
|
|
patient.admissionNo = patientList[0].admissionNo;
|
|
|
|
patient.admissionDate = patientList[0].admissionDate;
|
|
|
|
patient.admissionDate = patientList[0].admissionDate;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
DrAppToastMsg.showErrorToast('No patient');
|
|
|
|
DrAppToastMsg.showErrorToast('No patient');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}).catchError((error) {
|
|
|
|
}).catchError((error) {
|
|
|
|
// setState(() {
|
|
|
|
print(error);
|
|
|
|
// isLoading = false;
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
Helpers.showErrorToast(error.message);
|
|
|
|
|
|
|
|
//DrAppToastMsg.showErrorToast(error);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
builder: (_, patientViewModel, w) => AppScaffold(
|
|
|
|
builder: (_, patientViewModel, w) => AppScaffold(
|
|
|
|
@ -149,11 +139,9 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (int.parse(patientType) == 7 ||
|
|
|
|
if (patient.patientStatusType !=null && patient.patientStatusType == 43 )
|
|
|
|
int.parse(patientType) == 6)
|
|
|
|
|
|
|
|
BaseView<SOAPViewModel>(
|
|
|
|
BaseView<SOAPViewModel>(
|
|
|
|
onModelReady: (model) async {
|
|
|
|
onModelReady: (model) async {},
|
|
|
|
},
|
|
|
|
|
|
|
|
builder: (_, model, w) => Positioned(
|
|
|
|
builder: (_, model, w) => Positioned(
|
|
|
|
top: 175,
|
|
|
|
top: 175,
|
|
|
|
left: 20,
|
|
|
|
left: 20,
|
|
|
|
@ -181,19 +169,25 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onPressed: () async {
|
|
|
|
onPressed: () async {
|
|
|
|
if (patient.patientStatusType == 43) {
|
|
|
|
if (patient.patientStatusType == 43) {
|
|
|
|
PostEpisodeReqModel postEpisodeReqModel =
|
|
|
|
PostEpisodeReqModel
|
|
|
|
|
|
|
|
postEpisodeReqModel =
|
|
|
|
PostEpisodeReqModel(
|
|
|
|
PostEpisodeReqModel(
|
|
|
|
appointmentNo:
|
|
|
|
appointmentNo:
|
|
|
|
patient.appointmentNo,
|
|
|
|
patient.appointmentNo,
|
|
|
|
patientMRN: patient.patientMRN);
|
|
|
|
patientMRN:
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
patient.patientMRN);
|
|
|
|
await model
|
|
|
|
GifLoaderDialogUtils.showMyDialog(
|
|
|
|
.postEpisode(postEpisodeReqModel);
|
|
|
|
context);
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
await model.postEpisode(
|
|
|
|
|
|
|
|
postEpisodeReqModel);
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(
|
|
|
|
|
|
|
|
context);
|
|
|
|
patient.episodeNo = model.episodeID;
|
|
|
|
patient.episodeNo = model.episodeID;
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
CREATE_EPISODE,
|
|
|
|
CREATE_EPISODE,
|
|
|
|
arguments: {'patient': patient});
|
|
|
|
arguments: {
|
|
|
|
|
|
|
|
'patient': patient
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -216,10 +210,13 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
height: 30,
|
|
|
|
height: 30,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
if (patient.patientStatusType == 43) {
|
|
|
|
if (patient.patientStatusType ==
|
|
|
|
|
|
|
|
43) {
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
UPDATE_EPISODE,
|
|
|
|
UPDATE_EPISODE,
|
|
|
|
arguments: {'patient': patient});
|
|
|
|
arguments: {
|
|
|
|
|
|
|
|
'patient': patient
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -254,4 +251,3 @@ class AvatarWidget extends StatelessWidget {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|