diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 2f4607e0..878a1850 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -322,4 +322,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
-COCOAPODS: 1.10.0.rc.1
+COCOAPODS: 1.10.1
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 171125d9..645c587b 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -27,7 +27,10 @@
NSFaceIDUsageDescription
We are using it for authentication
-
+ NSAppleMusicUsageDescription
+ ${PRODUCT_NAME} requires access to use voice command
+
+
UILaunchStoryboardName
LaunchScreen
UIMainStoryboardFile
diff --git a/lib/config/config.dart b/lib/config/config.dart
index e48bc953..2e8690a0 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -152,6 +152,9 @@ const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure';
const GET_PATIENT_ARRIVAL_LIST =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
+const Verify_Referral_Doctor_Remarks =
+ 'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks';
+
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT =
@@ -321,7 +324,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9';
-const VERSION_ID = 5.6;
+const VERSION_ID = 5.9;
const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true;
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index c173174b..12286b64 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -861,4 +861,5 @@ const Map> localizedValues = {
"replayBefore": {"en": "Replay Before", "ar": "رد قبل"},
"try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'},
"refClinic": {"en": "Ref Clinic", "ar": "Ref Clinic"},
+ "acknowledged": {"en": "Acknowledged", "ar": "إقرار"},
};
diff --git a/lib/core/model/insurance_approval_in_patient_model.dart b/lib/core/model/insurance_approval_in_patient_model.dart
index 798affc9..f185a8bf 100644
--- a/lib/core/model/insurance_approval_in_patient_model.dart
+++ b/lib/core/model/insurance_approval_in_patient_model.dart
@@ -30,6 +30,7 @@ class InsuranceApprovalInPatientModel {
String projectName;
int totaUnUsedCount;
int unUsedCount;
+ String doctorImage;
InsuranceApprovalInPatientModel(
{this.setupID,
@@ -62,10 +63,12 @@ class InsuranceApprovalInPatientModel {
this.doctorName,
this.projectName,
this.totaUnUsedCount,
- this.unUsedCount});
+ this.unUsedCount,
+ this.doctorImage});
InsuranceApprovalInPatientModel.fromJson(Map json) {
setupID = json['SetupID'];
+ doctorImage = json['DoctorImageURL'];
projectID = json['ProjectID'];
approvalNo = json['ApprovalNo'];
status = json['Status'];
@@ -106,6 +109,7 @@ class InsuranceApprovalInPatientModel {
Map toJson() {
final Map data = new Map();
data['SetupID'] = this.setupID;
+ data['DoctorImageURL'] = this.doctorImage;
data['ProjectID'] = this.projectID;
data['ApprovalNo'] = this.approvalNo;
data['Status'] = this.status;
diff --git a/lib/core/service/MyReferralPatientService.dart b/lib/core/service/MyReferralPatientService.dart
index 3401130a..ae1564fd 100644
--- a/lib/core/service/MyReferralPatientService.dart
+++ b/lib/core/service/MyReferralPatientService.dart
@@ -43,10 +43,9 @@ class MyReferralInPatientService extends BaseService {
}
Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async {
+ hasError = false;
await getDoctorProfile();
-
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();
-
_requestAddReferredDoctorRemarks.projectID = referral.projectID;
_requestAddReferredDoctorRemarks.admissionNo = referral.admissionNo.toString();
_requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo;
diff --git a/lib/core/service/labs_service.dart b/lib/core/service/labs_service.dart
index 24c83004..f38294b5 100644
--- a/lib/core/service/labs_service.dart
+++ b/lib/core/service/labs_service.dart
@@ -18,6 +18,8 @@ class LabsService extends BaseService {
Map body = Map();
String url = "";
if (isInpatient) {
+ await getDoctorProfile();
+ body['ProjectID'] = doctorProfile.projectID;
url = GET_PATIENT_LAB_OREDERS;
} else {
body['isDentalAllowedBackend'] = false;
diff --git a/lib/core/service/patient-doctor-referral-service.dart b/lib/core/service/patient-doctor-referral-service.dart
index 03d549aa..1d0041fa 100644
--- a/lib/core/service/patient-doctor-referral-service.dart
+++ b/lib/core/service/patient-doctor-referral-service.dart
@@ -305,4 +305,26 @@ class PatientReferralService extends LookupService {
body: body,
);
}
+
+
+ Future verifyReferralDoctorRemarks(MyReferredPatientModel referredPatient) async {
+ hasError = false;
+
+ Map body = Map();
+ body['ProjectID'] = referredPatient.projectID;
+ body['AdmissionNo'] = referredPatient.admissionNo;
+ body['LineItemNo'] = referredPatient.lineItemNo;
+
+ await baseAppClient.post(
+ Verify_Referral_Doctor_Remarks,
+ onSuccess: (dynamic response, int statusCode) {
+
+ },
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ },
+ body: body,
+ );
+ }
}
diff --git a/lib/core/service/radiology_service.dart b/lib/core/service/radiology_service.dart
index 68504d2c..7296d7b7 100644
--- a/lib/core/service/radiology_service.dart
+++ b/lib/core/service/radiology_service.dart
@@ -29,9 +29,13 @@ class RadiologyService extends BaseService {
Future getPatientRadOrders(PatiantInformtion patient , {isInPatient = false}) async {
String url = GET_PATIENT_ORDERS;
+ final Map body = new Map();
if(isInPatient) {
url = GET_IN_PATIENT_ORDERS;
+ body['ProjectID'] = patient.projectId;
}
+
+
hasError = false;
await baseAppClient.postPatient(url,
patient: patient,
@@ -47,7 +51,7 @@ class RadiologyService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: Map());
+ }, body:body);
}
diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart
index 72e0facc..2ecd1d1f 100644
--- a/lib/core/viewModel/patient-referral-viewmodel.dart
+++ b/lib/core/viewModel/patient-referral-viewmodel.dart
@@ -21,19 +21,23 @@ class PatientReferralViewModel extends BaseViewModel {
ReferralService _referralService = locator();
- MyReferralInPatientService _myReferralService = locator();
+ MyReferralInPatientService _myReferralService =
+ locator();
List get branchesList => _referralPatientService.projectsList;
List get clinicsList => _referralPatientService.clinicsList;
- List get referralFrequencyList => _referralPatientService.frequencyList;
+ List get referralFrequencyList =>
+ _referralPatientService.frequencyList;
List doctorsList = [];
- List get clinicDoctorsList => _referralPatientService.doctorsList;
+ List get clinicDoctorsList =>
+ _referralPatientService.doctorsList;
- List get myReferralPatients => _myReferralService.myReferralPatients;
+ List get myReferralPatients =>
+ _myReferralService.myReferralPatients;
List get listMyReferredPatientModel =>
_referralPatientService.listMyReferredPatientModel;
@@ -145,6 +149,7 @@ class PatientReferralViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
+
Future getMyReferralPatientService() async {
setState(ViewState.Busy);
await _myReferralService.getMyReferralPatientService();
@@ -154,6 +159,15 @@ class PatientReferralViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
+ Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async{
+ setState(ViewState.Busy);
+ await _myReferralService.replay(referredDoctorRemarks,referral);
+ if (_myReferralService.hasError) {
+ error = _myReferralService.error;
+ setState(ViewState.ErrorLocal);
+ } else
+ getMyReferralPatientService();
+ }
Future responseReferral(
PendingReferral pendingReferral, bool isAccepted) async {
@@ -197,7 +211,7 @@ class PatientReferralViewModel extends BaseViewModel {
admissionNo: patient.appointmentNo,
referralDoctor: doctorID,
patientTypeID: patient.patientType,
- referringDoctorRemarks:remarks,
+ referringDoctorRemarks: remarks,
priority: priority,
frequency: frequencyCode,
extension: ext,
@@ -224,6 +238,29 @@ class PatientReferralViewModel extends BaseViewModel {
}
}
+ Future getReferralFrequencyList() async {
+ setState(ViewState.Busy);
+ await _referralPatientService.getReferralFrequencyList();
+ if (_referralPatientService.hasError) {
+ error = _referralPatientService.error;
+ setState(ViewState.Error);
+ } else
+ setState(ViewState.Idle);
+ }
+
+ Future verifyReferralDoctorRemarks(
+ MyReferredPatientModel referredPatient) async {
+ setState(ViewState.Busy);
+ await _referralPatientService.verifyReferralDoctorRemarks(referredPatient);
+ if (_referralPatientService.hasError) {
+ error = _referralPatientService.error;
+ setState(ViewState.ErrorLocal);
+ } else {
+ getMyReferredPatient();
+ setState(ViewState.Idle);
+ }
+ }
+
String getReferralStatusNameByCode(int statusCode, BuildContext context) {
switch (statusCode) {
case 1:
@@ -241,13 +278,55 @@ class PatientReferralViewModel extends BaseViewModel {
}
}
- Future getReferralFrequencyList() async {
- setState(ViewState.Busy);
- await _referralPatientService.getReferralFrequencyList();
- if (_referralPatientService.hasError) {
- error = _referralPatientService.error;
- setState(ViewState.Error);
- } else
- setState(ViewState.Idle);
+ PatiantInformtion getPatientFromReferral(
+ MyReferredPatientModel referredPatient) {
+ PatiantInformtion patient = PatiantInformtion();
+ patient.doctorId = referredPatient.doctorID;
+ patient.doctorName = referredPatient.doctorName;
+ patient.patientId = referredPatient.patientID;
+ patient.firstName = referredPatient.firstName;
+ patient.middleName = referredPatient.middleName;
+ patient.lastName = referredPatient.lastName;
+ patient.gender = referredPatient.gender;
+ patient.dateofBirth = referredPatient.dateofBirth;
+ patient.mobileNumber = referredPatient.mobileNumber;
+ patient.emailAddress = referredPatient.emailAddress;
+ patient.patientIdentificationNo = referredPatient.patientIdentificationNo;
+ patient.patientType = referredPatient.patientType;
+ patient.admissionNo = referredPatient.admissionNo;
+ patient.admissionDate = referredPatient.admissionDate;
+ patient.roomId = referredPatient.roomID;
+ patient.bedId = referredPatient.bedID;
+ patient.nationalityName = referredPatient.nationalityName;
+ patient.nationalityFlagURL = referredPatient.nationalityFlagURL;
+ patient.age = referredPatient.age;
+ patient.clinicDescription = referredPatient.clinicDescription;
+ return patient;
+ }
+
+ PatiantInformtion getPatientFromReferralO(
+ MyReferralPatientModel referredPatient) {
+ PatiantInformtion patient = PatiantInformtion();
+ patient.doctorId = referredPatient.doctorID;
+ patient.doctorName = referredPatient.doctorName;
+ patient.patientId = referredPatient.patientID;
+ patient.firstName = referredPatient.firstName;
+ patient.middleName = referredPatient.middleName;
+ patient.lastName = referredPatient.lastName;
+ patient.gender = referredPatient.gender;
+ patient.dateofBirth = referredPatient.dateofBirth;
+ patient.mobileNumber = referredPatient.mobileNumber;
+ patient.emailAddress = referredPatient.emailAddress;
+ patient.patientIdentificationNo = referredPatient.patientIdentificationNo;
+ patient.patientType = referredPatient.patientType;
+ patient.admissionNo = referredPatient.admissionNo;
+ patient.admissionDate = referredPatient.admissionDate;
+ patient.roomId = referredPatient.roomID;
+ patient.bedId = referredPatient.bedID;
+ patient.nationalityName = referredPatient.nationalityName;
+ patient.nationalityFlagURL = referredPatient.nationalityFlagURL;
+ patient.age = referredPatient.age;
+ patient.clinicDescription = referredPatient.clinicDescription;
+ return patient;
}
}
diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart
index 46218594..aafd42de 100644
--- a/lib/screens/patients/insurance_approval_screen_patient.dart
+++ b/lib/screens/patients/insurance_approval_screen_patient.dart
@@ -109,8 +109,9 @@ class _InsuranceApprovalScreenNewState
},
child: DoctorCardInsurance(
patientOut: "In Patient",
- profileUrl:
- 'https://previews.123rf.com/images/ihorbiliavskyi/ihorbiliavskyi1812/ihorbiliavskyi181200077/114296311-doctor-avatar-icon-profession-logo-male-character-a-man-in-professional-clothes-people-specialists-f.jpg',
+ profileUrl: model
+ .insuranceApprovalInPatient[index]
+ .doctorImage,
clinic: model
.insuranceApprovalInPatient[index]
.clinicName,
diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart
index 1bd00cd6..ee2fd12d 100644
--- a/lib/screens/patients/insurance_approvals_details.dart
+++ b/lib/screens/patients/insurance_approvals_details.dart
@@ -164,7 +164,10 @@ class _InsuranceApprovalsDetailsState extends State {
BorderRadius.circular(
50),
child: Image.network(
- 'https://previews.123rf.com/images/ihorbiliavskyi/ihorbiliavskyi1812/ihorbiliavskyi181200077/114296311-doctor-avatar-icon-profession-logo-male-character-a-man-in-professional-clothes-people-specialists-f.jpg',
+ model
+ .insuranceApprovalInPatient[
+ indexInsurance]
+ .doctorImage,
fit: BoxFit.fill,
width: 700,
),
diff --git a/lib/screens/patients/profile/note/update_note.dart b/lib/screens/patients/profile/note/update_note.dart
index 27549010..e555e613 100644
--- a/lib/screens/patients/profile/note/update_note.dart
+++ b/lib/screens/patients/profile/note/update_note.dart
@@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
+import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
@@ -101,32 +102,41 @@ class _UpdateNoteOrderState extends State {
widthFactor: 0.9,
child: Column(
children: [
- AppTextFieldCustom(
- hintText: widget.visitType == 3
- ? (widget.isUpdate ? 'Update' : 'Add') +
- ' Order Sheet'
- : (widget.isUpdate ? 'Update' : 'Add') +
- ' Progress Note',
- //TranslationBase.of(context).addProgressNote,
- controller: progressNoteController,
- maxLines: 35,
- minLines: 25,
- hasBorder: true,
- suffixIcon: IconButton(
- icon: Icon(
- Icons.mic,
- color: Colors.black,
+ Stack(
+ children: [
+ AppTextFieldCustom(
+ hintText: widget.visitType == 3
+ ? (widget.isUpdate ? 'Update' : 'Add') +
+ ' Order Sheet'
+ : (widget.isUpdate ? 'Update' : 'Add') +
+ ' Progress Note',
+ //TranslationBase.of(context).addProgressNote,
+ controller: progressNoteController,
+ maxLines: 35,
+ minLines: 25,
+ hasBorder: true,
+
+ // isTextFieldHasSuffix: true,
+ validationError:
+ progressNoteController.text.isEmpty && isSubmitted
+ ? TranslationBase.of(context).emptyMessage
+ : null,
),
- onPressed: () {
- onVoiceText();
- },
- ),
- isTextFieldHasSuffix: true,
- validationError:
- progressNoteController.text.isEmpty && isSubmitted
- ? TranslationBase.of(context).emptyMessage
- : null,
+ Positioned(
+ top: 0,//MediaQuery.of(context).size.height * 0,
+ right: 15,
+ child: IconButton(
+ icon: Icon(
+ DoctorApp.speechtotext,
+ color: Colors.black,
+ ),
+ onPressed: () {
+ onVoiceText();
+ },
+ ),
+ )
+ ],
),
],
),
diff --git a/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart
new file mode 100644
index 00000000..fd5ec6bb
--- /dev/null
+++ b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart
@@ -0,0 +1,186 @@
+import 'package:doctor_app_flutter/config/config.dart';
+import 'package:doctor_app_flutter/config/size_config.dart';
+import 'package:doctor_app_flutter/core/enum/viewstate.dart';
+import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart';
+import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
+import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
+import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
+import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
+import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
+import 'package:doctor_app_flutter/util/helpers.dart';
+import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
+import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
+import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
+import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
+import 'package:doctor_app_flutter/widgets/shared/speech-text-popup.dart';
+import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
+import 'package:flutter/material.dart';
+import 'package:permission_handler/permission_handler.dart';
+import 'package:speech_to_text/speech_recognition_error.dart';
+import 'package:speech_to_text/speech_to_text.dart' as stt;
+
+
+class AddReplayOnReferralPatient extends StatefulWidget {
+ final PatientReferralViewModel patientReferralViewModel;
+ final MyReferralPatientModel myReferralInPatientModel;
+ //TODO Jammal
+ const AddReplayOnReferralPatient(
+ {Key key, this.patientReferralViewModel, this.myReferralInPatientModel})
+ : super(key: key);
+
+ @override
+ _AddReplayOnReferralPatientState createState() =>
+ _AddReplayOnReferralPatientState();
+}
+
+class _AddReplayOnReferralPatientState extends State {
+
+ bool isSubmitted = false;
+ stt.SpeechToText speech = stt.SpeechToText();
+ var reconizedWord;
+ var event = RobotProvider();
+ TextEditingController progressNoteController = TextEditingController();
+ @override
+ void initState() {
+ requestPermissions();
+ super.initState();
+ }
+
+
+ @override
+ Widget build(BuildContext context) {
+ return AppScaffold(
+ isShowAppBar: false,
+ backgroundColor: Theme.of(context).scaffoldBackgroundColor,
+ body: SingleChildScrollView(
+ child: Container(
+ height: MediaQuery.of(context).size.height * 1.0,
+ child: Padding(
+ padding: EdgeInsets.all(0.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ BottomSheetTitle(title: 'Replay'),
+ SizedBox(
+ height: 10.0,
+ ),
+ Center(
+ child: FractionallySizedBox(
+ widthFactor: 0.9,
+ child: Column(
+ children: [
+ Stack(
+ children: [
+ AppTextFieldCustom(
+ hintText: 'Replay your responses here',
+ controller: progressNoteController,
+ maxLines: 35,
+ minLines: 25,
+ hasBorder: true,
+ validationError:
+ progressNoteController.text.isEmpty &&
+ isSubmitted
+ ? TranslationBase.of(context).emptyMessage
+ : null,
+ ),
+ Positioned(
+ top: 0,//MediaQuery.of(context).size.height * 0,
+ right: 15,
+ child: IconButton(
+ icon: Icon(
+ DoctorApp.speechtotext,
+ color: Colors.black,
+ ),
+ onPressed: () {
+ onVoiceText();
+ },
+ ),
+ )
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ bottomSheet: Container(
+ margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
+ child: Wrap(
+ alignment: WrapAlignment.center,
+ children: [
+ AppButton(
+ title: 'Submit Replay',
+ color: Color(0xff359846),
+ fontWeight: FontWeight.w700,
+ onPressed: () async {
+ setState(() {
+ isSubmitted = true;
+ });
+ if (progressNoteController.text.isNotEmpty) {
+ GifLoaderDialogUtils.showMyDialog(context);
+ await widget.patientReferralViewModel.replay(progressNoteController.text.trim(), widget.myReferralInPatientModel);
+ if (widget.patientReferralViewModel.state == ViewState.ErrorLocal) {
+ Helpers.showErrorToast(widget.patientReferralViewModel.error);
+ } else {
+ GifLoaderDialogUtils.hideDialog(context);
+ DrAppToastMsg.showSuccesToast("Your Replay Added Successfully");
+ Navigator.of(context).pop();
+ Navigator.of(context).pop();
+ }
+ }else {
+ Helpers.showErrorToast("You can't add empty replay");
+ setState(() {
+ isSubmitted = false;
+ });
+ }
+ }),
+ ],
+ ),
+ ),
+ );
+ }
+
+ onVoiceText() async {
+ new SpeechToText(context: context).showAlertDialog(context);
+ var lang = TranslationBase.of(AppGlobal.CONTEX).locale.languageCode;
+ bool available = await speech.initialize(
+ onStatus: statusListener, onError: errorListener);
+ if (available) {
+ speech.listen(
+ onResult: resultListener,
+ // listenMode: ListenMode.confirmation,
+ localeId: lang == 'en' ? 'en-US' : 'ar-SA',
+ );
+ } else {
+ print("The user has denied the use of speech recognition.");
+ }
+ }
+
+ void errorListener(SpeechRecognitionError error) {}
+
+ void statusListener(String status) {
+ reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....';
+ }
+
+ void requestPermissions() async {
+ Map statuses = await [
+ Permission.microphone,
+ ].request();
+ }
+
+ void resultListener(result) {
+ reconizedWord = result.recognizedWords;
+ event.setValue({"searchText": reconizedWord});
+
+ if (result.finalResult == true) {
+ setState(() {
+ SpeechToText.closeAlertDialog(context);
+ progressNoteController.text = reconizedWord;
+ });
+ }
+ }
+}
diff --git a/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart b/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart
index ff12738e..7067a3ed 100644
--- a/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart
+++ b/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart
@@ -2,12 +2,14 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
+import 'package:doctor_app_flutter/screens/patients/profile/referral/referral_patient_detail_in-paint.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
+import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
@@ -56,8 +58,12 @@ class MyReferralInPatientScreen extends StatelessWidget {
model.myReferralPatients.length,
(index) => InkWell(
onTap: () {
- //TODO build the nwe page
-
+ Navigator.push(
+ context,
+ FadePage(
+ page: ReferralPatientDetailScreen(model.myReferralPatients[index],model),
+ ),
+ );
},
child: PatientReferralItemWidget(
referralStatus: model.getReferralStatusNameByCode(model.myReferralPatients[index].referralStatus,context),
diff --git a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart
new file mode 100644
index 00000000..90aba303
--- /dev/null
+++ b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart
@@ -0,0 +1,475 @@
+import 'package:doctor_app_flutter/config/size_config.dart';
+import 'package:doctor_app_flutter/core/enum/viewstate.dart';
+import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart';
+import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
+import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
+import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart';
+import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
+import 'package:doctor_app_flutter/screens/base/base_view.dart';
+import 'package:doctor_app_flutter/util/date-utils.dart';
+import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
+import 'package:doctor_app_flutter/util/helpers.dart';
+import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
+import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
+import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
+import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
+import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
+import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart';
+import 'package:flutter/material.dart';
+
+import '../../../../routes.dart';
+import 'AddReplayOnReferralPatient.dart';
+
+class ReferralPatientDetailScreen extends StatelessWidget {
+ final MyReferralPatientModel referredPatient;
+ final PatientReferralViewModel patientReferralViewModel;
+ ReferralPatientDetailScreen(this.referredPatient, this.patientReferralViewModel);
+
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ builder: (_, model, w) => AppScaffold(
+ baseViewModel: model,
+ isShowAppBar: false,
+ body: Container(
+ child: Column(
+ children: [
+ Container(
+ padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ ),
+ child: Container(
+ padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
+ margin: EdgeInsets.only(top: 50),
+ child: Column(
+ children: [
+ Container(
+ padding: EdgeInsets.only(left: 12.0),
+ child: Row(children: [
+ IconButton(
+ icon: Icon(Icons.arrow_back_ios),
+ color: Colors.black, //Colors.black,
+ onPressed: () => Navigator.pop(context),
+ ),
+ Expanded(
+ child: AppText(
+ (Helpers.capitalize(
+ "${referredPatient.firstName} ${referredPatient.lastName}")),
+ fontSize: SizeConfig.textMultiplier * 2.5,
+ fontWeight: FontWeight.bold,
+ fontFamily: 'Poppins',
+ ),
+ ),
+ referredPatient.gender == 1
+ ? Icon(
+ DoctorApp.male_2,
+ color: Colors.blue,
+ )
+ : Icon(
+ DoctorApp.female_1,
+ color: Colors.pink,
+ ),
+ InkWell(
+ onTap: () {
+ PatiantInformtion patient =
+ model.getPatientFromReferralO(referredPatient);
+ Navigator.of(context)
+ .pushNamed(PATIENTS_PROFILE, arguments: {
+ "patient": patient,
+ "patientType": "1",
+ "isInpatient": true,
+ "arrivalType": "1",
+ "from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
+ "to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
+ });
+ },
+ child: Icon(
+ Icons.account_circle,
+ size: 25,
+ ),
+ )
+ ]),
+ ),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: EdgeInsets.only(left: 12.0),
+ child: Container(
+ width: 60,
+ height: 60,
+ child: Image.network(
+ referredPatient.doctorImageURL
+ ),
+ ),
+ ),
+ SizedBox(
+ width: 10,
+ ),
+ Expanded(
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceBetween,
+ children: [
+ AppText(
+ "${model.getReferralStatusNameByCode(referredPatient.referralStatus, context)}",
+ fontFamily: 'Poppins',
+ fontSize: 1.9 * SizeConfig.textMultiplier,
+ fontWeight: FontWeight.w700,
+ color: referredPatient.referralStatus == 1
+ ? Color(0xffc4aa54)
+ : referredPatient.referralStatus == 46
+ ? Colors.green[700]
+ : Colors.red[700],
+ ),
+ AppText(
+ DateUtils.getDayMonthYearDateFormatted(referredPatient.referralDate,),
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 2.0 * SizeConfig.textMultiplier,
+ color: Color(0XFF28353E),
+ )
+ ],
+ ),
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceBetween,
+ children: [
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context)
+ .fileNumber,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize:
+ 1.7 * SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ ),
+ AppText(
+ "${referredPatient.patientID}",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize:
+ 1.8 * SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ ],
+ ),
+ AppText(
+ DateUtils.getTimeHHMMA(referredPatient.referralDate,),
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.8 * SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ )
+ ],
+ ),
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.start,
+ children: [
+ AppText(
+ "${TranslationBase.of(context).refClinic}: ",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.7 *
+ SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ ),
+ AppText(
+ referredPatient
+ .referringClinicDescription,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize: 1.8 *
+ SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ ],
+ ),
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.start,
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context)
+ .frequency +
+ ": ",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.7 *
+ SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ ),
+ Expanded(
+ child: AppText(
+ referredPatient
+ .frequencyDescription,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize: 1.8 *
+ SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ Row(
+ children: [
+ AppText(
+ referredPatient.nationalityName !=
+ null
+ ? referredPatient.nationalityName
+ : "",
+ fontWeight: FontWeight.bold,
+ color: Color(0xFF2E303A),
+ fontSize:
+ 1.4 * SizeConfig.textMultiplier,
+ ),
+ referredPatient.nationalityFlagURL !=
+ null
+ ? ClipRRect(
+ borderRadius:
+ BorderRadius.circular(20.0),
+ child: Image.network(
+ referredPatient
+ .nationalityFlagURL,
+ height: 25,
+ width: 30,
+ errorBuilder: (BuildContext
+ context,
+ Object exception,
+ StackTrace stackTrace) {
+ return Text('No Image');
+ },
+ ))
+ : SizedBox()
+ ],
+ )
+ ],
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context).priority +
+ ": ",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.7 * SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ ),
+ Expanded(
+ child: AppText(
+ referredPatient.priorityDescription,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize:
+ 1.8 * SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ ),
+ ],
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context)
+ .maxResponseTime +
+ ": ",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.7 * SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ ),
+ Expanded(
+ child: AppText(
+ DateUtils.convertDateFromServerFormat(
+ referredPatient.mAXResponseTime,
+ "dd MMM,yyyy"),
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize:
+ 1.8 * SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ ),
+ ],
+ ),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ margin:
+ EdgeInsets.only(left: 10, right: 0),
+ child: Image.asset(
+ 'assets/images/patient/ic_ref_arrow_left.png',
+ height: 50,
+ width: 30,
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.only(
+ left: 0,
+ top: 25,
+ right: 0,
+ bottom: 0),
+ padding: EdgeInsets.only(
+ left: 4.0, right: 4.0),
+ child: referredPatient.doctorImageURL !=
+ null
+ ? ClipRRect(
+ borderRadius:
+ BorderRadius.circular(20.0),
+ child: Image.network(
+ referredPatient.doctorImageURL,
+ height: 25,
+ width: 30,
+ errorBuilder:
+ (BuildContext context,
+ Object exception,
+ StackTrace stackTrace) {
+ return Text('No Image');
+ },
+ ))
+ : Container(
+ child: Image.asset(
+ referredPatient.gender == 1
+ ? 'assets/images/male_avatar.png'
+ : 'assets/images/female_avatar.png',
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 4,
+ child: Container(
+ margin: EdgeInsets.only(
+ left: 10,
+ top: 30,
+ right: 10,
+ bottom: 0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ AppText(
+ "Dr ${referredPatient.referringDoctorName}",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w800,
+ fontSize: 1.5 *
+ SizeConfig.textMultiplier,
+ color: Colors.black,
+ ),
+ AppText(
+ referredPatient
+ .referringClinicDescription,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize: 1.3 *
+ SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ child: SingleChildScrollView(
+ child: Container(
+ width: double.infinity,
+ margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
+ padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ shape: BoxShape.rectangle,
+ borderRadius: BorderRadius.all(Radius.circular(8)),
+ border: Border.fromBorderSide(BorderSide(
+ color: Colors.white,
+ width: 1.0,
+ )),
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context).remarks,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize: 2.4 * SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ AppText(
+ referredPatient.referringDoctorRemarks,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.8 * SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ SizedBox(
+ height: 8,
+ ),
+
+ ],
+ ),
+ ),
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
+ child: AppButton(
+ title: TranslationBase.of(context).replay,
+ color: Colors.red[700],
+ fontColor: Colors.white,
+ fontWeight: FontWeight.w700,
+ fontSize: 1.8,
+ hPadding: 8,
+ vPadding: 12,
+ onPressed: () async {
+ Navigator.push(
+ context,
+ SlideUpPageRoute(
+ widget: AddReplayOnReferralPatient(patientReferralViewModel: patientReferralViewModel,myReferralInPatientModel: referredPatient,),),);
+ },
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/screens/patients/profile/referral/referred-patient-screen.dart b/lib/screens/patients/profile/referral/referred-patient-screen.dart
index b859d965..ceb35929 100644
--- a/lib/screens/patients/profile/referral/referred-patient-screen.dart
+++ b/lib/screens/patients/profile/referral/referred-patient-screen.dart
@@ -1,11 +1,14 @@
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
+import 'package:doctor_app_flutter/screens/patients/profile/referral/referred_patient_detail_in-paint.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
+import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
+import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class ReferredPatientScreen extends StatelessWidget {
// previous design page is: MyReferredPatient
@@ -20,24 +23,25 @@ class ReferredPatientScreen extends StatelessWidget {
body: model.listMyReferredPatientModel == null ||
model.listMyReferredPatientModel.length == 0
? Center(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Container(
- height: 100,
- ),
- Image.asset('assets/images/no-data.png'),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: AppText(
- TranslationBase.of(context).referralEmptyMsg,
- color: Theme.of(context).errorColor,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Container(
+ height: 100,
+ ),
+ Image.asset('assets/images/no-data.png'),
+ Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: AppText(
+ TranslationBase.of(context).referralEmptyMsg,
+ color: Theme.of(context).errorColor,
+ ),
+ )
+ ],
),
)
- ],
- ),
- )
- : SingleChildScrollView(// DoctorApplication.svc/REST/GtMyReferredPatient
+ : SingleChildScrollView(
+ // DoctorApplication.svc/REST/GtMyReferredPatient
child: Container(
margin: EdgeInsets.only(top: 70),
child: Column(
@@ -51,30 +55,63 @@ class ReferredPatientScreen extends StatelessWidget {
// ),
...List.generate(
model.listMyReferredPatientModel.length,
- (index) =>
- PatientReferralItemWidget(
- referralStatus: "${model.getReferralStatusNameByCode(model.getReferredPatientItem(index).referralStatus, context)}",
- referralStatusCode: model.getReferredPatientItem(index).referralStatus,
- patientName: "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}",
- patientGender: model.getReferredPatientItem(index).gender,
- referredDate: DateUtils.convertDateFromServerFormat(model.getReferredPatientItem(index).referralDate, "dd/MM/yyyy"),
- referredTime: " ",
- patientID:
- "${model.getReferredPatientItem(index).patientID}",
- isSameBranch: model.getReferredPatientItem(index)
- .isReferralDoctorSameBranch,
- isReferral: false,
- remark:
- model.getReferredPatientItem(index).referringDoctorRemarks,
- nationality: model.getReferredPatientItem(index)
- .nationalityName,
- nationalityFlag:
- model.getReferredPatientItem(index).nationalityFlagURL,
- doctorAvatar:
- model.getReferredPatientItem(index).doctorImageURL,
- referralDoctorName: "Dr. ${model.getReferredPatientItem(index).referralDoctorName}",
- clinicDescription: model.getReferredPatientItem(index).referralClinicDescription,
- ),
+ (index) => InkWell(
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(
+ page: ReferredPatientDetailScreen(
+ model.getReferredPatientItem(index)),
+ ),
+ );
+ },
+ child: PatientReferralItemWidget(
+ referralStatus:
+ "${model.getReferralStatusNameByCode(model.getReferredPatientItem(index).referralStatus, context)}",
+ referralStatusCode: model
+ .getReferredPatientItem(index)
+ .referralStatus,
+ patientName:
+ "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}",
+ patientGender:
+ model.getReferredPatientItem(index).gender,
+ referredDate: DateUtils.convertDateFromServerFormat(
+ model
+ .getReferredPatientItem(index)
+ .referralDate,
+ "dd/MM/yyyy"),
+ referredTime: DateUtils.convertDateFromServerFormat(
+ model
+ .getReferredPatientItem(index)
+ .referralDate,
+ "hh:mm a"),
+ patientID:
+ "${model.getReferredPatientItem(index).patientID}",
+ isSameBranch: model
+ .getReferredPatientItem(index)
+ .isReferralDoctorSameBranch,
+ isReferral: false,
+ remark: model
+ .getReferredPatientItem(index)
+ .referringDoctorRemarks,
+ nationality: model
+ .getReferredPatientItem(index)
+ .nationalityName,
+ nationalityFlag: model
+ .getReferredPatientItem(index)
+ .nationalityFlagURL,
+ doctorAvatar: model
+ .getReferredPatientItem(index)
+ .doctorImageURL,
+ referralDoctorName:
+ "Dr. ${model.getReferredPatientItem(index).referralDoctorName}",
+ clinicDescription: model
+ .getReferredPatientItem(index)
+ .referralClinicDescription,
+ infoIcon: Icon(FontAwesomeIcons.arrowRight,
+ size: 25, color: Colors.black),
+ ),
+ ),
),
],
),
diff --git a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart
new file mode 100644
index 00000000..de13d096
--- /dev/null
+++ b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart
@@ -0,0 +1,527 @@
+import 'package:doctor_app_flutter/config/size_config.dart';
+import 'package:doctor_app_flutter/core/enum/viewstate.dart';
+import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
+import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
+import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart';
+import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
+import 'package:doctor_app_flutter/screens/base/base_view.dart';
+import 'package:doctor_app_flutter/util/date-utils.dart';
+import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
+import 'package:doctor_app_flutter/util/helpers.dart';
+import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
+import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
+import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
+import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
+import 'package:flutter/material.dart';
+
+import '../../../../routes.dart';
+
+class ReferredPatientDetailScreen extends StatelessWidget {
+ final MyReferredPatientModel referredPatient;
+
+ ReferredPatientDetailScreen(this.referredPatient);
+
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ builder: (_, model, w) => AppScaffold(
+ baseViewModel: model,
+ isShowAppBar: false,
+ body: Container(
+ child: Column(
+ children: [
+ Container(
+ padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ ),
+ child: Container(
+ padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
+ margin: EdgeInsets.only(top: 50),
+ child: Column(
+ children: [
+ Container(
+ padding: EdgeInsets.only(left: 12.0),
+ child: Row(children: [
+ IconButton(
+ icon: Icon(Icons.arrow_back_ios),
+ color: Colors.black, //Colors.black,
+ onPressed: () => Navigator.pop(context),
+ ),
+ Expanded(
+ child: AppText(
+ (Helpers.capitalize(
+ "${referredPatient.firstName} ${referredPatient.lastName}")),
+ fontSize: SizeConfig.textMultiplier * 2.5,
+ fontWeight: FontWeight.bold,
+ fontFamily: 'Poppins',
+ ),
+ ),
+ referredPatient.gender == 1
+ ? Icon(
+ DoctorApp.male_2,
+ color: Colors.blue,
+ )
+ : Icon(
+ DoctorApp.female_1,
+ color: Colors.pink,
+ ),
+ InkWell(
+ onTap: () {
+ PatiantInformtion patient =
+ model.getPatientFromReferral(referredPatient);
+ Navigator.of(context)
+ .pushNamed(PATIENTS_PROFILE, arguments: {
+ "patient": patient,
+ "patientType": "1",
+ "isInpatient": true,
+ "arrivalType": "1",
+ "from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
+ "to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
+ });
+ },
+ child: Icon(
+ Icons.account_circle,
+ size: 25,
+ ),
+ )
+ ]),
+ ),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: EdgeInsets.only(left: 12.0),
+ child: Container(
+ width: 60,
+ height: 60,
+ child: Image.asset(
+ referredPatient.gender == 1
+ ? 'assets/images/male_avatar.png'
+ : 'assets/images/female_avatar.png',
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ SizedBox(
+ width: 10,
+ ),
+ Expanded(
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceBetween,
+ children: [
+ AppText(
+ "${model.getReferralStatusNameByCode(referredPatient.referralStatus, context)}",
+ fontFamily: 'Poppins',
+ fontSize: 1.9 * SizeConfig.textMultiplier,
+ fontWeight: FontWeight.w700,
+ color: referredPatient.referralStatus == 1
+ ? Color(0xffc4aa54)
+ : referredPatient.referralStatus == 46
+ ? Colors.green[700]
+ : Colors.red[700],
+ ),
+ AppText(
+ DateUtils.convertDateFromServerFormat(
+ referredPatient.referralDate,
+ "dd MMM,yyyy"),
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 2.0 * SizeConfig.textMultiplier,
+ color: Color(0XFF28353E),
+ )
+ ],
+ ),
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceBetween,
+ children: [
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context)
+ .fileNumber,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.7 * SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ ),
+ AppText(
+ "${referredPatient.patientID}",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize:14,
+ color: Color(0XFF2E303A),
+ ),
+ ],
+ ),
+ AppText(
+ DateUtils.convertDateFromServerFormat(
+ referredPatient.referralDate,
+ "hh:mm a"),
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.8 * SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ )
+ ],
+ ),
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.start,
+ children: [
+ AppText(
+ "${TranslationBase.of(context).refClinic}: ",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.7 *
+ SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ ),
+ Expanded(
+ child: AppText(
+ referredPatient
+ .referralClinicDescription,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize: 13,
+ color: Color(0XFF2E303A),
+ ),
+ ),
+ ],
+ ),
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.start,
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context)
+ .frequency +
+ ": ",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.7 *
+ SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ ),
+ Expanded(
+ child: AppText(
+ referredPatient
+ .frequencyDescription,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize: 14,
+ color: Color(0XFF2E303A),
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ Row(
+ children: [
+ AppText(
+ referredPatient.nationalityName !=
+ null
+ ? referredPatient.nationalityName
+ : "",
+ fontWeight: FontWeight.bold,
+ color: Color(0xFF2E303A),
+ fontSize:
+ 1.4 * SizeConfig.textMultiplier,
+ ),
+ referredPatient.nationalityFlagURL !=
+ null
+ ? ClipRRect(
+ borderRadius:
+ BorderRadius.circular(20.0),
+ child: Image.network(
+ referredPatient
+ .nationalityFlagURL,
+ height: 25,
+ width: 30,
+ errorBuilder: (BuildContext
+ context,
+ Object exception,
+ StackTrace stackTrace) {
+ return Text('No Image');
+ },
+ ))
+ : SizedBox()
+ ],
+ )
+ ],
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context).priority +
+ ": ",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.7 * SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ ),
+ AppText(
+ referredPatient.priorityDescription,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize:14,
+ color: Color(0XFF2E303A),
+ ),
+ ],
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context)
+ .maxResponseTime +
+ ": ",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.7 * SizeConfig.textMultiplier,
+ color: Color(0XFF575757),
+ ),
+ Expanded(
+ child: AppText(
+ DateUtils.convertDateFromServerFormat(
+ referredPatient.mAXResponseTime,
+ "dd MMM,yyyy"),
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize:
+ 1.8 * SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ ),
+ ],
+ ),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ margin:
+ EdgeInsets.only(left: 10, right: 0),
+ child: Image.asset(
+ 'assets/images/patient/ic_ref_arrow_left.png',
+ height: 50,
+ width: 30,
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.only(
+ left: 0,
+ top: 25,
+ right: 0,
+ bottom: 0),
+ padding: EdgeInsets.only(
+ left: 4.0, right: 4.0),
+ child: referredPatient.doctorImageURL !=
+ null
+ ? ClipRRect(
+ borderRadius:
+ BorderRadius.circular(20.0),
+ child: Image.network(
+ referredPatient.doctorImageURL,
+ height: 25,
+ width: 30,
+ errorBuilder:
+ (BuildContext context,
+ Object exception,
+ StackTrace stackTrace) {
+ return Text('No Image');
+ },
+ ))
+ : Container(
+ child: Image.asset(
+ referredPatient.gender == 1
+ ? 'assets/images/male_avatar.png'
+ : 'assets/images/female_avatar.png',
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 4,
+ child: Container(
+ margin: EdgeInsets.only(
+ left: 10,
+ top: 30,
+ right: 10,
+ bottom: 0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ AppText(
+ "Dr ${referredPatient.referralDoctorName}",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w800,
+ fontSize: 1.5 *
+ SizeConfig.textMultiplier,
+ color: Colors.black,
+ ),
+ AppText(
+ referredPatient.referralClinicDescription,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize: 1.3 *
+ SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ child: SingleChildScrollView(
+ child: Container(
+ width: double.infinity,
+ margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
+ padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ shape: BoxShape.rectangle,
+ borderRadius: BorderRadius.all(Radius.circular(8)),
+ border: Border.fromBorderSide(BorderSide(
+ color: Colors.white,
+ width: 1.0,
+ )),
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context).remarks,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize: 2.4 * SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ AppText(
+ referredPatient.referringDoctorRemarks,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.8 * SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ SizedBox(
+ height: 8,
+ ),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ margin: EdgeInsets.only(
+ left: 0, top: 0, right: 4, bottom: 0),
+ padding: EdgeInsets.only(left: 4.0, right: 4.0),
+ child: referredPatient.doctorImageURL != null
+ ? ClipRRect(
+ borderRadius: BorderRadius.circular(20.0),
+ child: Image.network(
+ referredPatient.doctorImageURL,
+ height: 25,
+ width: 30,
+ errorBuilder: (BuildContext context,
+ Object exception,
+ StackTrace stackTrace) {
+ return Text('No Image');
+ },
+ ))
+ : Container(
+ child: Image.asset(
+ referredPatient.gender == 1
+ ? 'assets/images/male_avatar.png'
+ : 'assets/images/female_avatar.png',
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ AppText(
+ TranslationBase.of(context).reply,
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w700,
+ fontSize: 1.8 * SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ AppText(
+ referredPatient.referredDoctorRemarks.isNotEmpty? referredPatient.referredDoctorRemarks:" Not Replied yet",
+ fontFamily: 'Poppins',
+ fontWeight: FontWeight.w600,
+ fontSize: 1.6 * SizeConfig.textMultiplier,
+ color: Color(0XFF2E303A),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ if(referredPatient.referralStatus ==1)
+ Container(
+ margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
+ child: AppButton(
+ title: TranslationBase.of(context).acknowledged,
+ color: Colors.red[700],
+ fontColor: Colors.white,
+ fontWeight: FontWeight.w700,
+ fontSize: 1.8,
+ hPadding: 8,
+ vPadding: 12,
+ onPressed: () async {
+ await model.verifyReferralDoctorRemarks(referredPatient);
+ if (model.state == ViewState.ErrorLocal) {
+ DrAppToastMsg.showErrorToast(model.error);
+ } else {
+ DrAppToastMsg.showSuccesToast("Referral is acknowledged");
+ Navigator.pop(context);
+ }
+ },
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart
index a8592350..5250ca73 100644
--- a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart
+++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart
@@ -163,7 +163,7 @@ class _VitalSignDetailsWidgetState extends State {
padding: EdgeInsets.all(10),
color: Colors.white,
child: AppText(
- '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ',
+ '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${DateUtils.getHour(elementDate)}',
// textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart
index c9c33e1c..169dbb13 100644
--- a/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart
+++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart
@@ -121,7 +121,7 @@ class _VitalSignDetailsWidgetState extends State {
padding: EdgeInsets.all(8),
color: Colors.white,
child: AppText(
- '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ',
+ '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${DateUtils.getHour(elementDate)}',
// textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600,
diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart
index f43dd79d..7aeffca4 100644
--- a/lib/screens/sick-leave/add-sickleave.dart
+++ b/lib/screens/sick-leave/add-sickleave.dart
@@ -29,7 +29,7 @@ class AddSickLeavScreen extends StatelessWidget {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
return BaseView(
- onModelReady: (model) => model.getSickLeave(patient.patientMRN),
+ onModelReady: (model) => model.getSickLeave(patient.patientMRN??patient.patientId),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart
index f62ef38c..505fc351 100644
--- a/lib/util/translations_delegate_base.dart
+++ b/lib/util/translations_delegate_base.dart
@@ -1239,6 +1239,7 @@ class TranslationBase {
String get replayBefore =>
localizedValues['replayBefore'][locale.languageCode];
String get trySaying => localizedValues["try-saying"][locale.languageCode];
+ String get acknowledged => localizedValues['acknowledged'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate {
diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart
index 381d9b00..d675dd15 100644
--- a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart
+++ b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart
@@ -126,7 +126,8 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget {
Row(
children: [
AppText(
- "7:00 PM st",
+ DateUtils.convertDateFromServerFormat(
+ patient.admissionDate, "hh:mm a"),
fontWeight: FontWeight.bold,
fontSize: 1.4 * SizeConfig.textMultiplier,
),
diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart
index 88811e1a..5fc9cf19 100644
--- a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart
+++ b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart
@@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
+import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
@@ -166,6 +167,15 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
nameLine1: "Discharge",
nameLine2: "Summery",
icon: 'patient/patient_sick_leave.png'),
+ PatientProfileButton(
+ key: key,
+ patient: patient,
+ patientType: patientType,
+ arrivalType: arrivalType,
+ route: ADD_SICKLEAVE,
+ nameLine1: TranslationBase.of(context).patientSick,
+ nameLine2: TranslationBase.of(context).leave,
+ icon: 'patient/patient_sick_leave.png'),
],
),
);
diff --git a/pubspec.lock b/pubspec.lock
index d338a618..9d52ce65 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -566,7 +566,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
- version: "0.6.3-nullsafety.1"
+ version: "0.6.2"
json_annotation:
dependency: transitive
description: