|
|
|
@ -7,29 +7,37 @@ import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
|
|
|
|
class ProfileMedicalInfoWidgetSearch extends StatefulWidget {
|
|
|
|
final String from;
|
|
|
|
final String? from;
|
|
|
|
final String to;
|
|
|
|
final String? to;
|
|
|
|
final PatiantInformtion patient;
|
|
|
|
final PatiantInformtion? patient;
|
|
|
|
final String patientType;
|
|
|
|
final String? patientType;
|
|
|
|
final String arrivalType;
|
|
|
|
final String? arrivalType;
|
|
|
|
final bool isInpatient;
|
|
|
|
final bool isInpatient;
|
|
|
|
final bool isDischargedPatient;
|
|
|
|
final bool isDischargedPatient;
|
|
|
|
|
|
|
|
|
|
|
|
ProfileMedicalInfoWidgetSearch(
|
|
|
|
ProfileMedicalInfoWidgetSearch(
|
|
|
|
{Key key,
|
|
|
|
{Key? key,
|
|
|
|
this.patient,
|
|
|
|
this.patient,
|
|
|
|
this.patientType,
|
|
|
|
this.patientType,
|
|
|
|
this.arrivalType,
|
|
|
|
this.arrivalType,
|
|
|
|
this.from,
|
|
|
|
this.from,
|
|
|
|
this.to,
|
|
|
|
this.to,
|
|
|
|
this.isInpatient,
|
|
|
|
this.isInpatient = false,
|
|
|
|
this.isDischargedPatient});
|
|
|
|
this.isDischargedPatient = false});
|
|
|
|
|
|
|
|
|
|
|
|
TabController _tabController;
|
|
|
|
@override
|
|
|
|
|
|
|
|
State<ProfileMedicalInfoWidgetSearch> createState() =>
|
|
|
|
|
|
|
|
_ProfileMedicalInfoWidgetSearchState();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class _ProfileMedicalInfoWidgetSearchState
|
|
|
|
|
|
|
|
extends State<ProfileMedicalInfoWidgetSearch>
|
|
|
|
|
|
|
|
with SingleTickerProviderStateMixin {
|
|
|
|
|
|
|
|
late TabController _tabController;
|
|
|
|
|
|
|
|
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
_tabController = TabController(length: 2);
|
|
|
|
_tabController = TabController(length: 2, vsync: this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void dispose() {
|
|
|
|
void dispose() {
|
|
|
|
@ -42,7 +50,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
|
|
|
|
onModelReady: (model) async {},
|
|
|
|
onModelReady: (model) async {},
|
|
|
|
builder: (_, model, w) => DefaultTabController(
|
|
|
|
builder: (_, model, w) => DefaultTabController(
|
|
|
|
length: 2,
|
|
|
|
length: 2,
|
|
|
|
initialIndex: isInpatient ? 0 : 1,
|
|
|
|
initialIndex: widget.isInpatient ? 0 : 1,
|
|
|
|
child: SizedBox(
|
|
|
|
child: SizedBox(
|
|
|
|
height: MediaQuery.of(context).size.height * 1.0,
|
|
|
|
height: MediaQuery.of(context).size.height * 1.0,
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
@ -56,22 +64,22 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
|
|
|
|
crossAxisCount: 3,
|
|
|
|
crossAxisCount: 3,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.arrivalType,
|
|
|
|
from: from,
|
|
|
|
from: widget.from,
|
|
|
|
to: to,
|
|
|
|
to: widget.to,
|
|
|
|
nameLine1: TranslationBase.of(context).vital,
|
|
|
|
nameLine1: TranslationBase.of(context).vital,
|
|
|
|
nameLine2: TranslationBase.of(context).signs,
|
|
|
|
nameLine2: TranslationBase.of(context).signs,
|
|
|
|
route: VITAL_SIGN_DETAILS,
|
|
|
|
route: VITAL_SIGN_DETAILS,
|
|
|
|
icon: 'assets/images/svgs/profile_screen/vital signs.svg'),
|
|
|
|
icon: 'assets/images/svgs/profile_screen/vital signs.svg'),
|
|
|
|
// if (selectedPatientType != 7)
|
|
|
|
// if (selectedPatientType != 7)
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.arrivalType,
|
|
|
|
route: HEALTH_SUMMARY,
|
|
|
|
route: HEALTH_SUMMARY,
|
|
|
|
nameLine1: "Health",
|
|
|
|
nameLine1: "Health",
|
|
|
|
//TranslationBase.of(context).medicalReport,
|
|
|
|
//TranslationBase.of(context).medicalReport,
|
|
|
|
@ -80,40 +88,40 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
|
|
|
|
icon:
|
|
|
|
icon:
|
|
|
|
'assets/images/svgs/profile_screen/health summary.svg'),
|
|
|
|
'assets/images/svgs/profile_screen/health summary.svg'),
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.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,
|
|
|
|
icon: 'assets/images/svgs/profile_screen/lab results.svg'),
|
|
|
|
icon: 'assets/images/svgs/profile_screen/lab results.svg'),
|
|
|
|
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.arrivalType,
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
isInPatient: widget.isInpatient,
|
|
|
|
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,
|
|
|
|
icon:
|
|
|
|
icon:
|
|
|
|
'assets/images/svgs/profile_screen/health summary.svg'),
|
|
|
|
'assets/images/svgs/profile_screen/health summary.svg'),
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.arrivalType,
|
|
|
|
route: PATIENT_ECG,
|
|
|
|
route: PATIENT_ECG,
|
|
|
|
nameLine1: TranslationBase.of(context).patient,
|
|
|
|
nameLine1: TranslationBase.of(context).patient,
|
|
|
|
nameLine2: "ECG",
|
|
|
|
nameLine2: "ECG",
|
|
|
|
icon: 'assets/images/svgs/profile_screen/ECG.svg'),
|
|
|
|
icon: 'assets/images/svgs/profile_screen/ECG.svg'),
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.arrivalType,
|
|
|
|
route: ORDER_PRESCRIPTION_OLD,
|
|
|
|
route: ORDER_PRESCRIPTION_OLD,
|
|
|
|
nameLine1: TranslationBase.of(context).orders,
|
|
|
|
nameLine1: TranslationBase.of(context).orders,
|
|
|
|
nameLine2: TranslationBase.of(context).prescription,
|
|
|
|
nameLine2: TranslationBase.of(context).prescription,
|
|
|
|
@ -121,10 +129,10 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
|
|
|
|
'assets/images/svgs/profile_screen/order prescription.svg'),
|
|
|
|
'assets/images/svgs/profile_screen/order prescription.svg'),
|
|
|
|
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.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,
|
|
|
|
@ -132,10 +140,10 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
|
|
|
|
'assets/images/svgs/profile_screen/Order Procedures.svg'),
|
|
|
|
'assets/images/svgs/profile_screen/Order Procedures.svg'),
|
|
|
|
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.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,
|
|
|
|
@ -143,67 +151,76 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
|
|
|
|
'assets/images/svgs/profile_screen/insurance approval.svg'),
|
|
|
|
'assets/images/svgs/profile_screen/insurance approval.svg'),
|
|
|
|
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.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,
|
|
|
|
icon:
|
|
|
|
icon:
|
|
|
|
'assets/images/svgs/profile_screen/patient sick leave.svg'),
|
|
|
|
'assets/images/svgs/profile_screen/patient sick leave.svg'),
|
|
|
|
if (patient.appointmentNo != null && patient.appointmentNo != 0)
|
|
|
|
if (widget.patient!.appointmentNo != null &&
|
|
|
|
|
|
|
|
widget.patient!.appointmentNo != 0)
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.arrivalType,
|
|
|
|
route: PATIENT_UCAF_REQUEST,
|
|
|
|
route: PATIENT_UCAF_REQUEST,
|
|
|
|
isDisable: patient.patientStatusType != 43 ? true : false,
|
|
|
|
isDisable: widget.patient!.patientStatusType != 43
|
|
|
|
|
|
|
|
? true
|
|
|
|
|
|
|
|
: false,
|
|
|
|
nameLine1: TranslationBase.of(context).patient,
|
|
|
|
nameLine1: TranslationBase.of(context).patient,
|
|
|
|
nameLine2: TranslationBase.of(context).ucaf,
|
|
|
|
nameLine2: TranslationBase.of(context).ucaf,
|
|
|
|
icon: 'assets/images/svgs/profile_screen/UCAF.svg'),
|
|
|
|
icon: 'assets/images/svgs/profile_screen/UCAF.svg'),
|
|
|
|
if (patient.appointmentNo != null && patient.appointmentNo != 0)
|
|
|
|
if (widget.patient!.appointmentNo != null &&
|
|
|
|
|
|
|
|
widget.patient!.appointmentNo != 0)
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.arrivalType,
|
|
|
|
route: REFER_PATIENT_TO_DOCTOR,
|
|
|
|
route: REFER_PATIENT_TO_DOCTOR,
|
|
|
|
isDisable: patient.patientStatusType != 43 ? true : false,
|
|
|
|
isDisable: widget.patient!.patientStatusType != 43
|
|
|
|
|
|
|
|
? true
|
|
|
|
|
|
|
|
: false,
|
|
|
|
nameLine1: TranslationBase.of(context).referral,
|
|
|
|
nameLine1: TranslationBase.of(context).referral,
|
|
|
|
nameLine2: TranslationBase.of(context).patient,
|
|
|
|
nameLine2: TranslationBase.of(context).patient,
|
|
|
|
icon:
|
|
|
|
icon:
|
|
|
|
'assets/images/svgs/profile_screen/refer patient.svg'),
|
|
|
|
'assets/images/svgs/profile_screen/refer patient.svg'),
|
|
|
|
if (patient.appointmentNo != null && patient.appointmentNo != 0)
|
|
|
|
if (widget.patient!.appointmentNo != null &&
|
|
|
|
|
|
|
|
widget.patient!.appointmentNo != 0)
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.arrivalType,
|
|
|
|
route: PATIENT_ADMISSION_REQUEST,
|
|
|
|
route: PATIENT_ADMISSION_REQUEST,
|
|
|
|
isDisable: patient.patientStatusType != 43 ? true : false,
|
|
|
|
isDisable: widget.patient!.patientStatusType != 43
|
|
|
|
|
|
|
|
? true
|
|
|
|
|
|
|
|
: false,
|
|
|
|
nameLine1: TranslationBase.of(context).admission,
|
|
|
|
nameLine1: TranslationBase.of(context).admission,
|
|
|
|
nameLine2: TranslationBase.of(context).request,
|
|
|
|
nameLine2: TranslationBase.of(context).request,
|
|
|
|
icon:
|
|
|
|
icon:
|
|
|
|
'assets/images/svgs/profile_screen/admission req.svg'),
|
|
|
|
'assets/images/svgs/profile_screen/admission req.svg'),
|
|
|
|
if (isInpatient)
|
|
|
|
if (widget.isInpatient)
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.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,
|
|
|
|
icon:
|
|
|
|
icon:
|
|
|
|
'assets/images/svgs/profile_screen/Progress notes.svg'),
|
|
|
|
'assets/images/svgs/profile_screen/Progress notes.svg'),
|
|
|
|
if (isInpatient)
|
|
|
|
if (widget.isInpatient)
|
|
|
|
PatientProfileButton(
|
|
|
|
PatientProfileButton(
|
|
|
|
key: key,
|
|
|
|
key: widget.key,
|
|
|
|
patient: patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
patientType: patientType,
|
|
|
|
patientType: widget.patientType,
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
arrivalType: widget.arrivalType,
|
|
|
|
route: ORDER_NOTE,
|
|
|
|
route: ORDER_NOTE,
|
|
|
|
nameLine1: "Order",
|
|
|
|
nameLine1: "Order",
|
|
|
|
//"Text",
|
|
|
|
//"Text",
|
|
|
|
|