Merge branch 'hot_fixes' into 'development'

Hot fixes

See merge request Cloud_Solution/doctor_app_flutter!960
merge-requests/961/merge
Elham Ali 4 years ago
commit 1ae6c4682b

@ -230,12 +230,12 @@ class PatientReferralViewModel extends BaseViewModel {
Future makeReferral(PatiantInformtion patient, String isoStringDate, Future makeReferral(PatiantInformtion patient, String isoStringDate,
int projectID, int clinicID, int doctorID, String remarks) async { int projectID, int clinicID, int doctorID, String remarks) async {
setState(ViewState.Busy); setState(ViewState.BusyLocal);
await _referralPatientService.makeReferral( await _referralPatientService.makeReferral(
patient, isoStringDate, projectID, clinicID, doctorID, remarks); patient, isoStringDate, projectID, clinicID, doctorID, remarks);
if (_referralPatientService.hasError) { if (_referralPatientService.hasError) {
error = _referralPatientService.error; error = _referralPatientService.error;
setState(ViewState.Error); setState(ViewState.ErrorLocal);
} else { } else {
setState(ViewState.Idle); setState(ViewState.Idle);
} }

@ -1,6 +1,7 @@
// TODO = it have to be changed. // TODO = it have to be changed.
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
class PatiantInformtion { class PatiantInformtion {
PatiantInformtion patientDetails; PatiantInformtion patientDetails;
@ -199,8 +200,8 @@ class PatiantInformtion {
bedId = json["BedID"] ?? json["bedID"]; bedId = json["BedID"] ?? json["bedID"];
nursingStationId = json["NursingStationID"] ?? json["nursingStationID"]; nursingStationId = json["NursingStationID"] ?? json["nursingStationID"];
description = json["Description"] ?? json["description"]; description = json["Description"] ?? json["description"];
clinicDescription = clinicDescription = Helpers.convertToTitleCase(
json["ClinicDescription"] ?? json["clinicDescription"]; json["ClinicDescription"] ?? json["clinicDescription"]??'');
clinicDescriptionN = clinicDescriptionN =
json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; json["ClinicDescriptionN"] ?? json["clinicDescriptionN"];
nationalityName = json["NationalityName"] ?? nationalityName = json["NationalityName"] ??

@ -207,10 +207,11 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
label: TranslationBase.of(context).fileNumber, label: TranslationBase.of(context).fileNumber,
value: widget.reply.patientID.toString(), value: widget.reply.patientID.toString(),
isCopyable: false, isCopyable: false,
isExpanded: false,
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).age + " : ", label: TranslationBase.of(context).age + " : ", isCopyable: false,
isCopyable: false, isExpanded: false,
value: value:
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}", "${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}",
), ),

@ -38,6 +38,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
final _whereController = TextEditingController(); final _whereController = TextEditingController();
final _managementsLineController = TextEditingController(); final _managementsLineController = TextEditingController();
final _signsController = TextEditingController(); final _signsController = TextEditingController();
///TODO Elham* fix this
List<Map> conditionsData = [ List<Map> conditionsData = [
{"name": "CHRONIC", "isChecked": false}, {"name": "CHRONIC", "isChecked": false},
{"name": "RTA", "isChecked": false}, {"name": "RTA", "isChecked": false},
@ -383,7 +385,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
error: model.patientVitalSignsHistory == null || error: model.patientVitalSignsHistory == null ||
model.patientVitalSignsHistory.length == 0 model.patientVitalSignsHistory.length == 0
? TranslationBase.of(context).vitalSignEmptyMsg ? TranslationBase.of(context).vitalSignEmptyMsg
: TranslationBase.of(context))) : TranslationBase.of(context).chiefComplaintEmptyMsg))
: Container(), : Container(),
), ),
); );

@ -7,6 +7,7 @@ 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/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.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/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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
@ -209,19 +210,28 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
_selectedClinic == null || _selectedClinic == null ||
_selectedDoctor == null || _selectedDoctor == null ||
_remarksController.text == null) return; _remarksController.text == null) return;
model GifLoaderDialogUtils.showMyDialog(context);
await model
.makeReferral( .makeReferral(
patient, patient,
appointmentDate.toIso8601String(), appointmentDate.toIso8601String(),
_selectedBranch['facilityId'], _selectedBranch['facilityId'],
_selectedClinic['ClinicID'], _selectedClinic['ClinicID'],
_selectedDoctor['DoctorID'], _selectedDoctor['DoctorID'],
_remarksController.text) _remarksController.text);
.then((_) { if(model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
Helpers.showErrorToast(model.error);
} else {
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast( DrAppToastMsg.showSuccesToast(
TranslationBase.of(context).referralSuccessMsg); TranslationBase.of(context).referralSuccessMsg);
Navigator.pop(context); Navigator.pop(context);
}); }
}, },
), ),
) )

@ -28,6 +28,7 @@ class DrugToDrug extends StatefulWidget {
class _DrugToDrug extends State<DrugToDrug> { class _DrugToDrug extends State<DrugToDrug> {
int typeID = 1; int typeID = 1;
bool isLoaded = false; bool isLoaded = false;
/// TODO Elham* fix this
List<Map<dynamic, dynamic>> expandableList = [ List<Map<dynamic, dynamic>> expandableList = [
{'name': 'CRITICAL', 'level': 'LEVEL_4'}, {'name': 'CRITICAL', 'level': 'LEVEL_4'},
{'name': 'HIGH', 'level': 'LEVEL_3'}, {'name': 'HIGH', 'level': 'LEVEL_3'},
@ -35,15 +36,7 @@ class _DrugToDrug extends State<DrugToDrug> {
{'name': 'LOW', 'level': 'LEVEL_1'}, {'name': 'LOW', 'level': 'LEVEL_1'},
{'name': 'INFO', 'level': 'INFO'}, {'name': 'INFO', 'level': 'INFO'},
]; ];
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
patientMRN: 2954208,
//widget.patient.patientMRN,
episodeId: 210011002,
//widget.patient.episodeNo,
appointmentNo: 2016055308,
//widget.patient.appointmentNo,
doctorID: '',
editedBy: '');
VitalSignsViewModel model = new VitalSignsViewModel(); VitalSignsViewModel model = new VitalSignsViewModel();
SOAPViewModel model2 = new SOAPViewModel(); SOAPViewModel model2 = new SOAPViewModel();
@ -115,6 +108,15 @@ class _DrugToDrug extends State<DrugToDrug> {
getRequestedData() async { getRequestedData() async {
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
/// TODO Elham* fix this today
patientMRN: widget.patient.patientMRN,
episodeId: widget.patient.episodeNo,
appointmentNo:
widget.patient.appointmentNo,
doctorID: '',
editedBy: '');
/// TODO Elham* rename model to meaning full not just modle with number /// TODO Elham* rename model to meaning full not just modle with number
await model.getPatientVitalSign(widget.patient); await model.getPatientVitalSign(widget.patient);

@ -12,6 +12,7 @@ class CustomRow extends StatelessWidget {
this.valueSize, this.valueSize,
this.width, this.width,
this.isCopyable = true, this.isCopyable = true,
this.isExpanded = true,
}) : super(key: key); }) : super(key: key);
final String label; final String label;
@ -20,6 +21,7 @@ class CustomRow extends StatelessWidget {
final double valueSize; final double valueSize;
final double width; final double width;
final bool isCopyable; final bool isCopyable;
final bool isExpanded;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -38,6 +40,7 @@ class CustomRow extends StatelessWidget {
width: 1, width: 1,
), ),
Expanded( Expanded(
flex: isExpanded ? 1 : 0,
child: AppText( child: AppText(
value, value,
fontSize: fontSize:

Loading…
Cancel
Save