|
|
|
|
@ -71,21 +71,24 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
if ((model.patientLabOrdersList.isNotEmpty &&
|
|
|
|
|
patient.patientStatusType != 43)|| (patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43))
|
|
|
|
|
if ((model.patientLabOrdersList.isNotEmpty && patient.patientStatusType != 43) || (patient.patientStatusType != null && patient.patientStatusType == 43))
|
|
|
|
|
ServiceTitle(
|
|
|
|
|
title: TranslationBase.of(context).lab,
|
|
|
|
|
subTitle: TranslationBase.of(context).result,
|
|
|
|
|
),
|
|
|
|
|
if ((patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43) ||
|
|
|
|
|
(isFromLiveCare && patient.appointmentNo != null))
|
|
|
|
|
|
|
|
|
|
SizedBox(height: 20,),
|
|
|
|
|
!model.isPrincipalCovered_ ? Center(child: AppText(TranslationBase.of(context).principalCoveredOrNot,color: Colors.red, textAlign: TextAlign.center, )) :SizedBox(),
|
|
|
|
|
|
|
|
|
|
AddNewOrder(
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
!model.isPrincipalCovered_
|
|
|
|
|
? Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).principalCoveredOrNot,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
))
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
if ((patient.patientStatusType != null && patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null))
|
|
|
|
|
AddNewOrder(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
@ -123,44 +126,26 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
child: Container(
|
|
|
|
|
width: 20,
|
|
|
|
|
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),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
@ -176,8 +161,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: LaboratoryResultPage(
|
|
|
|
|
patientLabOrders:
|
|
|
|
|
model.patientLabOrdersList[index],
|
|
|
|
|
patientLabOrders: model.patientLabOrdersList[index],
|
|
|
|
|
patient: patient,
|
|
|
|
|
isInpatient: isInpatient,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
@ -185,18 +169,12 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
doctorName:
|
|
|
|
|
Utils.convertToTitleCase(model.patientLabOrdersList[index].doctorName),
|
|
|
|
|
invoiceNO:
|
|
|
|
|
' ${model.patientLabOrdersList[index].invoiceNo}',
|
|
|
|
|
profileUrl: model
|
|
|
|
|
.patientLabOrdersList[index].doctorImageURL,
|
|
|
|
|
branch:
|
|
|
|
|
model.patientLabOrdersList[index].projectName,
|
|
|
|
|
clinic:
|
|
|
|
|
Utils.convertToTitleCase(model.patientLabOrdersList[index].clinicDescription),
|
|
|
|
|
appointmentDate:
|
|
|
|
|
model.patientLabOrdersList[index].createdOn,
|
|
|
|
|
doctorName: Utils.convertToTitleCase(model.patientLabOrdersList[index].doctorName),
|
|
|
|
|
invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}',
|
|
|
|
|
profileUrl: model.patientLabOrdersList[index].doctorImageURL,
|
|
|
|
|
branch: model.patientLabOrdersList[index].projectName,
|
|
|
|
|
clinic: Utils.convertToTitleCase(model.patientLabOrdersList[index].clinicDescription),
|
|
|
|
|
appointmentDate: model.patientLabOrdersList[index].createdOn,
|
|
|
|
|
orderNo: model.patientLabOrdersList[index].orderNo,
|
|
|
|
|
isShowTime: false,
|
|
|
|
|
),
|
|
|
|
|
@ -205,8 +183,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (model.patientLabOrdersList.isEmpty &&
|
|
|
|
|
patient.patientStatusType != 43)
|
|
|
|
|
if (model.patientLabOrdersList.isEmpty && patient.patientStatusType != 43)
|
|
|
|
|
Center(
|
|
|
|
|
child: ErrorMessage(
|
|
|
|
|
error: TranslationBase.of(context).noDataAvailable,
|
|
|
|
|
|