Medical instructions updates

Dev_3.3_InPatient_CR
haroon amjad 2 years ago
parent 41cd55e02b
commit e4492cbc1f

@ -309,7 +309,7 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getMedicalInstructions(projectViewModel.inPatientProjectID, context).then((res) { service.getMedicalInstructions(projectViewModel.inPatientProjectID, context).then((res) {
if (res['MedicalInstruction'].length != 0) { if (res['MedicalInstruction'] != null && res['MedicalInstruction'].length != 0) {
List<GetMedicalInstructions> getMedicalInstructionsList = []; List<GetMedicalInstructions> getMedicalInstructionsList = [];
res['MedicalInstruction'].forEach((v) { res['MedicalInstruction'].forEach((v) {
getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v)); getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v));
@ -318,6 +318,7 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
print(res['MedicalInstruction']); print(res['MedicalInstruction']);
Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList))); Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList)));
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: TranslationBase.of(context).noMedicalInstructions); AppToast.showErrorToast(message: TranslationBase.of(context).noMedicalInstructions);
} }
}).catchError((err) { }).catchError((err) {

Loading…
Cancel
Save