|
|
|
|
@ -39,16 +39,10 @@ class ProcedureScreen extends StatelessWidget {
|
|
|
|
|
bool isInpatient = routeArgs['isInpatient'];
|
|
|
|
|
return BaseView<ProcedureViewModel>(
|
|
|
|
|
onModelReady: (model) {
|
|
|
|
|
model.getProcedure(
|
|
|
|
|
mrn: patient.patientId,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
appointmentNo: patient.appointmentNo);
|
|
|
|
|
model.getProcedure(mrn: patient.patientId, patientType: patientType, appointmentNo: patient.appointmentNo);
|
|
|
|
|
model.isPrincipalCovered(patient: patient);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
builder: (BuildContext context, ProcedureViewModel model, Widget? child) =>
|
|
|
|
|
AppScaffold(
|
|
|
|
|
builder: (BuildContext context, ProcedureViewModel model, Widget? child) => AppScaffold(
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
backgroundColor: Colors.grey[100]!,
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
@ -64,23 +58,16 @@ class ProcedureScreen extends StatelessWidget {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
if ((model.procedureList.length == 0 &&
|
|
|
|
|
patient.patientStatusType != 43) ||
|
|
|
|
|
patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43)
|
|
|
|
|
if ((model.procedureList.length == 0 && patient.patientStatusType != 43) || patient.patientStatusType != null && patient.patientStatusType == 43)
|
|
|
|
|
ServiceTitle(
|
|
|
|
|
title: TranslationBase.of(context).orderTestOr,
|
|
|
|
|
subTitle: TranslationBase.of(context).procedure,
|
|
|
|
|
),
|
|
|
|
|
if ((patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43) ||
|
|
|
|
|
(isFromLiveCare && patient.appointmentNo != null))
|
|
|
|
|
if ((patient.patientStatusType != null && patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null))
|
|
|
|
|
AddNewOrder(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await model.getProcedureTemplate(
|
|
|
|
|
categoryID: ProcedureType.PROCEDURE.getCategoryId(),
|
|
|
|
|
isLocalBusy: true);
|
|
|
|
|
await model.getProcedureTemplate(categoryID: ProcedureType.PROCEDURE.getCategoryId(), isLocalBusy: true);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
|
@ -96,9 +83,17 @@ class ProcedureScreen extends StatelessWidget {
|
|
|
|
|
},
|
|
|
|
|
label: TranslationBase.of(context).addMoreProcedure,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
!model.isPrincipalCovered_ ? Center(child: AppText(TranslationBase.of(context).principalCoveredOrNot,color: Colors.red, textAlign: TextAlign.center, )) :SizedBox(),
|
|
|
|
|
SizedBox(height: 20,),
|
|
|
|
|
!model.isPrincipalCovered_
|
|
|
|
|
? Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).principalCoveredOrNot,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
))
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
if (model.procedureList.isNotEmpty)
|
|
|
|
|
ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
@ -107,45 +102,28 @@ class ProcedureScreen extends StatelessWidget {
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
|
|
|
return ProcedureCard(
|
|
|
|
|
categoryID: model
|
|
|
|
|
.procedureList[0].entityList![index].categoryID,
|
|
|
|
|
categoryID: model.procedureList[0].entityList![index].categoryID,
|
|
|
|
|
entityList: model.procedureList[0].entityList![index],
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (model.procedureList[0].entityList![index]
|
|
|
|
|
.categoryID ==
|
|
|
|
|
2 ||
|
|
|
|
|
model.procedureList[0].entityList![index]
|
|
|
|
|
.categoryID ==
|
|
|
|
|
4)
|
|
|
|
|
if (model.procedureList[0].entityList![index].categoryID == 2 || model.procedureList[0].entityList![index].categoryID == 4)
|
|
|
|
|
updateProcedureForm(
|
|
|
|
|
context,
|
|
|
|
|
model: model,
|
|
|
|
|
patient: patient,
|
|
|
|
|
remarks: model.procedureList[0]
|
|
|
|
|
.entityList![index].remarks!,
|
|
|
|
|
orderType: model.procedureList[0]
|
|
|
|
|
.entityList![index].orderType
|
|
|
|
|
.toString(),
|
|
|
|
|
orderNo: model.procedureList[0]
|
|
|
|
|
.entityList![index].orderNo!,
|
|
|
|
|
procedureName: model.procedureList[0]
|
|
|
|
|
.entityList![index].procedureName!,
|
|
|
|
|
categoreId: model.procedureList[0]
|
|
|
|
|
.entityList![index].categoryID
|
|
|
|
|
.toString(),
|
|
|
|
|
procedureId: model.procedureList[0]
|
|
|
|
|
.entityList![index].procedureId!,
|
|
|
|
|
limetNo: model.procedureList[0]
|
|
|
|
|
.entityList![index].lineItemNo!,
|
|
|
|
|
remarks: model.procedureList[0].entityList![index].remarks!,
|
|
|
|
|
orderType: model.procedureList[0].entityList![index].orderType.toString(),
|
|
|
|
|
orderNo: model.procedureList[0].entityList![index].orderNo!,
|
|
|
|
|
procedureName: model.procedureList[0].entityList![index].procedureName!,
|
|
|
|
|
categoreId: model.procedureList[0].entityList![index].categoryID.toString(),
|
|
|
|
|
procedureId: model.procedureList[0].entityList![index].procedureId!,
|
|
|
|
|
limetNo: model.procedureList[0].entityList![index].lineItemNo!,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
patient: patient,
|
|
|
|
|
doctorID: model.doctorProfile?.doctorID,
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
if (model.state == ViewState.ErrorLocal ||
|
|
|
|
|
(model.procedureList.isNotEmpty &&
|
|
|
|
|
model.procedureList[0].entityList!.isEmpty))
|
|
|
|
|
if (model.state == ViewState.ErrorLocal || (model.procedureList.isNotEmpty && model.procedureList[0].entityList!.isEmpty))
|
|
|
|
|
Center(
|
|
|
|
|
child: ErrorMessage(
|
|
|
|
|
error: TranslationBase.of(context).noDataAvailable,
|
|
|
|
|
|