send patient type to patient profile cards

merge-requests/379/head
mosazaid 4 years ago
parent 61a0e42afa
commit c97b395810

@ -62,7 +62,8 @@ class PatientProfileScreen extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientProfileHeaderNewDesign(patient, patientType, arrivalType), PatientProfileHeaderNewDesign(
patient, patientType, arrivalType),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
@ -73,12 +74,14 @@ class PatientProfileScreen extends StatelessWidget {
? ProfileMedicalInfoWidgetSearch( ? ProfileMedicalInfoWidgetSearch(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
) )
: ProfileMedicalInfoWidget( : ProfileMedicalInfoWidget(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
), ),

@ -11,6 +11,8 @@ class PatientProfileButton extends StatelessWidget {
final String icon; final String icon;
final dynamic route; final dynamic route;
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType;
final String arrivalType;
String from; String from;
String to; String to;
final String url = "assets/images/"; final String url = "assets/images/";
@ -21,6 +23,8 @@ class PatientProfileButton extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
{Key key, {Key key,
this.patient, this.patient,
this.patientType,
this.arrivalType,
this.nameLine1, this.nameLine1,
this.nameLine2, this.nameLine2,
this.icon, this.icon,
@ -51,7 +55,11 @@ class PatientProfileButton extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
child: new Image.asset(url + icon, width: 50, height: 50,)) child: new Image.asset(
url + icon,
width: 50,
height: 50,
))
], ],
)), )),
Container( Container(
@ -62,7 +70,8 @@ class PatientProfileButton extends StatelessWidget {
children: [ children: [
AppText( AppText(
this.nameLine1, this.nameLine1,
color: Colors.black, /*Color(0xFFB9382C),*/ color: Colors.black,
/*Color(0xFFB9382C),*/
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
textAlign: TextAlign.left, textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 1.5, fontSize: SizeConfig.textMultiplier * 1.5,
@ -107,7 +116,12 @@ class PatientProfileButton extends StatelessWidget {
if (to == null) { if (to == null) {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
} }
Navigator.of(context).pushNamed(route, Navigator.of(context).pushNamed(route, arguments: {
arguments: {'patient': patient, 'from': from, 'to': to}); 'patient': patient,
'from': from,
'to': to,
'patient-type': patientType,
'arrival-type': arrivalType
});
} }
} }

@ -17,13 +17,19 @@ import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart'; import '../../shared/app_texts_widget.dart';
class ProfileMedicalInfoWidget extends StatelessWidget { class ProfileMedicalInfoWidget extends StatelessWidget {
String from; final String from;
String to; final String to;
PatiantInformtion patient; final PatiantInformtion patient;
String patientType; final String patientType;
final String arrivalType;
ProfileMedicalInfoWidget( ProfileMedicalInfoWidget(
{Key key, this.patient, this.patientType, this.from, this.to}); {Key key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -69,6 +75,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
nameLine1: TranslationBase.of(context).vital, nameLine1: TranslationBase.of(context).vital,
@ -79,6 +87,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT, route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
@ -86,6 +96,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: TranslationBase.of(context).previewHealth, nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport, nameLine2: TranslationBase.of(context).summaryReport,
@ -96,6 +108,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
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,
@ -104,6 +118,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW, route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).admission, nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request, nameLine2: TranslationBase.of(context).request,
@ -112,6 +128,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
? PatientProfileButton( ? PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION, route: ORDER_PRESCRIPTION,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
@ -119,6 +137,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
: PatientProfileButton( : PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_HISTORY, route: ORDER_PRESCRIPTION_HISTORY,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
@ -126,6 +146,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW, route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
@ -134,6 +156,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE, route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures, nameLine2: TranslationBase.of(context).procedures,
@ -142,6 +166,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR, route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase.of(context).myReferral, nameLine1: TranslationBase.of(context).myReferral,
nameLine2: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).patient,
@ -150,6 +176,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE, route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick, nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave, nameLine2: TranslationBase.of(context).leave,
@ -158,6 +186,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_UCAF_REQUEST, route: PATIENT_UCAF_REQUEST,
nameLine1: TranslationBase.of(context).patient, nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf, nameLine2: TranslationBase.of(context).ucaf,
@ -166,6 +196,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: RADIOLOGY_PATIENT, route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology, nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
@ -174,6 +206,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW, route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance, nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
@ -181,6 +215,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG, route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient, nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG", nameLine2: "ECG",

@ -12,9 +12,15 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
final String to; final String to;
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType;
ProfileMedicalInfoWidgetSearch( ProfileMedicalInfoWidgetSearch(
{Key key, this.patient, this.patientType, this.from, this.to}); {Key key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -31,6 +37,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: RADIOLOGY_PATIENT, route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology, nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
@ -38,6 +46,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW, route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance, nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
@ -45,6 +55,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT, route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
@ -52,6 +64,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from, from: from,
to: to, to: to,
nameLine1: TranslationBase.of(context).vital, nameLine1: TranslationBase.of(context).vital,
@ -69,6 +83,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
? PatientProfileButton( ? PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW, route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
@ -76,6 +92,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
: PatientProfileButton( : PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW, route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
@ -83,6 +101,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE, route: MEDICAL_FILE,
nameLine1: TranslationBase.of(context).previewHealth, nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport, nameLine2: TranslationBase.of(context).summaryReport,
@ -90,6 +110,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG, route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient, nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG", nameLine2: "ECG",
@ -97,6 +119,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: SHOW_SICKLEAVE, route: SHOW_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick, nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave, nameLine2: TranslationBase.of(context).leave,
@ -104,6 +128,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
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,

Loading…
Cancel
Save