Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into fix_refere_desgin
commit
505c3f470f
@ -1,574 +0,0 @@
|
|||||||
import 'package:doctor_app_flutter/config/config.dart';
|
|
||||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/SOAP/order-procedure.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
||||||
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
|
|
||||||
import 'package:doctor_app_flutter/utils/utils.dart';
|
|
||||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
|
||||||
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
||||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:hexcolor/hexcolor.dart';
|
|
||||||
|
|
||||||
import '../../../../routes.dart';
|
|
||||||
|
|
||||||
class UcafDetailScreen extends StatefulWidget {
|
|
||||||
final PatiantInformtion patient;
|
|
||||||
final UcafViewModel model;
|
|
||||||
final Function changeLoadingState;
|
|
||||||
|
|
||||||
UcafDetailScreen(this.patient, this.model, {this.changeLoadingState});
|
|
||||||
|
|
||||||
@override
|
|
||||||
_UcafDetailScreenState createState() =>
|
|
||||||
_UcafDetailScreenState(this.patient, this.model);
|
|
||||||
}
|
|
||||||
|
|
||||||
class _UcafDetailScreenState extends State<UcafDetailScreen> {
|
|
||||||
final PatiantInformtion patient;
|
|
||||||
final UcafViewModel model;
|
|
||||||
|
|
||||||
UcafViewModel ucafModel;
|
|
||||||
|
|
||||||
int _activeTap = 0;
|
|
||||||
|
|
||||||
_UcafDetailScreenState(this.patient, this.model);
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
model.saveUCAFOnTap = () async {
|
|
||||||
widget.changeLoadingState(true);
|
|
||||||
await ucafModel.postUCAF(patient);
|
|
||||||
widget.changeLoadingState(false);
|
|
||||||
if (ucafModel.state == ViewState.Idle) {
|
|
||||||
DrAppToastMsg.showSuccesToast(
|
|
||||||
TranslationBase.of(context).postUcafSuccessMsg);
|
|
||||||
Navigator.of(context).popUntil((route) {
|
|
||||||
return route.settings.name == PATIENTS_PROFILE;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
DrAppToastMsg.showErrorToast(ucafModel.error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final screenSize = MediaQuery.of(context).size;
|
|
||||||
|
|
||||||
return BaseView<UcafViewModel>(
|
|
||||||
onModelReady: (model) async {
|
|
||||||
ucafModel = model;
|
|
||||||
model.resetDataInFirst(firstPage: false);
|
|
||||||
await model.getLanguage();
|
|
||||||
await model.getPatientAssessment(patient);
|
|
||||||
widget.changeLoadingState(false);
|
|
||||||
},
|
|
||||||
builder: (_, model, w) => AppScaffold(
|
|
||||||
baseViewModel: model,
|
|
||||||
isShowAppBar: false,
|
|
||||||
body: Column(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.symmetric(
|
|
||||||
vertical: 16, horizontal: 16),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
treatmentStepsBar(
|
|
||||||
context, model, screenSize, patient),
|
|
||||||
SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
...getSelectedTreatmentStepItem(
|
|
||||||
context, model),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget treatmentStepsBar(BuildContext _context, UcafViewModel model,
|
|
||||||
Size screenSize, PatiantInformtion patient) {
|
|
||||||
List<String> __treatmentSteps = [
|
|
||||||
TranslationBase.of(context).diagnosis.toUpperCase(),
|
|
||||||
TranslationBase.of(context).medications.toUpperCase(),
|
|
||||||
TranslationBase.of(context).procedures.toUpperCase(),
|
|
||||||
];
|
|
||||||
return Container(
|
|
||||||
height: screenSize.height * 0.070,
|
|
||||||
decoration: Utils.containerBorderDecoration(
|
|
||||||
Color(0Xffffffff), Color(0xFFCCCCCC)),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: __treatmentSteps.map((item) {
|
|
||||||
bool _isActive = __treatmentSteps[_activeTap] == item ? true : false;
|
|
||||||
return Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
child: Center(
|
|
||||||
child: Container(
|
|
||||||
height: screenSize.height * 0.070,
|
|
||||||
decoration: Utils.containerBorderDecoration(
|
|
||||||
_isActive ? HexColor("#B8382B") : Colors.white,
|
|
||||||
_isActive ? HexColor("#B8382B") : Colors.white),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
item,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
color: _isActive
|
|
||||||
? Colors.white
|
|
||||||
: Colors.black, //Colors.black,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
onTap: () async {
|
|
||||||
print(__treatmentSteps.indexOf(item));
|
|
||||||
if (__treatmentSteps.indexOf(item) == 0) {
|
|
||||||
widget.changeLoadingState(true);
|
|
||||||
await model.getPatientAssessment(patient);
|
|
||||||
widget.changeLoadingState(false);
|
|
||||||
} else if (__treatmentSteps.indexOf(item) == 1) {
|
|
||||||
widget.changeLoadingState(true);
|
|
||||||
await model.getPrescription(patient);
|
|
||||||
widget.changeLoadingState(false);
|
|
||||||
}
|
|
||||||
if (__treatmentSteps.indexOf(item) == 2) {
|
|
||||||
widget.changeLoadingState(true);
|
|
||||||
await model.getOrderProcedures(patient);
|
|
||||||
widget.changeLoadingState(false);
|
|
||||||
}
|
|
||||||
setState(() {
|
|
||||||
_activeTap = __treatmentSteps.indexOf(item);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Widget> getSelectedTreatmentStepItem(
|
|
||||||
BuildContext _context, UcafViewModel model) {
|
|
||||||
switch (_activeTap) {
|
|
||||||
case 0:
|
|
||||||
if (model.patientAssessmentList != null) {
|
|
||||||
return [
|
|
||||||
ListView.builder(
|
|
||||||
itemCount: model.patientAssessmentList.length,
|
|
||||||
scrollDirection: Axis.vertical,
|
|
||||||
physics: ScrollPhysics(),
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
return DiagnosisWidget(
|
|
||||||
model, model.patientAssessmentList[index]);
|
|
||||||
})
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
return [
|
|
||||||
Container(),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
return [
|
|
||||||
ListView.builder(
|
|
||||||
itemCount: model.prescriptionList != null
|
|
||||||
? model.prescriptionList.entityList.length
|
|
||||||
: 0,
|
|
||||||
scrollDirection: Axis.vertical,
|
|
||||||
physics: ScrollPhysics(),
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
return MedicationWidget(
|
|
||||||
model, model.prescriptionList.entityList[index]);
|
|
||||||
})
|
|
||||||
];
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
if (model.orderProcedures != null) {
|
|
||||||
return [
|
|
||||||
ListView.builder(
|
|
||||||
itemCount: model.orderProcedures.length,
|
|
||||||
scrollDirection: Axis.vertical,
|
|
||||||
physics: ScrollPhysics(),
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
return ProceduresWidget(model, model.orderProcedures[index]);
|
|
||||||
})
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
return [
|
|
||||||
Container(),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return [
|
|
||||||
Container(),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class DiagnosisWidget extends StatelessWidget {
|
|
||||||
final UcafViewModel model;
|
|
||||||
final GetAssessmentResModel diagnosis;
|
|
||||||
|
|
||||||
DiagnosisWidget(this.model, this.diagnosis);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
MasterKeyModel diagnosisType = model.findMasterDataById(
|
|
||||||
masterKeys: MasterKeysService.DiagnosisType,
|
|
||||||
id: diagnosis.diagnosisTypeID);
|
|
||||||
MasterKeyModel diagnosisCondition = model.findMasterDataById(
|
|
||||||
masterKeys: MasterKeysService.DiagnosisCondition,
|
|
||||||
id: diagnosis.conditionID);
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).diagnoseType}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
diagnosisType != null
|
|
||||||
? model.selectedLanguage == 'ar'
|
|
||||||
? diagnosisType.nameAr
|
|
||||||
: diagnosisType.nameEn
|
|
||||||
: "-",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
diagnosis.asciiDesc,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).condition}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${diagnosisCondition != null ? model.selectedLanguage == 'ar' ? diagnosisCondition.nameAr : diagnosisCondition.nameEn : "-"}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).icd}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${diagnosis.icdCode10ID}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
const Divider(
|
|
||||||
color: Color(0xffCCCCCC),
|
|
||||||
height: 1,
|
|
||||||
thickness: 1,
|
|
||||||
indent: 0,
|
|
||||||
endIndent: 0,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class MedicationWidget extends StatelessWidget {
|
|
||||||
final UcafViewModel model;
|
|
||||||
final PrescriptionEntityModel prescription;
|
|
||||||
|
|
||||||
MedicationWidget(this.model, this.prescription);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).id}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${prescription.medicineCode}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 16,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).price}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${prescription.medicationPrice}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 16,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).quantity}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${prescription.quantity}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).durDays}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${prescription.doseDurationDays}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
"${prescription.medicationName}",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
"${prescription.doseDetail}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
const Divider(
|
|
||||||
color: Color(0xffCCCCCC),
|
|
||||||
height: 1,
|
|
||||||
thickness: 1,
|
|
||||||
indent: 0,
|
|
||||||
endIndent: 0,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ProceduresWidget extends StatelessWidget {
|
|
||||||
final UcafViewModel model;
|
|
||||||
final OrderProcedure procedure;
|
|
||||||
|
|
||||||
ProceduresWidget(this.model, this.procedure);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).codeNo}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
procedure.achiCode,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).quantity}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${procedure.lineItemNo}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
procedure.procedureName,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).covered}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${procedure.isCovered}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
color: procedure.isCovered ? AppGlobal.appGreenColor : Colors.red,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 16,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).approvalRequired}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${procedure.isApprovalRequired}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).uncoveredByDoctor}: ",
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${procedure.isUncoveredByDoctor}",
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
const Divider(
|
|
||||||
color: Color(0xffCCCCCC),
|
|
||||||
height: 1,
|
|
||||||
thickness: 1,
|
|
||||||
indent: 0,
|
|
||||||
endIndent: 0,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,393 +0,0 @@
|
|||||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
|
|
||||||
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
||||||
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
|
||||||
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
||||||
import 'package:doctor_app_flutter/utils/utils.dart';
|
|
||||||
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
|
||||||
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
||||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
||||||
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
import '../../../../widgets/shared/errors/error_message.dart';
|
|
||||||
|
|
||||||
class UCAFInputScreen extends StatefulWidget {
|
|
||||||
final PatiantInformtion patient;
|
|
||||||
final Function changeLoadingState;
|
|
||||||
|
|
||||||
UCAFInputScreen(this.patient, {this.changeLoadingState});
|
|
||||||
|
|
||||||
@override
|
|
||||||
_UCAFInputScreenState createState() => _UCAFInputScreenState(this.patient);
|
|
||||||
}
|
|
||||||
|
|
||||||
class _UCAFInputScreenState extends State<UCAFInputScreen> {
|
|
||||||
final PatiantInformtion patient;
|
|
||||||
|
|
||||||
_UCAFInputScreenState(this.patient);
|
|
||||||
|
|
||||||
bool _inPatient = false;
|
|
||||||
bool _emergencyCase = false;
|
|
||||||
final _durationOfIllnessController = TextEditingController();
|
|
||||||
final _additionalComplaintsController = TextEditingController();
|
|
||||||
final _otherController = TextEditingController();
|
|
||||||
final _howController = TextEditingController();
|
|
||||||
final _whenController = TextEditingController();
|
|
||||||
final _whereController = TextEditingController();
|
|
||||||
final _managementsLineController = TextEditingController();
|
|
||||||
final _signsController = TextEditingController();
|
|
||||||
|
|
||||||
///TODO Elham* fix this
|
|
||||||
List<Map> conditionsData = [
|
|
||||||
{"name": "CHRONIC", "isChecked": false},
|
|
||||||
{"name": "RTA", "isChecked": false},
|
|
||||||
{"name": "PSYCHIATRIC", "isChecked": false},
|
|
||||||
{"name": "WORK RELATED", "isChecked": false},
|
|
||||||
{"name": "VACCINATION", "isChecked": false},
|
|
||||||
{"name": "CONGENITAL", "isChecked": false},
|
|
||||||
{"name": "INFERTILITY", "isChecked": false},
|
|
||||||
{"name": "CHECK-UP", "isChecked": false},
|
|
||||||
{"name": "PREGNANCY/INDICATE MP", "isChecked": false},
|
|
||||||
{"name": "CLEANING", "isChecked": false},
|
|
||||||
{"name": "ORTHO DONTICS", "isChecked": false},
|
|
||||||
{"name": "SPORTS RELATED", "isChecked": false},
|
|
||||||
{"name": "REGULAR DENTAL TREATMENT", "isChecked": false},
|
|
||||||
{"name": "IS TRAUMA TREATMENT SPECIFY ETA", "isChecked": false},
|
|
||||||
];
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return BaseView<UcafViewModel>(
|
|
||||||
onModelReady: (model) async {
|
|
||||||
model.resetDataInFirst();
|
|
||||||
await model.getUCAFData(patient);
|
|
||||||
widget.changeLoadingState(false);
|
|
||||||
},
|
|
||||||
builder: (_, model, w) => AppScaffold(
|
|
||||||
baseViewModel: model,
|
|
||||||
isShowAppBar: false,
|
|
||||||
body: model.patientVitalSignsHistory != null &&
|
|
||||||
model.patientVitalSignsHistory.length > 0 &&
|
|
||||||
model.patientChiefComplaintList != null &&
|
|
||||||
model.patientChiefComplaintList.length > 0
|
|
||||||
? Column(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
// PatientHeaderWidgetNoAvatar(patient),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.symmetric(
|
|
||||||
vertical: 0, horizontal: 16),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
/*CheckboxListTile(
|
|
||||||
title: AppText(
|
|
||||||
TranslationBase.of(context).inPatient,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.2,
|
|
||||||
),
|
|
||||||
value: _inPatient,
|
|
||||||
onChanged: (newValue) {
|
|
||||||
setState(() {
|
|
||||||
_inPatient = newValue;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
activeColor: HexColor("#D02127"),
|
|
||||||
controlAffinity:
|
|
||||||
ListTileControlAffinity.leading,
|
|
||||||
contentPadding: EdgeInsets.all(0),
|
|
||||||
),
|
|
||||||
CheckboxListTile(
|
|
||||||
title: AppText(
|
|
||||||
TranslationBase.of(context).emergencyCase,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.2,
|
|
||||||
),
|
|
||||||
value: _emergencyCase,
|
|
||||||
onChanged: (newValue) {
|
|
||||||
setState(() {
|
|
||||||
_emergencyCase = newValue;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
activeColor: HexColor("#D02127"),
|
|
||||||
controlAffinity:
|
|
||||||
ListTileControlAffinity.leading,
|
|
||||||
contentPadding: EdgeInsets.all(0),
|
|
||||||
),
|
|
||||||
AppTextFieldCustom(
|
|
||||||
hintText: TranslationBase.of(context)
|
|
||||||
.durationOfIllness,
|
|
||||||
dropDownText: "3",
|
|
||||||
inputType: TextInputType.number,
|
|
||||||
inputFormatters: [
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp(ONLY_NUMBERS))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),*/
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
DoctorApp.warning,
|
|
||||||
size: 20,
|
|
||||||
color: Color(0xFFCC9B14),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 8,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"BP (H/L)",
|
|
||||||
fontSize:
|
|
||||||
SizeConfig.textMultiplier * 1.8,
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 8,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${model.bloodPressure}",
|
|
||||||
fontSize:
|
|
||||||
SizeConfig.textMultiplier * 2,
|
|
||||||
color: Colors.grey.shade800,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 6,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).temperature}",
|
|
||||||
fontSize:
|
|
||||||
SizeConfig.textMultiplier * 1.8,
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 4,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: AppText(
|
|
||||||
"${model.temperatureCelcius}(C), ${(double.parse(model.temperatureCelcius) * (9 / 5) + 32).toStringAsFixed(2)}(F)",
|
|
||||||
fontSize:
|
|
||||||
SizeConfig.textMultiplier * 2,
|
|
||||||
color: Colors.grey.shade800,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 2,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
AppText(
|
|
||||||
"${TranslationBase.of(context).pulseBeats}:",
|
|
||||||
fontSize:
|
|
||||||
SizeConfig.textMultiplier * 1.8,
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 4,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
"${model.hartRat}",
|
|
||||||
fontSize:
|
|
||||||
SizeConfig.textMultiplier * 2,
|
|
||||||
color: Colors.grey.shade800,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
TranslationBase.of(context)
|
|
||||||
.chiefComplaintsAndSymptoms,
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.2,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
color: Color(0xFF2E303A),
|
|
||||||
),
|
|
||||||
/* SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
TranslationBase.of(context)
|
|
||||||
.patientFeelsPainInHisBackAndCough,
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
color: Color(0xFF575757),
|
|
||||||
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
||||||
),*/
|
|
||||||
SizedBox(
|
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
AppTextFieldCustom(
|
|
||||||
hintText:
|
|
||||||
TranslationBase.of(context).instruction,
|
|
||||||
dropDownText: Utils.parseHtmlString(model
|
|
||||||
.patientChiefComplaintList[0]
|
|
||||||
.chiefComplaint),
|
|
||||||
controller: _additionalComplaintsController,
|
|
||||||
inputType: TextInputType.multiline,
|
|
||||||
enabled: false,
|
|
||||||
minLines: 1,
|
|
||||||
maxLines: 20,
|
|
||||||
),
|
|
||||||
/*SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
TranslationBase.of(context).otherConditions,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.1,
|
|
||||||
color: Color(0xFF2E303A),
|
|
||||||
),
|
|
||||||
...List.generate(
|
|
||||||
conditionsData.length,
|
|
||||||
(index) => CheckboxListTile(
|
|
||||||
title: AppText(
|
|
||||||
conditionsData[index]['name'],
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize:
|
|
||||||
SizeConfig.textMultiplier * 2.1,
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
),
|
|
||||||
value: conditionsData[index]
|
|
||||||
['isChecked'],
|
|
||||||
onChanged: (newValue) {
|
|
||||||
setState(() {
|
|
||||||
conditionsData[index]
|
|
||||||
['isChecked'] = newValue;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
controlAffinity:
|
|
||||||
ListTileControlAffinity.leading,
|
|
||||||
contentPadding: EdgeInsets.all(0),
|
|
||||||
)),*/
|
|
||||||
SizedBox(
|
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
/* AppTextFieldCustom(
|
|
||||||
hintText: TranslationBase.of(context).other,
|
|
||||||
dropDownText: TranslationBase.of(context).none,
|
|
||||||
enabled: false,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
AppTextFieldCustom(
|
|
||||||
hintText: TranslationBase.of(context).how,
|
|
||||||
dropDownText: TranslationBase.of(context).none,
|
|
||||||
enabled: false,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: AppTextFieldCustom(
|
|
||||||
hintText:
|
|
||||||
TranslationBase.of(context).when,
|
|
||||||
dropDownText: TranslationBase.of(context).none,
|
|
||||||
enabled: false,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 4,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: AppTextFieldCustom(
|
|
||||||
hintText:
|
|
||||||
TranslationBase.of(context).where,
|
|
||||||
dropDownText: TranslationBase.of(context).none,
|
|
||||||
enabled: false,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
AppTextFieldCustom(
|
|
||||||
height: screenSize.height * 0.1,
|
|
||||||
hintText: TranslationBase.of(context)
|
|
||||||
.specifyPossibleLineManagement,
|
|
||||||
dropDownText: TranslationBase.of(context).none,
|
|
||||||
enabled: false,
|
|
||||||
minLines: 4,
|
|
||||||
maxLines: 6,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 26,
|
|
||||||
),
|
|
||||||
AppText(
|
|
||||||
TranslationBase.of(context).significantSigns,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
fontSize: SizeConfig.textMultiplier * 2.2,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 8,
|
|
||||||
),
|
|
||||||
AppTextFieldCustom(
|
|
||||||
height: screenSize.height * 0.1,
|
|
||||||
hintText:
|
|
||||||
TranslationBase.of(context).backAbdomen,
|
|
||||||
dropDownText: "BackLNeck",
|
|
||||||
enabled: false,
|
|
||||||
),*/
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: model.patientChiefComplaintList != null ||
|
|
||||||
model.patientVitalSignsHistory != null
|
|
||||||
? Center(
|
|
||||||
child: ErrorMessage(
|
|
||||||
error: model.patientVitalSignsHistory == null ||
|
|
||||||
model.patientVitalSignsHistory.length == 0
|
|
||||||
? TranslationBase.of(context).vitalSignEmptyMsg
|
|
||||||
: TranslationBase.of(context).chiefComplaintEmptyMsg))
|
|
||||||
: Container(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,229 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/widgets/diagnosis_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/widgets/medication_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/widgets/pocedures_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/tab_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../../../routes.dart';
|
||||||
|
|
||||||
|
class UcafDetailScreen extends StatefulWidget {
|
||||||
|
final PatiantInformtion patient;
|
||||||
|
final UcafViewModel model;
|
||||||
|
final Function changeLoadingState;
|
||||||
|
|
||||||
|
UcafDetailScreen(this.patient, this.model, {this.changeLoadingState});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_UcafDetailScreenState createState() =>
|
||||||
|
_UcafDetailScreenState(this.patient, this.model);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _UcafDetailScreenState extends State<UcafDetailScreen> {
|
||||||
|
final PatiantInformtion patient;
|
||||||
|
final UcafViewModel model;
|
||||||
|
|
||||||
|
UcafViewModel ucafModel;
|
||||||
|
|
||||||
|
int _activeTap = 0;
|
||||||
|
|
||||||
|
_UcafDetailScreenState(this.patient, this.model);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
model.saveUCAFOnTap = () async {
|
||||||
|
widget.changeLoadingState(true);
|
||||||
|
await ucafModel.postUCAF(patient);
|
||||||
|
widget.changeLoadingState(false);
|
||||||
|
if (ucafModel.state == ViewState.Idle) {
|
||||||
|
DrAppToastMsg.showSuccesToast(
|
||||||
|
TranslationBase.of(context).postUcafSuccessMsg);
|
||||||
|
Navigator.of(context).popUntil((route) {
|
||||||
|
return route.settings.name == PATIENTS_PROFILE;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
DrAppToastMsg.showErrorToast(ucafModel.error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
return BaseView<UcafViewModel>(
|
||||||
|
onModelReady: (model) async {
|
||||||
|
ucafModel = model;
|
||||||
|
model.resetDataInFirst(firstPage: false);
|
||||||
|
await model.getLanguage();
|
||||||
|
await model.getPatientAssessment(patient);
|
||||||
|
widget.changeLoadingState(false);
|
||||||
|
},
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
treatmentStepsBar(
|
||||||
|
context, model, screenSize, patient),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.symmetric(
|
||||||
|
vertical: 16, horizontal: 16),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
...getSelectedTreatmentStepItem(
|
||||||
|
context, model),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget treatmentStepsBar(BuildContext _context, UcafViewModel model,
|
||||||
|
Size screenSize, PatiantInformtion patient) {
|
||||||
|
ProjectViewModel projectViewModel= Provider.of(context);
|
||||||
|
List<String> __treatmentSteps = [
|
||||||
|
TranslationBase.of(context).diagnosis,
|
||||||
|
TranslationBase.of(context).medications,
|
||||||
|
TranslationBase.of(context).procedures,
|
||||||
|
];
|
||||||
|
return Container(
|
||||||
|
height: TabUtils.getTabHeight(context),
|
||||||
|
decoration: TabUtils.getBoxTabsBoxDecoration(projectViewModel: projectViewModel),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: __treatmentSteps.map((item) {
|
||||||
|
bool _isActive = __treatmentSteps[_activeTap] == item ? true : false;
|
||||||
|
return Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
height: screenSize.height * 0.070,
|
||||||
|
decoration: TabUtils.getBoxTabsBoxDecoration(projectViewModel: projectViewModel, isActive:_isActive, isFirst:__treatmentSteps.indexOf(item) == 0, isLast: __treatmentSteps.indexOf(item) == 2, isMiddle: __treatmentSteps.indexOf(item) == 1 ),
|
||||||
|
child: Center(
|
||||||
|
child: TabUtils.getTabText(title: item, isActive: _isActive)
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
onTap: () async {
|
||||||
|
print(__treatmentSteps.indexOf(item));
|
||||||
|
if (__treatmentSteps.indexOf(item) == 0) {
|
||||||
|
widget.changeLoadingState(true);
|
||||||
|
await model.getPatientAssessment(patient);
|
||||||
|
widget.changeLoadingState(false);
|
||||||
|
} else if (__treatmentSteps.indexOf(item) == 1) {
|
||||||
|
widget.changeLoadingState(true);
|
||||||
|
await model.getPrescription(patient);
|
||||||
|
widget.changeLoadingState(false);
|
||||||
|
}
|
||||||
|
if (__treatmentSteps.indexOf(item) == 2) {
|
||||||
|
widget.changeLoadingState(true);
|
||||||
|
await model.getOrderProcedures(patient);
|
||||||
|
widget.changeLoadingState(false);
|
||||||
|
}
|
||||||
|
setState(() {
|
||||||
|
_activeTap = __treatmentSteps.indexOf(item);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Widget> getSelectedTreatmentStepItem(
|
||||||
|
BuildContext _context, UcafViewModel model) {
|
||||||
|
switch (_activeTap) {
|
||||||
|
case 0:
|
||||||
|
if (model.patientAssessmentList != null) {
|
||||||
|
return [
|
||||||
|
ListView.builder(
|
||||||
|
itemCount: model.patientAssessmentList.length,
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
physics: ScrollPhysics(),
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return DiagnosisWidget(
|
||||||
|
model, model.patientAssessmentList[index]);
|
||||||
|
})
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
return [
|
||||||
|
ErrorMessage(error: TranslationBase.of(context).noItem),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (model.prescriptionList != null && model.prescriptionList.entityList != null && model.prescriptionList.entityList.isNotEmpty) {
|
||||||
|
return [
|
||||||
|
ListView.builder(
|
||||||
|
itemCount: model.prescriptionList != null
|
||||||
|
? model.prescriptionList.entityList.length
|
||||||
|
: 0,
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
physics: ScrollPhysics(),
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return MedicationWidget(
|
||||||
|
model, model.prescriptionList.entityList[index]);
|
||||||
|
})
|
||||||
|
|
||||||
|
];} else {
|
||||||
|
return [
|
||||||
|
ErrorMessage(error: TranslationBase.of(context).noItem),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (model.orderProcedures != null && model.orderProcedures.isNotEmpty) {
|
||||||
|
return [
|
||||||
|
ListView.builder(
|
||||||
|
itemCount: model.orderProcedures.length,
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
physics: ScrollPhysics(),
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return ProceduresWidget(model, model.orderProcedures[index]);
|
||||||
|
})
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
return [
|
||||||
|
ErrorMessage(error: TranslationBase.of(context).noItem),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return [
|
||||||
|
Container(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,217 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
import '../../../../widgets/shared/errors/error_message.dart';
|
||||||
|
|
||||||
|
class UCAFInputScreen extends StatefulWidget {
|
||||||
|
final PatiantInformtion patient;
|
||||||
|
final Function changeLoadingState;
|
||||||
|
|
||||||
|
UCAFInputScreen(this.patient, {this.changeLoadingState});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_UCAFInputScreenState createState() => _UCAFInputScreenState(this.patient);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _UCAFInputScreenState extends State<UCAFInputScreen> {
|
||||||
|
final PatiantInformtion patient;
|
||||||
|
|
||||||
|
_UCAFInputScreenState(this.patient);
|
||||||
|
|
||||||
|
bool _inPatient = false;
|
||||||
|
bool _emergencyCase = false;
|
||||||
|
final _durationOfIllnessController = TextEditingController();
|
||||||
|
final _additionalComplaintsController = TextEditingController();
|
||||||
|
final _otherController = TextEditingController();
|
||||||
|
final _howController = TextEditingController();
|
||||||
|
final _whenController = TextEditingController();
|
||||||
|
final _whereController = TextEditingController();
|
||||||
|
final _managementsLineController = TextEditingController();
|
||||||
|
final _signsController = TextEditingController();
|
||||||
|
|
||||||
|
///TODO Elham* fix this
|
||||||
|
List<Map> conditionsData = [
|
||||||
|
{"name": "CHRONIC", "isChecked": false},
|
||||||
|
{"name": "RTA", "isChecked": false},
|
||||||
|
{"name": "PSYCHIATRIC", "isChecked": false},
|
||||||
|
{"name": "WORK RELATED", "isChecked": false},
|
||||||
|
{"name": "VACCINATION", "isChecked": false},
|
||||||
|
{"name": "CONGENITAL", "isChecked": false},
|
||||||
|
{"name": "INFERTILITY", "isChecked": false},
|
||||||
|
{"name": "CHECK-UP", "isChecked": false},
|
||||||
|
{"name": "PREGNANCY/INDICATE MP", "isChecked": false},
|
||||||
|
{"name": "CLEANING", "isChecked": false},
|
||||||
|
{"name": "ORTHO DONTICS", "isChecked": false},
|
||||||
|
{"name": "SPORTS RELATED", "isChecked": false},
|
||||||
|
{"name": "REGULAR DENTAL TREATMENT", "isChecked": false},
|
||||||
|
{"name": "IS TRAUMA TREATMENT SPECIFY ETA", "isChecked": false},
|
||||||
|
];
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<UcafViewModel>(
|
||||||
|
onModelReady: (model) async {
|
||||||
|
model.resetDataInFirst();
|
||||||
|
await model.getUCAFData(patient);
|
||||||
|
widget.changeLoadingState(false);
|
||||||
|
},
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
isShowAppBar: false,
|
||||||
|
body: model.patientVitalSignsHistory != null &&
|
||||||
|
model.patientVitalSignsHistory.length > 0 &&
|
||||||
|
model.patientChiefComplaintList != null &&
|
||||||
|
model.patientChiefComplaintList.length > 0
|
||||||
|
? Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Center(
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: .9,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
DoctorApp.warning,
|
||||||
|
size: 20,
|
||||||
|
color: Color(0xFFCC9B14),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 10,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"BP (H/L)",
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.bloodPressure}",
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).temperature}",
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 4,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
"${model.temperatureCelcius}(C), ${(double.parse(model.temperatureCelcius) * (9 / 5) + 32).toStringAsFixed(2)}(F)",
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"${TranslationBase.of(context).pulseBeats}:",
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier * 1.8,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 4,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
"${model.hartRat}",
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier * 2,
|
||||||
|
color: Colors.grey.shade800,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
Utils.convertToTitleCase(TranslationBase.of(context)
|
||||||
|
.chiefComplaintsAndSymptoms),
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
fontSize: SizeConfig.textMultiplier * 2.2,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
AppTextFieldCustom(
|
||||||
|
hintText:
|
||||||
|
TranslationBase.of(context).instruction,
|
||||||
|
dropDownText: Utils.parseHtmlString(model
|
||||||
|
.patientChiefComplaintList[0]
|
||||||
|
.chiefComplaint + '\n'),
|
||||||
|
controller: _additionalComplaintsController,
|
||||||
|
inputType: TextInputType.multiline,
|
||||||
|
enabled: false,
|
||||||
|
minLines: 1,
|
||||||
|
maxLines: 20,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: model.patientChiefComplaintList != null ||
|
||||||
|
model.patientVitalSignsHistory != null
|
||||||
|
? Center(
|
||||||
|
child: ErrorMessage(
|
||||||
|
error: model.patientVitalSignsHistory == null ||
|
||||||
|
model.patientVitalSignsHistory.length == 0
|
||||||
|
? TranslationBase.of(context).vitalSignEmptyMsg
|
||||||
|
: TranslationBase.of(context).chiefComplaintEmptyMsg))
|
||||||
|
: Container(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class DiagnosisWidget extends StatelessWidget {
|
||||||
|
final UcafViewModel model;
|
||||||
|
final GetAssessmentResModel diagnosis;
|
||||||
|
|
||||||
|
DiagnosisWidget(this.model, this.diagnosis);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
MasterKeyModel diagnosisType = model.findMasterDataById(
|
||||||
|
masterKeys: MasterKeysService.DiagnosisType,
|
||||||
|
id: diagnosis.diagnosisTypeID);
|
||||||
|
MasterKeyModel diagnosisCondition = model.findMasterDataById(
|
||||||
|
masterKeys: MasterKeysService.DiagnosisCondition,
|
||||||
|
id: diagnosis.conditionID);
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
CardWithBgWidget(
|
||||||
|
bgColor: Colors.transparent,
|
||||||
|
widget: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).diagnoseType}: ",
|
||||||
|
value: diagnosisType != null
|
||||||
|
? model.selectedLanguage == 'ar'
|
||||||
|
? diagnosisType.nameAr
|
||||||
|
: diagnosisType.nameEn
|
||||||
|
: "-",
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
CustomRow(
|
||||||
|
label: "",
|
||||||
|
value: diagnosis.asciiDesc,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
isExpanded: true,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).condition}: ",
|
||||||
|
value: "${diagnosisCondition != null ? model.selectedLanguage == 'ar' ? diagnosisCondition.nameAr : diagnosisCondition.nameEn : "-"}",
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).icd}:",
|
||||||
|
value: "${diagnosis.icdCode10ID}",
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class MedicationWidget extends StatelessWidget {
|
||||||
|
final UcafViewModel model;
|
||||||
|
final PrescriptionEntityModel prescription;
|
||||||
|
|
||||||
|
MedicationWidget(this.model, this.prescription);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CardWithBgWidget(
|
||||||
|
bgColor: Colors.transparent,
|
||||||
|
widget: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).id}: ",
|
||||||
|
value: "${prescription.medicineCode}",
|
||||||
|
isExpanded: false,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 16,
|
||||||
|
),
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).price}: ",
|
||||||
|
value: "${prescription.medicationPrice}",
|
||||||
|
isExpanded: false,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 16,
|
||||||
|
),
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).quantity}: ",
|
||||||
|
value: "${prescription.quantity}",
|
||||||
|
isExpanded: false,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).durDays}: ",
|
||||||
|
value: "${prescription.doseDurationDays}",
|
||||||
|
isExpanded: false,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
CustomRow(
|
||||||
|
label: " ",
|
||||||
|
value: Utils.convertToTitleCase("${prescription.medicationName}"),
|
||||||
|
isExpanded: true,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
|
||||||
|
CustomRow(
|
||||||
|
label: " ",
|
||||||
|
value: Utils.convertToTitleCase("${prescription.doseDetail}"),
|
||||||
|
isExpanded: true,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/SOAP/order-procedure.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
|
||||||
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ProceduresWidget extends StatelessWidget {
|
||||||
|
final UcafViewModel model;
|
||||||
|
final OrderProcedure procedure;
|
||||||
|
|
||||||
|
ProceduresWidget(this.model, this.procedure);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CardWithBgWidget(
|
||||||
|
bgColor: Colors.transparent,
|
||||||
|
widget: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).codeNo}: ",
|
||||||
|
value: "${procedure.achiCode}",
|
||||||
|
isExpanded: false,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
SizedBox(width: 10,),
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).quantity}: ",
|
||||||
|
value: "${procedure.lineItemNo}",
|
||||||
|
isExpanded: false,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
CustomRow(
|
||||||
|
label: "",
|
||||||
|
value: "${procedure.procedureName}",
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).covered}: ",
|
||||||
|
value: "${procedure.isCovered}",
|
||||||
|
isExpanded: false,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
valueColor: procedure.isCovered
|
||||||
|
? AppGlobal.appGreenColor
|
||||||
|
: AppGlobal.appRedColor,
|
||||||
|
),
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).approvalRequired}: ",
|
||||||
|
value: "${procedure.isApprovalRequired}",
|
||||||
|
isExpanded: false,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
|
||||||
|
CustomRow(
|
||||||
|
label: "${TranslationBase.of(context).uncoveredByDoctor}: ",
|
||||||
|
value: "${procedure.isUncoveredByDoctor}",
|
||||||
|
isExpanded: false,
|
||||||
|
valueSize: SizeConfig.textMultiplier * 1.8,
|
||||||
|
labelSize: SizeConfig.textMultiplier * 1.6,
|
||||||
|
valueColor: procedure.isCovered
|
||||||
|
? AppGlobal.appGreenColor
|
||||||
|
: AppGlobal.appRedColor,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue