|
|
|
|
@ -20,8 +20,9 @@ class LaboratoryResultWidget extends StatefulWidget {
|
|
|
|
|
final String? projectName;
|
|
|
|
|
final PatientLabOrders? patientLabOrder;
|
|
|
|
|
final bool showConfirmMessageDialog;
|
|
|
|
|
final LabsViewModel labmodel;
|
|
|
|
|
|
|
|
|
|
const LaboratoryResultWidget({Key? key, this.onTap, this.billNo, this.details, this.orderNo, this.projectName, this.patientLabOrder, this.showConfirmMessageDialog = true}) : super(key: key);
|
|
|
|
|
const LaboratoryResultWidget({Key? key, this.onTap, this.billNo, this.details, this.orderNo, this.projectName, this.patientLabOrder, this.showConfirmMessageDialog = true,required this.labmodel}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_LaboratoryResultWidgetState createState() => _LaboratoryResultWidgetState();
|
|
|
|
|
@ -37,8 +38,10 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
this.model = widget.labmodel;
|
|
|
|
|
|
|
|
|
|
labSpecialResult = widget.details ?? TranslationBase.of(context).noDataAvailable;
|
|
|
|
|
print("the details are ${widget.details}");
|
|
|
|
|
labSpecialResult = widget.details;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -67,21 +70,24 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
|
|
|
|
|
isTabletScreen = isTablet(context);
|
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
return BaseView<LabsViewModel>(
|
|
|
|
|
onModelReady: (model) {
|
|
|
|
|
this.model = model;
|
|
|
|
|
model.getPatientLabResult(isVidaPlus: Utils.isVidaPlusProject(projectViewModel, int.parse(widget.patientLabOrder!.projectID!)), patientLabOrder: widget.patientLabOrder!, isTablet: isTabletScreen);
|
|
|
|
|
onModelReady: (_) {
|
|
|
|
|
print("the length of in on model Ready ${model?.patientLabSpecialResult.length}");
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
|
model?.getPatientLabResult(isVidaPlus: Utils.isVidaPlusProject(projectViewModel, int.parse(widget.patientLabOrder!.projectID!)), patientLabOrder: widget.patientLabOrder!, isTablet: isTabletScreen);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) => NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
builder: (_, __, w) => NetworkBaseView(
|
|
|
|
|
baseViewModel: widget.labmodel,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: [
|
|
|
|
|
_buildDoctorHeader(),
|
|
|
|
|
SizedBox(height: 10),
|
|
|
|
|
if (model.labResultLists.isNotEmpty)
|
|
|
|
|
if (this.model?.labResultLists.isNotEmpty == true)
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(21.0),
|
|
|
|
|
child: _buildLabResultsList(model),
|
|
|
|
|
child: _buildLabResultsList(model!),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// Expanded(
|
|
|
|
|
|