Merge branch 'live_care_issue' into 'development'

Live care issue

See merge request Cloud_Solution/doctor_app_flutter!753
merge-requests/754/head
Mohammad Aljammal 5 years ago
commit db4501bd14

@ -86,7 +86,7 @@ class BaseAppClient {
int projectID = await sharedPref.getInt(PROJECT_ID); int projectID = await sharedPref.getInt(PROJECT_ID);
if (projectID == 2 || projectID == 3) if (projectID == 2 || projectID == 3)
body['PatientOutSA'] = true; body['PatientOutSA'] = true;
else if(body.containsKey('facilityId') && body['facilityId']==2 || body['facilityId']==3) else if((body.containsKey('facilityId') && body['facilityId']==2 || body['facilityId']==3)|| body['ProjectID']==2 || body['ProjectID']==3)
body['PatientOutSA'] = true; body['PatientOutSA'] = true;
else else
body['PatientOutSA'] = false; body['PatientOutSA'] = false;

@ -57,6 +57,7 @@ const Map<String, Map<String, String>> localizedValues = {
'operations': {'en': 'Operations', 'ar': 'عمليات'}, 'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'}, 'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
'searchMedicineDashboard': {'en': 'Search\nMedicines', 'ar': 'بحث\nعن الدواء'}, 'searchMedicineDashboard': {'en': 'Search\nMedicines', 'ar': 'بحث\nعن الدواء'},
'searchMedicine': {'en': 'Search Medicines', 'ar': 'بحث عن الدواء'},
'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'}, 'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'},
'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'}, 'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'},
'myReferral': {'en': 'My Referral', 'ar': 'إحالة'}, 'myReferral': {'en': 'My Referral', 'ar': 'إحالة'},

@ -16,7 +16,7 @@ class PatientSearchRequestModel {
int clinicID=0; int clinicID=0;
PatientSearchRequestModel( PatientSearchRequestModel(
{this.doctorID = 0, {this.doctorID ,
this.firstName = "0", this.firstName = "0",
this.middleName = "0", this.middleName = "0",
this.lastName = "0", this.lastName = "0",
@ -29,7 +29,7 @@ class PatientSearchRequestModel {
this.from = "0", this.from = "0",
this.to = "0", this.to = "0",
this.clinicID, this.clinicID,
this.nursingStationID = 0,this.projectID=0}); this.nursingStationID = 0,this.projectID});
PatientSearchRequestModel.fromJson(Map<String, dynamic> json) { PatientSearchRequestModel.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
@ -51,7 +51,7 @@ class PatientSearchRequestModel {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['DoctorID'] = 0; data['DoctorID'] = this.doctorID;
data['FirstName'] = this.firstName; data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName; data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName; data['LastName'] = this.lastName;
@ -63,7 +63,7 @@ class PatientSearchRequestModel {
data['SearchType'] = this.searchType; data['SearchType'] = this.searchType;
data['MobileNo'] = this.mobileNo; data['MobileNo'] = this.mobileNo;
data['IdentificationNo'] = this.identificationNo; data['IdentificationNo'] = this.identificationNo;
data['NursingStationID'] = this.nursingStationID; //data['NursingStationID'] = this.nursingStationID;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['ProjectID'] =this.projectID; data['ProjectID'] =this.projectID;
return data; return data;

@ -27,9 +27,9 @@ class VideoCallService extends BaseService{
this.patient = patientModel; this.patient = patientModel;
DoctorProfileModel doctorProfile = await getDoctorProfile(isGetProfile: true); DoctorProfileModel doctorProfile = await getDoctorProfile(isGetProfile: true);
await VideoChannel.openVideoCallScreen( await VideoChannel.openVideoCallScreen(
kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGIyZDljOTY3YjFiNWU1YzUzNzFmMjIyNjJmNmEzY2Y5NzZjOTdlYzpzZXNzaW9uX2lkPTFfTVg0ME56STBOemsxTkg1LU1UWXlNekEyTlRRMU9EVXhObjVrVFRoMFlVdFJXaXRYTWpadFZGZHFhSGxZVGpOdE1UVi1mZyZjcmVhdGVfdGltZT0xNjIzMDY1NDk1Jm5vbmNlPTAuMjM2Mjk0NTIwMTkyOTA4OTcmcm9sZT1wdWJsaXNoZXImZXhwaXJlX3RpbWU9MTYyNTY1NzQ5NCZpbml0aWFsX2xheW91dF9jbGFzc19saXN0PQ==", // startCallRes.openTokenID, kToken: startCallRes.openTokenID,
kSessionId:"1_MX40NzI0Nzk1NH5-MTYyMzA2NTQ1ODUxNn5kTTh0YUtRWitXMjZtVFdqaHlYTjNtMTV-fg", // startCallRes.openSessionID, kSessionId:startCallRes.openSessionID,
kApiKey: '47247954' ,//'46209962' kApiKey: '46209962' ,//'46209962'
vcId: patient.vcId, vcId: patient.vcId,
patientName: patient.fullName ?? (patient.firstName != null ? "${patient.firstName} ${patient.lastName}" : "-"), patientName: patient.fullName ?? (patient.firstName != null ? "${patient.firstName} ${patient.lastName}" : "-"),
tokenID: await sharedPref.getString(TOKEN), tokenID: await sharedPref.getString(TOKEN),

@ -11,11 +11,11 @@ class ScanQrService extends BaseService {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
if (isMyInpatient) { // if (isMyInpatient) {
requestModel.doctorID = doctorProfile.doctorID; // requestModel.doctorID = doctorProfile.doctorID;
} else { // } else {
requestModel.doctorID = 0; requestModel.doctorID = 0;
} //}
await baseAppClient.post( await baseAppClient.post(
GET_PATIENT_IN_PATIENT_LIST, GET_PATIENT_IN_PATIENT_LIST,

@ -77,9 +77,11 @@ class PatientSearchViewModel extends BaseViewModel {
sortOutPatient({bool isDes = false}){ sortOutPatient({bool isDes = false}){
if(isDes) if(isDes)
filterData.sort((PatiantInformtion a, PatiantInformtion b)=>b.appointmentDateWithDateTimeForm.compareTo(a.appointmentDateWithDateTimeForm)); filterData= filterData.reversed.toList();
// filterData.sort((PatiantInformtion a, PatiantInformtion b)=>b.appointmentDateWithDateTimeForm.compareTo(a.appointmentDateWithDateTimeForm));
else else
filterData.sort((PatiantInformtion a, PatiantInformtion b)=>AppDateUtils.convertStringToDate(a.appointmentDate).compareTo(AppDateUtils.convertStringToDate(b.appointmentDate))); filterData= filterData.reversed.toList();
// filterData.sort((PatiantInformtion a, PatiantInformtion b)=>a.appointmentDateWithDateTimeForm.compareTo(b.appointmentDateWithDateTimeForm));
setState(ViewState.Idle); setState(ViewState.Idle);
} }

@ -255,7 +255,7 @@ class AuthenticationViewModel extends BaseViewModel {
/// add  token to shared preferences in case of send activation code is success /// add  token to shared preferences in case of send activation code is success
setDataAfterSendActivationSuccess(SendActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) { setDataAfterSendActivationSuccess(SendActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) {
print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
DrAppToastMsg.showSuccesToast("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); // DrAppToastMsg.showSuccesToast("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
sharedPref.setString(VIDA_AUTH_TOKEN_ID, sharedPref.setString(VIDA_AUTH_TOKEN_ID,
sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID);
sharedPref.setString(VIDA_REFRESH_TOKEN_ID, sharedPref.setString(VIDA_REFRESH_TOKEN_ID,

@ -39,7 +39,7 @@ class _InsuranceApprovalScreenNewState
? (model) => model.getInsuranceInPatient(mrn: patient.patientId) ? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
: patient.appointmentNo != null : patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient, ? (model) => model.getInsuranceApproval(patient,
appointmentNo: patient?.appointmentNo, appointmentNo: int.parse(patient?.appointmentNo.toString()) ,
projectId: patient.projectId) projectId: patient.projectId)
: (model) => model.getInsuranceApproval(patient), : (model) => model.getInsuranceApproval(patient),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) =>

@ -46,6 +46,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
bool isCallFinished = false; bool isCallFinished = false;
bool isDischargedPatient = false; bool isDischargedPatient = false;
bool isSearchAndOut = false; bool isSearchAndOut = false;
bool isCallStarted = false;
String patientType; String patientType;
String arrivalType; String arrivalType;
String from; String from;
@ -228,16 +229,12 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
height: 30, height: 30,
), ),
onPressed: () async { onPressed: () async {
if ((isFromLiveCare && if ((isFromLiveCare && patient.appointmentNo != null ) || patient.patientStatusType == 43) {
patient.appointmentNo != null &&
patient.appointmentNo != 0) ||
patient.patientStatusType ==
43) {
PostEpisodeReqModel PostEpisodeReqModel
postEpisodeReqModel = postEpisodeReqModel =
PostEpisodeReqModel( PostEpisodeReqModel(
appointmentNo: appointmentNo:
patient.appointmentNo, int.parse(patient.appointmentNo.toString()),
patientMRN: patientMRN:
patient.patientMRN); patient.patientMRN);
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(
@ -283,10 +280,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
height: 30, height: 30,
), ),
onPressed: () { onPressed: () {
if ((isFromLiveCare && if ((isFromLiveCare && patient.appointmentNo != null && patient.appointmentNo != 0) ||
patient.appointmentNo !=
null &&
patient.appointmentNo != 0) ||
patient.patientStatusType == patient.patientStatusType ==
43) { 43) {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
@ -294,7 +288,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
arguments: { arguments: {
'patient': patient 'patient': patient
}); });
} }
}), }),
], ],
), ),
@ -331,18 +325,13 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
title: isCallFinished? title: isCallFinished?
TranslationBase.of(context).endCall: TranslationBase.of(context).endCall:
TranslationBase.of(context).initiateCall, TranslationBase.of(context).initiateCall,
disabled: model.state == ViewState.BusyLocal, disabled: isCallStarted || model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
// Navigator.push(context, MaterialPageRoute( // Navigator.push(context, MaterialPageRoute(
// builder: (BuildContext context) => // builder: (BuildContext context) =>
// EndCallScreen(patient:patient))); // EndCallScreen(patient:patient)));
// TODO MOSA remov it and uncomment the below code if(isCallFinished) {
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
});
/* if(isCallFinished) {
Navigator.push(context, MaterialPageRoute( Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) => EndCallScreen(patient:patient))); builder: (BuildContext context) => EndCallScreen(patient:patient)));
} else { } else {
@ -354,15 +343,23 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
Helpers.showErrorToast(model.error); Helpers.showErrorToast(model.error);
} else { } else {
await model.getDoctorProfile(); await model.getDoctorProfile();
patient.appointmentNo = model.startCallRes.appointmentNo; patient.appointmentNo = int.parse(model.startCallRes.appointmentNo.toString());
patient.episodeNo = 0; patient.episodeNo = 0;
setState(() {
isCallStarted = true;
});
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){ AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected); locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
}); });
} }
}*/ }
// AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
// locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
// });
}, },

@ -55,7 +55,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '', editedBy: '',
doctorID: '', doctorID: '',
appointmentNo: widget.patientInfo.appointmentNo); appointmentNo: int.parse(widget.patientInfo.appointmentNo));
await model.getPatientAssessment(getAssessmentReqModel); await model.getPatientAssessment(getAssessmentReqModel);
if (model.patientAssessmentList.isNotEmpty) { if (model.patientAssessmentList.isNotEmpty) {
if (model.listOfDiagnosisCondition.length == 0) { if (model.listOfDiagnosisCondition.length == 0) {

@ -67,7 +67,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
GetPhysicalExamReqModel( GetPhysicalExamReqModel(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo: widget.patientInfo.appointmentNo); appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()));
await model.getPatientPhysicalExam(getPhysicalExamReqModel); await model.getPatientPhysicalExam(getPhysicalExamReqModel);
if (model.patientPhysicalExamList.isNotEmpty) { if (model.patientPhysicalExamList.isNotEmpty) {

@ -78,7 +78,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
onModelReady: (model) async { onModelReady: (model) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel = GetGetProgressNoteReqModel getGetProgressNoteReqModel =
GetGetProgressNoteReqModel( GetGetProgressNoteReqModel(
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: int.parse(widget.patientInfo.appointmentNo),
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(), editedBy: '', doctorID: ''); episodeID: widget.patientInfo.episodeNo.toString(), editedBy: '', doctorID: '');
await model.getPatientProgressNote(getGetProgressNoteReqModel); await model.getPatientProgressNote(getGetProgressNoteReqModel);

@ -63,7 +63,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel( GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()),
doctorID: '', doctorID: '',
editedBy: ''); editedBy: '');
@ -152,7 +152,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()),
doctorID: '', doctorID: '',
editedBy: ''); editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP); await model.getPatientAllergy(generalGetReqForSOAP);
@ -201,7 +201,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
GetChiefComplaintReqModel getChiefComplaintReqModel = GetChiefComplaintReqModel getChiefComplaintReqModel =
GetChiefComplaintReqModel( GetChiefComplaintReqModel(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()),
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
episodeID: widget.patientInfo.episodeNo, episodeID: widget.patientInfo.episodeNo,
doctorID: ''); doctorID: '');

@ -592,9 +592,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: AppTextFieldCustom( child: AppTextFieldCustom(
hintText: TranslationBase.of(context).boxQuantity, hintText: TranslationBase.of(context).boxQuantity,
isTextFieldHasSuffix: false, isTextFieldHasSuffix: false,
dropDownText: box != null dropDownText: box != null?
? TranslationBase.of(context).boxQuantity +
": " +
model.boxQuintity.toString() model.boxQuintity.toString()
: null, : null,
enabled: false, enabled: false,

@ -186,7 +186,7 @@ class _PrescriptionCheckOutScreenState extends State<PrescriptionCheckOutScreen>
setState(() { setState(() {
SpeechToText.closeAlertDialog(context); SpeechToText.closeAlertDialog(context);
speech.stop(); speech.stop();
indicationController.text += reconizedWord + '\n'; instructionController.text += reconizedWord + '\n';
}); });
} else { } else {
print(result.finalResult); print(result.finalResult);

@ -82,7 +82,8 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
int patientID = 0; int patientID = 0;
if (listOfParams[1].length != 0) patientID = int.parse(listOfParams[1]); if (listOfParams[1].length != 0) patientID = int.parse(listOfParams[1]);
PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel( PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel(
patientID: patientID, patientID: patientID,clinicID: 0,
doctorID: 0,
projectID: int.parse(listOfParams[0]) projectID: int.parse(listOfParams[0])
); );
@ -93,6 +94,7 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
else else
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
"patient": model.inPatientList[0], "patient": model.inPatientList[0],
"isInpatient": true,
}); });
} else { } else {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);

Loading…
Cancel
Save