fix appointment in live care

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

@ -328,4 +328,4 @@ SPEC CHECKSUMS:
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_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";

@ -17,9 +17,9 @@ class UcafService extends LookupService {
Future getPatientChiefComplaint(PatiantInformtion patient) async {
hasError = false;
Map<String, dynamic> 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,

@ -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<String, dynamic> json) {
@ -18,6 +20,7 @@ class StartCallRes {
openTokenID = json['OpenTokenID'];
isAuthenticated = json['IsAuthenticated'];
messageStatus = json['MessageStatus'];
appointmentNo = json['AppointmentNo'];
}
Map<String, dynamic> 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;
}
}

@ -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'],

@ -428,10 +428,11 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
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,
),

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

@ -290,11 +290,15 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
} 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,

@ -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(

Loading…
Cancel
Save