@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_advance_p
import ' package:diplomaticquarterapp/pages/InPatientServices/meal_plan.dart ' ;
import ' package:diplomaticquarterapp/pages/InPatientServices/medical_instructions.dart ' ;
import ' package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart ' ;
import ' package:diplomaticquarterapp/uitl/app_toast.dart ' ;
import ' package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.dart ' ;
import ' package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart ' ;
@ -238,8 +239,12 @@ class InPatientServicesHome extends StatelessWidget {
GifLoaderDialogUtils . showMyDialog ( context ) ;
service . getBirthNotification ( projectViewModel . user . patientID , context ) . then ( ( res ) {
GifLoaderDialogUtils . hideDialog ( context ) ;
print ( res [ ' birthNotification ' ] ) ;
Navigator . push ( context , FadePage ( page: BirthNotification ( ) ) ) ;
if ( res [ " MessageStatus " ] = = 1 ) {
print ( res [ ' birthNotification ' ] ) ;
Navigator . push ( context , FadePage ( page: BirthNotification ( ) ) ) ;
} else {
AppToast . showErrorToast ( message: res [ " endUserMessage " ] ) ;
}
} ) . catchError ( ( err ) {
print ( err ) ;
} ) ;
@ -249,13 +254,17 @@ class InPatientServicesHome extends StatelessWidget {
ClinicListService service = new ClinicListService ( ) ;
GifLoaderDialogUtils . showMyDialog ( context ) ;
service . getGeneralInstructions ( projectViewModel . inPatientProjectID , context ) . then ( ( res ) {
List < GetGeneralInstructions > getGeneralInstructionsList = [ ] ;
res [ ' generalInstructions ' ] . forEach ( ( v ) {
getGeneralInstructionsList . add ( new GetGeneralInstructions . fromJson ( v ) ) ;
} ) ;
GifLoaderDialogUtils . hideDialog ( context ) ;
print ( res [ ' generalInstructions ' ] ) ;
Navigator . push ( context , FadePage ( page: GeneralInstructions ( getGeneralInstructionsList: getGeneralInstructionsList ) ) ) ;
if ( res [ ' generalInstructions ' ] . length ! = 0 ) {
List < GetGeneralInstructions > getGeneralInstructionsList = [ ] ;
res [ ' generalInstructions ' ] . forEach ( ( v ) {
getGeneralInstructionsList . add ( new GetGeneralInstructions . fromJson ( v ) ) ;
} ) ;
GifLoaderDialogUtils . hideDialog ( context ) ;
print ( res [ ' generalInstructions ' ] ) ;
Navigator . push ( context , FadePage ( page: GeneralInstructions ( getGeneralInstructionsList: getGeneralInstructionsList ) ) ) ;
} else {
AppToast . showErrorToast ( message: TranslationBase . of ( context ) . noGeneralInstructions ) ;
}
} ) . catchError ( ( err ) {
print ( err ) ;
} ) ;
@ -265,13 +274,17 @@ class InPatientServicesHome extends StatelessWidget {
ClinicListService service = new ClinicListService ( ) ;
GifLoaderDialogUtils . showMyDialog ( context ) ;
service . getMedicalInstructions ( projectViewModel . inPatientProjectID , context ) . then ( ( res ) {
List < GetMedicalInstructions > getMedicalInstructionsList = [ ] ;
res [ ' MedicalInstruction ' ] . forEach ( ( v ) {
getMedicalInstructionsList . add ( new GetMedicalInstructions . fromJson ( v ) ) ;
} ) ;
GifLoaderDialogUtils . hideDialog ( context ) ;
print ( res [ ' MedicalInstruction ' ] ) ;
Navigator . push ( context , FadePage ( page: MedicalInstructionsPage ( getMedicalInstructionsList: getMedicalInstructionsList ) ) ) ;
if ( res [ ' MedicalInstruction ' ] . length ! = 0 ) {
List < GetMedicalInstructions > getMedicalInstructionsList = [ ] ;
res [ ' MedicalInstruction ' ] . forEach ( ( v ) {
getMedicalInstructionsList . add ( new GetMedicalInstructions . fromJson ( v ) ) ;
} ) ;
GifLoaderDialogUtils . hideDialog ( context ) ;
print ( res [ ' MedicalInstruction ' ] ) ;
Navigator . push ( context , FadePage ( page: MedicalInstructionsPage ( getMedicalInstructionsList: getMedicalInstructionsList ) ) ) ;
} else {
AppToast . showErrorToast ( message: TranslationBase . of ( context ) . noMedicalInstructions ) ;
}
} ) . catchError ( ( err ) {
print ( err ) ;
} ) ;