Merge branch 'soap_update' into 'development'

Fix profile widget

See merge request Cloud_Solution/doctor_app_flutter!223
merge-requests/224/merge
Elham 5 years ago
commit b291572767

@ -1,14 +1,13 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import '../../../config/size_config.dart'; import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart'; import '../../shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'PatientProfileButton.dart';
/* /*
*@author: Elham Rababah *@author: Elham Rababah
@ -45,16 +44,15 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine2: TranslationBase.of(context).episode, nameLine2: TranslationBase.of(context).episode,
route: UPDATE_EPISODE, route: UPDATE_EPISODE,
icon: 'modilfy-episode.png'), icon: 'modilfy-episode.png'),
Visibility( if(selectedPatientType == 6 || selectedPatientType == 7)
visible: selectedPatientType == 6 || selectedPatientType == 7, PatientProfileButton(
child: PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
nameLine1: TranslationBase.of(context).vital, nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs, nameLine2: TranslationBase.of(context).signs,
route: PATIENT_VITAL_SIGN, route: PATIENT_VITAL_SIGN,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
), if(selectedPatientType != 7)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -62,13 +60,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
icon: 'lab.png'), icon: 'lab.png'),
// PatientProfileButton(
// key: key,
// patient: patient,
// route: PRESCRIPTIONS,
// nameLine1: TranslationBase.of(context).medicines,
// nameLine2: TranslationBase.of(context).prescription,
// icon: 'note.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -76,32 +68,22 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).previewHealth, nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport, nameLine2: TranslationBase.of(context).summaryReport,
icon: 'radiology-1.png'), icon: 'radiology-1.png'),
Visibility( if (selectedPatientType != 0 && selectedPatientType != 5)
visible: selectedPatientType != 0 && selectedPatientType != 5, PatientProfileButton(
child: PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PROGRESS_NOTE, route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress, nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note, nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png')), icon: 'heartbeat.png'),
Visibility( if (selectedPatientType == 7)
visible: selectedPatientType == 6 || selectedPatientType == 7, PatientProfileButton(
child: PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_ADMISSION_REQUEST, route: PATIENT_ADMISSION_REQUEST,
nameLine1: TranslationBase.of(context).admission, nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request, nameLine2: TranslationBase.of(context).request,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
),
// PatientProfileButton(
// key: key,
// patient: patient,
// route: PATIENT_INSURANCE_APPROVALS,
// nameLine1: TranslationBase.of(context).insurance,
// nameLine2: TranslationBase.of(context).approvals,
// icon: 'lab.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -116,42 +98,54 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: 'Order Test', nameLine1: 'Order Test',
nameLine2: 'Or Procedures', nameLine2: 'Or Procedures',
icon: 'lab.png'), icon: 'lab.png'),
Visibility( if(selectedPatientType == 7)
visible: selectedPatientType == 6 || selectedPatientType == 7, PatientProfileButton(
child: PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: REFER_PATIENT_TO_DOCTOR, route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase.of(context).myReferral, nameLine1: TranslationBase
nameLine2: TranslationBase.of(context).patient, .of(context)
icon: 'note.png')), .myReferral,
Visibility( nameLine2: TranslationBase
visible: selectedPatientType != 0 && selectedPatientType != 5, .of(context)
child: PatientProfileButton( .patient,
icon: 'note.png'),
if(selectedPatientType != 0 && selectedPatientType != 5)
PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_ORDERS, route: PATIENT_ORDERS,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase
nameLine2: TranslationBase.of(context).list, .of(context)
icon: 'radiology-1.png')), .orders,
Visibility( nameLine2: TranslationBase
visible: selectedPatientType != 0 && selectedPatientType != 5, .of(context)
child: PatientProfileButton( .list,
icon: 'radiology-1.png'),
if(selectedPatientType != 0 && selectedPatientType != 5)
PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: ADD_SICKLEAVE, route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick, nameLine1: TranslationBase
nameLine2: TranslationBase.of(context).leave, .of(context)
icon: 'sick_leaves_icons.png')), .patientSick,
Visibility( nameLine2: TranslationBase
visible: selectedPatientType == 6 || selectedPatientType == 7, .of(context)
child: PatientProfileButton( .leave,
icon: 'sick_leaves_icons.png'),
if( selectedPatientType == 7)
PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_UCAF_REQUEST, route: PATIENT_UCAF_REQUEST,
nameLine1: TranslationBase.of(context).patient, nameLine1: TranslationBase
nameLine2: TranslationBase.of(context).ucaf, .of(context)
icon: 'lab.png')), .patient,
nameLine2: TranslationBase
.of(context)
.ucaf,
icon: 'lab.png'),
]); ]);
} }
} }

Loading…
Cancel
Save