|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
|
|
|
|
|
|
|
|
|
import '../../../../routes.dart';
|
|
|
|
|
|
|
|
|
@ -23,246 +25,129 @@ class ProfileGridForInPatient extends StatelessWidget {
|
|
|
|
|
this.patientType,
|
|
|
|
|
this.arrivalType,
|
|
|
|
|
this.height,
|
|
|
|
|
this.isInpatient, this.from,this.to, this.isDischargedPatient, this.isFromSearch})
|
|
|
|
|
this.isInpatient,
|
|
|
|
|
this.from,
|
|
|
|
|
this.to,
|
|
|
|
|
this.isDischargedPatient,
|
|
|
|
|
this.isFromSearch})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding:
|
|
|
|
|
const EdgeInsets.symmetric(
|
|
|
|
|
vertical: 15.0,
|
|
|
|
|
horizontal: 15),
|
|
|
|
|
child: GridView.count(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics:
|
|
|
|
|
NeverScrollableScrollPhysics(),
|
|
|
|
|
crossAxisSpacing: 10,
|
|
|
|
|
mainAxisSpacing: 10,
|
|
|
|
|
childAspectRatio: 1 / 1.02,
|
|
|
|
|
crossAxisCount: 3,
|
|
|
|
|
children: [
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
nameLine1:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.vital,
|
|
|
|
|
nameLine2:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.signs,
|
|
|
|
|
route: VITAL_SIGN_DETAILS,
|
|
|
|
|
isInPatient: true,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/vital_signs.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: LAB_RESULT,
|
|
|
|
|
isInPatient: true,
|
|
|
|
|
nameLine1:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.lab,
|
|
|
|
|
nameLine2:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.result,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/lab_results.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
route: RADIOLOGY_PATIENT,
|
|
|
|
|
nameLine1:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.radiology,
|
|
|
|
|
nameLine2:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.result,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/health_summary.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route:
|
|
|
|
|
final List<PatientProfileCardModel> cardsList = [
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).vital,
|
|
|
|
|
TranslationBase.of(context).signs,
|
|
|
|
|
VITAL_SIGN_DETAILS,
|
|
|
|
|
'patient/vital_signs.png',
|
|
|
|
|
isInPatient: isInpatient),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).lab,
|
|
|
|
|
TranslationBase.of(context).result,
|
|
|
|
|
LAB_RESULT,
|
|
|
|
|
'patient/lab_results.png',
|
|
|
|
|
isInPatient: isInpatient),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).radiology,
|
|
|
|
|
TranslationBase.of(context).result,
|
|
|
|
|
RADIOLOGY_PATIENT,
|
|
|
|
|
'patient/health_summary.png',
|
|
|
|
|
isInPatient: isInpatient),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).patient,
|
|
|
|
|
TranslationBase.of(context).prescription,
|
|
|
|
|
ORDER_PRESCRIPTION_NEW,
|
|
|
|
|
isSelectInpatient: true,
|
|
|
|
|
nameLine1:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.patient,
|
|
|
|
|
nameLine2:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.prescription,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/order_prescription.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: PROGRESS_NOTE,
|
|
|
|
|
'patient/order_prescription.png',
|
|
|
|
|
isInPatient: isInpatient),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).progress,
|
|
|
|
|
TranslationBase.of(context).note,
|
|
|
|
|
PROGRESS_NOTE,
|
|
|
|
|
'patient/Progress_notes.png',
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
isDischargedPatient:
|
|
|
|
|
isDischargedPatient,
|
|
|
|
|
nameLine1:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.progress,
|
|
|
|
|
nameLine2:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.note,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/Progress_notes.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: ORDER_NOTE,
|
|
|
|
|
isDischargedPatient:
|
|
|
|
|
isDischargedPatient,
|
|
|
|
|
nameLine1:TranslationBase.of(context).order,
|
|
|
|
|
nameLine2:
|
|
|
|
|
isDischargedPatient: isDischargedPatient),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).order,
|
|
|
|
|
TranslationBase.of(context).sheet,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/Progress_notes.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: ORDER_PROCEDURE,
|
|
|
|
|
ORDER_NOTE,
|
|
|
|
|
'patient/Progress_notes.png',
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
nameLine1:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.orders,
|
|
|
|
|
nameLine2:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.procedures,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/Order_Procedures.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: HEALTH_SUMMARY,
|
|
|
|
|
nameLine1: TranslationBase.of(context).health,
|
|
|
|
|
nameLine2: TranslationBase.of(context).summary,
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
|
|
|
|
|
icon:
|
|
|
|
|
'patient/health_summary.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
isDisable: true,
|
|
|
|
|
route: HEALTH_SUMMARY,
|
|
|
|
|
nameLine1:
|
|
|
|
|
isDischargedPatient: isDischargedPatient),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).orders,
|
|
|
|
|
TranslationBase.of(context).procedures,
|
|
|
|
|
ORDER_PROCEDURE,
|
|
|
|
|
'patient/Order_Procedures.png',
|
|
|
|
|
isInPatient: isInpatient),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).health,
|
|
|
|
|
TranslationBase.of(context).summary,
|
|
|
|
|
HEALTH_SUMMARY,
|
|
|
|
|
'patient/health_summary.png',
|
|
|
|
|
isInPatient: isInpatient),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).medical,
|
|
|
|
|
nameLine2:
|
|
|
|
|
TranslationBase.of(context).report,
|
|
|
|
|
HEALTH_SUMMARY,
|
|
|
|
|
'patient/health_summary.png',
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/health_summary.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route:
|
|
|
|
|
isDisable: true),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).referral,
|
|
|
|
|
TranslationBase.of(context).patient,
|
|
|
|
|
REFER_IN_PATIENT_TO_DOCTOR,
|
|
|
|
|
isInPatient: true,
|
|
|
|
|
isDisable:
|
|
|
|
|
isDischargedPatient ||
|
|
|
|
|
isFromSearch,
|
|
|
|
|
nameLine1:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.referral,
|
|
|
|
|
nameLine2:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.patient,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/refer_patient.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route:
|
|
|
|
|
'patient/refer_patient.png',
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
isDisable: isDischargedPatient || isFromSearch,
|
|
|
|
|
),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).insurance,
|
|
|
|
|
TranslationBase.of(context).approvals,
|
|
|
|
|
PATIENT_INSURANCE_APPROVALS_NEW,
|
|
|
|
|
nameLine1:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.insurance,
|
|
|
|
|
nameLine2:
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(
|
|
|
|
|
context)
|
|
|
|
|
.approvals,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/vital_signs.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
'patient/vital_signs.png',
|
|
|
|
|
isInPatient: isInpatient),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).discharge,
|
|
|
|
|
TranslationBase.of(context).report,
|
|
|
|
|
null,
|
|
|
|
|
'patient/patient_sick_leave.png',
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
isDisable: true,
|
|
|
|
|
route: null,
|
|
|
|
|
nameLine1: TranslationBase.of(context).discharge,
|
|
|
|
|
nameLine2: TranslationBase.of(context).report,
|
|
|
|
|
icon:
|
|
|
|
|
'patient/patient_sick_leave.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
isDisable: true),
|
|
|
|
|
PatientProfileCardModel(
|
|
|
|
|
TranslationBase.of(context).patientSick,
|
|
|
|
|
TranslationBase.of(context).leave,
|
|
|
|
|
ADD_SICKLEAVE,
|
|
|
|
|
'patient/patient_sick_leave.png',
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
),
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15),
|
|
|
|
|
child: StaggeredGridView.countBuilder(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
crossAxisSpacing: 10,
|
|
|
|
|
mainAxisSpacing: 10,
|
|
|
|
|
crossAxisCount: 3,
|
|
|
|
|
itemCount: cardsList.length,
|
|
|
|
|
staggeredTileBuilder: (int index) => StaggeredTile.fit(1),
|
|
|
|
|
itemBuilder: (BuildContext context, int index) => PatientProfileButton(
|
|
|
|
|
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'),
|
|
|
|
|
],
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
nameLine1: cardsList[index].nameLine1,
|
|
|
|
|
nameLine2: cardsList[index].nameLine2,
|
|
|
|
|
route: cardsList[index].route,
|
|
|
|
|
icon: cardsList[index].icon,
|
|
|
|
|
isInPatient: cardsList[index].isInPatient,
|
|
|
|
|
isDischargedPatient: cardsList[index].isDischargedPatient,
|
|
|
|
|
isDisable: cardsList[index].isDisable,
|
|
|
|
|
onTap: cardsList[index].onTap,
|
|
|
|
|
isLoading: cardsList[index].isLoading,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|