diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 59cdf14c..1cf7499c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -328,4 +328,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 -COCOAPODS: 1.10.1 +COCOAPODS: 1.10.0.rc.1 diff --git a/lib/config/config.dart b/lib/config/config.dart index c8af8ad9..0283577e 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; diff --git a/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart b/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart index db2deb13..22f53226 100644 --- a/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart +++ b/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart @@ -17,9 +17,9 @@ class UcafService extends LookupService { Future getPatientChiefComplaint(PatiantInformtion patient) async { hasError = false; Map body = Map(); - body['PatientMRN'] = patient.patientMRN; + body['PatientMRN'] = patient.patientMRN ; body['AppointmentNo'] = patient.appointmentNo; - body['EpisodeID'] = patient.episodeNo; + body['EpisodeID'] = patient.episodeNo ; body['DoctorID'] = ""; await baseAppClient.post(GET_CHIEF_COMPLAINT, diff --git a/lib/models/livecare/start_call_res.dart b/lib/models/livecare/start_call_res.dart index 0566d76d..67259996 100644 --- a/lib/models/livecare/start_call_res.dart +++ b/lib/models/livecare/start_call_res.dart @@ -4,12 +4,14 @@ class StartCallRes { String openTokenID; bool isAuthenticated; int messageStatus; + String appointmentNo; StartCallRes( {this.result, this.openSessionID, this.openTokenID, this.isAuthenticated, + this.appointmentNo, this.messageStatus}); StartCallRes.fromJson(Map json) { @@ -18,6 +20,7 @@ class StartCallRes { openTokenID = json['OpenTokenID']; isAuthenticated = json['IsAuthenticated']; messageStatus = json['MessageStatus']; + appointmentNo = json['AppointmentNo']; } Map toJson() { @@ -27,6 +30,7 @@ class StartCallRes { data['OpenTokenID'] = this.openTokenID; data['IsAuthenticated'] = this.isAuthenticated; data['MessageStatus'] = this.messageStatus; + data['AppointmentNo'] = this.appointmentNo; return data; } } diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index 75552184..09282644 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -224,7 +224,11 @@ class PatiantInformtion { isSigned: json['isSigned'], medicationOrders: json['medicationOrders'], nationality: json['nationality'] ?? json['NationalityNameN'], - patientMRN: json['patientMRN'] ?? json['PatientMRN'], + patientMRN: json['patientMRN'] ?? json['PatientMRN']??json["PatientID"] != null + ? json["PatientID"] is String + ? int.parse(json["PatientID"]) + : json["PatientID"] + : json["patientID"], visitType: json['visitType'] ?? json['visitType'] ?? json['visitType'], nationalityFlagURL: json['NationalityFlagURL'] ?? json['NationalityFlagURL'], diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index 5e1b6155..5f7b91f3 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -428,10 +428,11 @@ class _UCAFInputScreenState extends State { Padding( padding: const EdgeInsets.all(8.0), child: AppText( - model.patientVitalSignsHistory.length > 0 + model.patientVitalSignsHistory.length == 0 ? TranslationBase.of(context).vitalSignEmptyMsg : TranslationBase.of(context).chiefComplaintEmptyMsg, fontWeight: FontWeight.normal, + textAlign: TextAlign.center, color: HexColor("#B8382B"), fontSize: SizeConfig.textMultiplier * 2.5, ), diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 578e9f17..d6f6fde2 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -27,6 +27,9 @@ class _LabsHomePageState extends State { String arrivalType; PatiantInformtion patient; bool isInpatient; + bool isFromLiveCare; + + @override void didChangeDependencies() { super.didChangeDependencies(); @@ -35,6 +38,8 @@ class _LabsHomePageState extends State { patientType = routeArgs['patientType']; arrivalType = routeArgs['arrivalType']; isInpatient = routeArgs['isInpatient']; + isFromLiveCare = routeArgs['isFromLiveCare']; + print(arrivalType); } @@ -105,8 +110,9 @@ class _LabsHomePageState extends State { ], ), ), - if (patient.patientStatusType != null && - patient.patientStatusType == 43) + if ((patient.patientStatusType != null && + patient.patientStatusType == 43) || + (isFromLiveCare && patient.appointmentNo != null)) AddNewOrder( onTap: () { Navigator.push( diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index ae5406d5..55b2d6f9 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -290,11 +290,15 @@ class _PatientProfileScreenState extends State } else { GifLoaderDialogUtils.showMyDialog(context); await model.startCall( isReCall : false, vCID: patient.vcId); + if(model.state == ViewState.ErrorLocal) { GifLoaderDialogUtils.hideDialog(context); Helpers.showErrorToast(model.error); } else { await model.getDoctorProfile(); + patient.appointmentNo = model.startCallRes.appointmentNo; + patient.episodeNo = 0; + GifLoaderDialogUtils.hideDialog(context); await VideoChannel.openVideoCallScreen( kToken: model.startCallRes.openTokenID, diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart index fee8b1e1..c01757c5 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart @@ -107,8 +107,8 @@ class ProfileGridForOther extends StatelessWidget { PATIENT_UCAF_REQUEST, 'patient/ucaf.png', isInPatient: isInpatient, - isDisable: patient.patientStatusType != 43 || - patient.appointmentNo == null ? true : false), + isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 || + patient.appointmentNo == null ), if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) PatientProfileCardModel( @@ -121,8 +121,9 @@ class ProfileGridForOther extends StatelessWidget { REFER_PATIENT_TO_DOCTOR, 'patient/refer_patient.png', isInPatient: isInpatient, - isDisable: patient.patientStatusType != 43 || - patient.appointmentNo == null ? true : false), + isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 || + patient.appointmentNo == null , + ), if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) PatientProfileCardModel( @@ -135,8 +136,9 @@ class ProfileGridForOther extends StatelessWidget { PATIENT_ADMISSION_REQUEST, 'patient/admission_req.png', isInPatient: isInpatient, - isDisable: patient.patientStatusType != 43 || - patient.appointmentNo == null ? true : false), + isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 || + patient.appointmentNo == null + ), ]; return Column(