|
|
|
|
@ -1264,75 +1264,68 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
|
if (formKey.currentState
|
|
|
|
|
.validate()) {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
//openDrugToDrug(model);
|
|
|
|
|
openDrugToDrug(model);
|
|
|
|
|
{
|
|
|
|
|
// var x = model
|
|
|
|
|
// .patientAssessmentList
|
|
|
|
|
// .map((value) =>
|
|
|
|
|
// value.icdCode10ID)
|
|
|
|
|
// .toList()
|
|
|
|
|
// .join(',');
|
|
|
|
|
|
|
|
|
|
postProcedure(
|
|
|
|
|
icdCode: model
|
|
|
|
|
.patientAssessmentList
|
|
|
|
|
.isNotEmpty
|
|
|
|
|
? model
|
|
|
|
|
.patientAssessmentList[
|
|
|
|
|
0]
|
|
|
|
|
.icdCode10ID
|
|
|
|
|
.isEmpty
|
|
|
|
|
? "test"
|
|
|
|
|
: model
|
|
|
|
|
.patientAssessmentList[
|
|
|
|
|
0]
|
|
|
|
|
.icdCode10ID
|
|
|
|
|
.toString()
|
|
|
|
|
: "test",
|
|
|
|
|
// icdCode: model
|
|
|
|
|
// .patientAssessmentList
|
|
|
|
|
// .map((value) => value
|
|
|
|
|
// .icdCode10ID
|
|
|
|
|
// .trim())
|
|
|
|
|
// .toList()
|
|
|
|
|
// .join(' '),
|
|
|
|
|
dose:
|
|
|
|
|
strengthController
|
|
|
|
|
.text,
|
|
|
|
|
doseUnit: units[
|
|
|
|
|
'parameterCode']
|
|
|
|
|
.toString(),
|
|
|
|
|
patient:
|
|
|
|
|
widget.patient,
|
|
|
|
|
doseTimeIn:
|
|
|
|
|
doseTime['id']
|
|
|
|
|
.toString(),
|
|
|
|
|
model: widget.model,
|
|
|
|
|
duration:
|
|
|
|
|
duration['id']
|
|
|
|
|
.toString(),
|
|
|
|
|
frequency: frequency[
|
|
|
|
|
'parameterCode']
|
|
|
|
|
.toString(),
|
|
|
|
|
route: route[
|
|
|
|
|
'parameterCode']
|
|
|
|
|
.toString(),
|
|
|
|
|
drugId:
|
|
|
|
|
_selectedMedication
|
|
|
|
|
.itemId
|
|
|
|
|
.toString(),
|
|
|
|
|
strength:
|
|
|
|
|
strengthController
|
|
|
|
|
.text,
|
|
|
|
|
indication:
|
|
|
|
|
indicationController
|
|
|
|
|
.text,
|
|
|
|
|
instruction:
|
|
|
|
|
instructionController
|
|
|
|
|
.text,
|
|
|
|
|
doseTime:
|
|
|
|
|
selectedDate,
|
|
|
|
|
);
|
|
|
|
|
// postProcedure(
|
|
|
|
|
// icdCode: model
|
|
|
|
|
// .patientAssessmentList
|
|
|
|
|
// .isNotEmpty
|
|
|
|
|
// ? model
|
|
|
|
|
// .patientAssessmentList[
|
|
|
|
|
// 0]
|
|
|
|
|
// .icdCode10ID
|
|
|
|
|
// .isEmpty
|
|
|
|
|
// ? "test"
|
|
|
|
|
// : model
|
|
|
|
|
// .patientAssessmentList[
|
|
|
|
|
// 0]
|
|
|
|
|
// .icdCode10ID
|
|
|
|
|
// .toString()
|
|
|
|
|
// : "test",
|
|
|
|
|
// // icdCode: model
|
|
|
|
|
// // .patientAssessmentList
|
|
|
|
|
// // .map((value) => value
|
|
|
|
|
// // .icdCode10ID
|
|
|
|
|
// // .trim())
|
|
|
|
|
// // .toList()
|
|
|
|
|
// // .join(' '),
|
|
|
|
|
// dose:
|
|
|
|
|
// strengthController
|
|
|
|
|
// .text,
|
|
|
|
|
// doseUnit: units[
|
|
|
|
|
// 'parameterCode']
|
|
|
|
|
// .toString(),
|
|
|
|
|
// patient:
|
|
|
|
|
// widget.patient,
|
|
|
|
|
// doseTimeIn:
|
|
|
|
|
// doseTime['id']
|
|
|
|
|
// .toString(),
|
|
|
|
|
// model: widget.model,
|
|
|
|
|
// duration:
|
|
|
|
|
// duration['id']
|
|
|
|
|
// .toString(),
|
|
|
|
|
// frequency: frequency[
|
|
|
|
|
// 'parameterCode']
|
|
|
|
|
// .toString(),
|
|
|
|
|
// route: route[
|
|
|
|
|
// 'parameterCode']
|
|
|
|
|
// .toString(),
|
|
|
|
|
// drugId:
|
|
|
|
|
// _selectedMedication
|
|
|
|
|
// .itemId
|
|
|
|
|
// .toString(),
|
|
|
|
|
// strength:
|
|
|
|
|
// strengthController
|
|
|
|
|
// .text,
|
|
|
|
|
// indication:
|
|
|
|
|
// indicationController
|
|
|
|
|
// .text,
|
|
|
|
|
// instruction:
|
|
|
|
|
// instructionController
|
|
|
|
|
// .text,
|
|
|
|
|
// doseTime:
|
|
|
|
|
// selectedDate,
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1432,7 +1425,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (context) {
|
|
|
|
|
return Container(
|
|
|
|
|
height: SizeConfig.realScreenHeight * .5,
|
|
|
|
|
height: SizeConfig.realScreenHeight * .8,
|
|
|
|
|
width: SizeConfig.realScreenWidth,
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -1448,6 +1441,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
|
title: TranslationBase.of(context).addMedication,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
|
|
|
|
|
postProcedure(
|
|
|
|
|
icdCode: model.patientAssessmentList.isNotEmpty
|
|
|
|
|
? model.patientAssessmentList[0].icdCode10ID
|
|
|
|
|
@ -1477,6 +1471,36 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
|
instruction: instructionController.text,
|
|
|
|
|
doseTime: selectedDate,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// postProcedure(
|
|
|
|
|
// icdCode: model.patientAssessmentList.isNotEmpty
|
|
|
|
|
// ? model.patientAssessmentList[0].icdCode10ID
|
|
|
|
|
// .isEmpty
|
|
|
|
|
// ? "test"
|
|
|
|
|
// : model.patientAssessmentList[0].icdCode10ID
|
|
|
|
|
// .toString()
|
|
|
|
|
// : "test",
|
|
|
|
|
// // icdCode: model
|
|
|
|
|
// // .patientAssessmentList
|
|
|
|
|
// // .map((value) => value
|
|
|
|
|
// // .icdCode10ID
|
|
|
|
|
// // .trim())
|
|
|
|
|
// // .toList()
|
|
|
|
|
// // .join(' '),
|
|
|
|
|
// dose: strengthController.text,
|
|
|
|
|
// doseUnit: units['parameterCode'].toString(),
|
|
|
|
|
// patient: widget.patient,
|
|
|
|
|
// doseTimeIn: doseTime['id'].toString(),
|
|
|
|
|
// model: widget.model,
|
|
|
|
|
// duration: duration['id'].toString(),
|
|
|
|
|
// frequency: frequency['parameterCode'].toString(),
|
|
|
|
|
// route: route['parameterCode'].toString(),
|
|
|
|
|
// drugId: _selectedMedication.itemId.toString(),
|
|
|
|
|
// strength: strengthController.text,
|
|
|
|
|
// indication: indicationController.text,
|
|
|
|
|
// instruction: instructionController.text,
|
|
|
|
|
// doseTime: selectedDate,
|
|
|
|
|
// );
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
|