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

@ -11,6 +11,8 @@ class PatientProfileButton extends StatelessWidget {
final String icon;
final dynamic route;
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
String from;
String to;
final String url = "assets/images/";
@ -20,16 +22,18 @@ class PatientProfileButton extends StatelessWidget {
PatientProfileButton(
{Key key,
this.patient,
this.nameLine1,
this.nameLine2,
this.icon,
this.route,
this.isDisable = false,
this.onTap,
this.isLoading = false,
this.from,
this.to})
this.patient,
this.patientType,
this.arrivalType,
this.nameLine1,
this.nameLine2,
this.icon,
this.route,
this.isDisable = false,
this.onTap,
this.isLoading = false,
this.from,
this.to})
: super(key: key);
@override
@ -41,19 +45,23 @@ class PatientProfileButton extends StatelessWidget {
onTap: isDisable
? null
: onTap != null
? onTap
: () {
navigator(context, this.route);
},
? onTap
: () {
navigator(context, this.route);
},
child: Column(children: <Widget>[
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
child: new Image.asset(url + icon, width: 50, height: 50,))
],
)),
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
child: new Image.asset(
url + icon,
width: 50,
height: 50,
))
],
)),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.all(5),
@ -62,7 +70,8 @@ class PatientProfileButton extends StatelessWidget {
children: [
AppText(
this.nameLine1,
color: Colors.black, /*Color(0xFFB9382C),*/
color: Colors.black,
/*Color(0xFFB9382C),*/
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 1.5,
@ -107,7 +116,12 @@ class PatientProfileButton extends StatelessWidget {
if (to == null) {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
}
Navigator.of(context).pushNamed(route,
arguments: {'patient': patient, 'from': from, 'to': to});
Navigator.of(context).pushNamed(route, arguments: {
'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';
class ProfileMedicalInfoWidget extends StatelessWidget {
String from;
String to;
PatiantInformtion patient;
String patientType;
final String from;
final String to;
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
ProfileMedicalInfoWidget(
{Key key, this.patient, this.patientType, this.from, this.to});
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to});
@override
Widget build(BuildContext context) {
@ -69,6 +75,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
@ -79,6 +87,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
@ -86,6 +96,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport,
@ -96,6 +108,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
@ -104,6 +118,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
@ -112,6 +128,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
? PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
@ -119,6 +137,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
: PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_HISTORY,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
@ -126,6 +146,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
@ -134,6 +156,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
@ -142,6 +166,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase.of(context).myReferral,
nameLine2: TranslationBase.of(context).patient,
@ -150,6 +176,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
@ -158,6 +186,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_UCAF_REQUEST,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
@ -166,6 +196,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
@ -174,6 +206,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
@ -181,6 +215,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",

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

Loading…
Cancel
Save