fix appointment in live care

merge-requests/715/head
Elham Rababah 5 years ago
parent 4b6263ca1a
commit fb6ef8fca1

@ -328,4 +328,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.10.1 COCOAPODS: 1.10.0.rc.1

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -17,9 +17,9 @@ class UcafService extends LookupService {
Future getPatientChiefComplaint(PatiantInformtion patient) async { Future getPatientChiefComplaint(PatiantInformtion patient) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN; body['PatientMRN'] = patient.patientMRN ;
body['AppointmentNo'] = patient.appointmentNo; body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo; body['EpisodeID'] = patient.episodeNo ;
body['DoctorID'] = ""; body['DoctorID'] = "";
await baseAppClient.post(GET_CHIEF_COMPLAINT, await baseAppClient.post(GET_CHIEF_COMPLAINT,

@ -4,12 +4,14 @@ class StartCallRes {
String openTokenID; String openTokenID;
bool isAuthenticated; bool isAuthenticated;
int messageStatus; int messageStatus;
String appointmentNo;
StartCallRes( StartCallRes(
{this.result, {this.result,
this.openSessionID, this.openSessionID,
this.openTokenID, this.openTokenID,
this.isAuthenticated, this.isAuthenticated,
this.appointmentNo,
this.messageStatus}); this.messageStatus});
StartCallRes.fromJson(Map<String, dynamic> json) { StartCallRes.fromJson(Map<String, dynamic> json) {
@ -18,6 +20,7 @@ class StartCallRes {
openTokenID = json['OpenTokenID']; openTokenID = json['OpenTokenID'];
isAuthenticated = json['IsAuthenticated']; isAuthenticated = json['IsAuthenticated'];
messageStatus = json['MessageStatus']; messageStatus = json['MessageStatus'];
appointmentNo = json['AppointmentNo'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -27,6 +30,7 @@ class StartCallRes {
data['OpenTokenID'] = this.openTokenID; data['OpenTokenID'] = this.openTokenID;
data['IsAuthenticated'] = this.isAuthenticated; data['IsAuthenticated'] = this.isAuthenticated;
data['MessageStatus'] = this.messageStatus; data['MessageStatus'] = this.messageStatus;
data['AppointmentNo'] = this.appointmentNo;
return data; return data;
} }
} }

@ -224,7 +224,11 @@ class PatiantInformtion {
isSigned: json['isSigned'], isSigned: json['isSigned'],
medicationOrders: json['medicationOrders'], medicationOrders: json['medicationOrders'],
nationality: json['nationality'] ?? json['NationalityNameN'], 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'], visitType: json['visitType'] ?? json['visitType'] ?? json['visitType'],
nationalityFlagURL: nationalityFlagURL:
json['NationalityFlagURL'] ?? json['NationalityFlagURL'], json['NationalityFlagURL'] ?? json['NationalityFlagURL'],

@ -428,10 +428,11 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: AppText( child: AppText(
model.patientVitalSignsHistory.length > 0 model.patientVitalSignsHistory.length == 0
? TranslationBase.of(context).vitalSignEmptyMsg ? TranslationBase.of(context).vitalSignEmptyMsg
: TranslationBase.of(context).chiefComplaintEmptyMsg, : TranslationBase.of(context).chiefComplaintEmptyMsg,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
textAlign: TextAlign.center,
color: HexColor("#B8382B"), color: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.5,
), ),

@ -27,6 +27,9 @@ class _LabsHomePageState extends State<LabsHomePage> {
String arrivalType; String arrivalType;
PatiantInformtion patient; PatiantInformtion patient;
bool isInpatient; bool isInpatient;
bool isFromLiveCare;
@override @override
void didChangeDependencies() { void didChangeDependencies() {
super.didChangeDependencies(); super.didChangeDependencies();
@ -35,6 +38,8 @@ class _LabsHomePageState extends State<LabsHomePage> {
patientType = routeArgs['patientType']; patientType = routeArgs['patientType'];
arrivalType = routeArgs['arrivalType']; arrivalType = routeArgs['arrivalType'];
isInpatient = routeArgs['isInpatient']; isInpatient = routeArgs['isInpatient'];
isFromLiveCare = routeArgs['isFromLiveCare'];
print(arrivalType); print(arrivalType);
} }
@ -105,8 +110,9 @@ class _LabsHomePageState extends State<LabsHomePage> {
], ],
), ),
), ),
if (patient.patientStatusType != null && if ((patient.patientStatusType != null &&
patient.patientStatusType == 43) patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder( AddNewOrder(
onTap: () { onTap: () {
Navigator.push( Navigator.push(

@ -290,11 +290,15 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
} else { } else {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.startCall( isReCall : false, vCID: patient.vcId); await model.startCall( isReCall : false, vCID: patient.vcId);
if(model.state == ViewState.ErrorLocal) { if(model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Helpers.showErrorToast(model.error); Helpers.showErrorToast(model.error);
} else { } else {
await model.getDoctorProfile(); await model.getDoctorProfile();
patient.appointmentNo = model.startCallRes.appointmentNo;
patient.episodeNo = 0;
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
await VideoChannel.openVideoCallScreen( await VideoChannel.openVideoCallScreen(
kToken: model.startCallRes.openTokenID, kToken: model.startCallRes.openTokenID,

@ -107,8 +107,8 @@ class ProfileGridForOther extends StatelessWidget {
PATIENT_UCAF_REQUEST, PATIENT_UCAF_REQUEST,
'patient/ucaf.png', 'patient/ucaf.png',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 || isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 ||
patient.appointmentNo == null ? true : false), patient.appointmentNo == null ),
if (isFromLiveCare || if (isFromLiveCare ||
(patient.appointmentNo != null && patient.appointmentNo != 0)) (patient.appointmentNo != null && patient.appointmentNo != 0))
PatientProfileCardModel( PatientProfileCardModel(
@ -121,8 +121,9 @@ class ProfileGridForOther extends StatelessWidget {
REFER_PATIENT_TO_DOCTOR, REFER_PATIENT_TO_DOCTOR,
'patient/refer_patient.png', 'patient/refer_patient.png',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 || isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 ||
patient.appointmentNo == null ? true : false), patient.appointmentNo == null ,
),
if (isFromLiveCare || if (isFromLiveCare ||
(patient.appointmentNo != null && patient.appointmentNo != 0)) (patient.appointmentNo != null && patient.appointmentNo != 0))
PatientProfileCardModel( PatientProfileCardModel(
@ -135,8 +136,9 @@ class ProfileGridForOther extends StatelessWidget {
PATIENT_ADMISSION_REQUEST, PATIENT_ADMISSION_REQUEST,
'patient/admission_req.png', 'patient/admission_req.png',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 || isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 ||
patient.appointmentNo == null ? true : false), patient.appointmentNo == null
),
]; ];
return Column( return Column(

Loading…
Cancel
Save