|
|
|
|
@ -29,7 +29,6 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
bool isInpatient;
|
|
|
|
|
bool isFromLiveCare;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void didChangeDependencies() {
|
|
|
|
|
super.didChangeDependencies();
|
|
|
|
|
@ -66,8 +65,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
if (model.patientLabOrdersList.isNotEmpty &&
|
|
|
|
|
patient.patientStatusType != 43)
|
|
|
|
|
if (model.patientLabOrdersList.isNotEmpty && patient.patientStatusType != 43)
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -87,8 +85,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43)
|
|
|
|
|
if (patient.patientStatusType != null && patient.patientStatusType == 43)
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -108,8 +105,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if ((patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43) ||
|
|
|
|
|
if ((patient.patientStatusType != null && patient.patientStatusType == 43) ||
|
|
|
|
|
(isFromLiveCare && patient.appointmentNo != null))
|
|
|
|
|
AddNewOrder(
|
|
|
|
|
onTap: () {
|
|
|
|
|
@ -146,37 +142,26 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
width: 20,
|
|
|
|
|
height: 160,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: model.patientLabOrdersList[index]
|
|
|
|
|
.isLiveCareAppointment
|
|
|
|
|
color: model.patientLabOrdersList[index].isLiveCareAppointment
|
|
|
|
|
? Colors.red[900]
|
|
|
|
|
: !model.patientLabOrdersList[index]
|
|
|
|
|
.isInOutPatient
|
|
|
|
|
: !model.patientLabOrdersList[index].isInOutPatient
|
|
|
|
|
? Colors.black
|
|
|
|
|
: Color(0xffa9a089),
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: projectViewModel.isArabic? Radius.circular(0):Radius.circular(8),
|
|
|
|
|
bottomLeft: projectViewModel.isArabic? Radius.circular(0):Radius.circular(8),
|
|
|
|
|
topRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0),
|
|
|
|
|
bottomRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0)
|
|
|
|
|
),
|
|
|
|
|
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
|
|
|
|
|
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
|
|
|
|
|
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
|
|
|
|
|
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
|
|
|
|
|
),
|
|
|
|
|
child: RotatedBox(
|
|
|
|
|
quarterTurns: 3,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
model.patientLabOrdersList[index]
|
|
|
|
|
.isLiveCareAppointment
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.liveCare
|
|
|
|
|
.toUpperCase()
|
|
|
|
|
: !model.patientLabOrdersList[index]
|
|
|
|
|
.isInOutPatient
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.inPatientLabel
|
|
|
|
|
.toUpperCase()
|
|
|
|
|
: TranslationBase.of(context)
|
|
|
|
|
.outpatient
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
model.patientLabOrdersList[index].isLiveCareAppointment
|
|
|
|
|
? TranslationBase.of(context).liveCare.toUpperCase()
|
|
|
|
|
: !model.patientLabOrdersList[index].isInOutPatient
|
|
|
|
|
? TranslationBase.of(context).inPatientLabel.toUpperCase()
|
|
|
|
|
: TranslationBase.of(context).outpatient.toUpperCase(),
|
|
|
|
|
style: TextStyle(color: Colors.white),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
@ -190,24 +175,18 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
page: LaboratoryResultPage(
|
|
|
|
|
patientLabOrders: model.patientLabOrdersList[index],
|
|
|
|
|
patient: patient,
|
|
|
|
|
isInpatient:isInpatient,
|
|
|
|
|
isInpatient: isInpatient,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
doctorName:
|
|
|
|
|
model.patientLabOrdersList[index].doctorName,
|
|
|
|
|
invoiceNO:
|
|
|
|
|
' ${model.patientLabOrdersList[index].invoiceNo}',
|
|
|
|
|
profileUrl: model
|
|
|
|
|
.patientLabOrdersList[index].doctorImageURL,
|
|
|
|
|
branch:
|
|
|
|
|
model.patientLabOrdersList[index].projectName,
|
|
|
|
|
clinic: model
|
|
|
|
|
.patientLabOrdersList[index].clinicDescription,
|
|
|
|
|
appointmentDate:
|
|
|
|
|
model.patientLabOrdersList[index].orderDate.add(Duration(days: 1)),
|
|
|
|
|
doctorName: model.patientLabOrdersList[index].doctorName,
|
|
|
|
|
invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}',
|
|
|
|
|
profileUrl: model.patientLabOrdersList[index].doctorImageURL,
|
|
|
|
|
branch: model.patientLabOrdersList[index].projectName,
|
|
|
|
|
clinic: model.patientLabOrdersList[index].clinicDescription,
|
|
|
|
|
appointmentDate: model.patientLabOrdersList[index].orderDate,
|
|
|
|
|
orderNo: model.patientLabOrdersList[index].orderNo,
|
|
|
|
|
isShowTime: false,
|
|
|
|
|
),
|
|
|
|
|
@ -216,8 +195,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (model.patientLabOrdersList.isEmpty &&
|
|
|
|
|
patient.patientStatusType != 43)
|
|
|
|
|
if (model.patientLabOrdersList.isEmpty && patient.patientStatusType != 43)
|
|
|
|
|
Center(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
|