|
|
|
@ -453,6 +453,26 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
.edit),
|
|
|
|
.edit),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
updatePrescriptionForm(
|
|
|
|
updatePrescriptionForm(
|
|
|
|
|
|
|
|
startDate:
|
|
|
|
|
|
|
|
model.prescriptionList[0].entityList[index].startDate
|
|
|
|
|
|
|
|
.toString(),
|
|
|
|
|
|
|
|
dose: model
|
|
|
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
|
|
|
0]
|
|
|
|
|
|
|
|
.entityList[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.doseTimingID
|
|
|
|
|
|
|
|
.toString(),
|
|
|
|
|
|
|
|
frequency:
|
|
|
|
|
|
|
|
model.prescriptionList[0].entityList[index].frequencyID
|
|
|
|
|
|
|
|
.toString(),
|
|
|
|
|
|
|
|
rouat: model
|
|
|
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
|
|
|
0]
|
|
|
|
|
|
|
|
.entityList[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.routeID
|
|
|
|
|
|
|
|
.toString(),
|
|
|
|
patient:
|
|
|
|
patient:
|
|
|
|
patient,
|
|
|
|
patient,
|
|
|
|
drugId: model
|
|
|
|
drugId: model
|
|
|
|
@ -466,17 +486,13 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
0]
|
|
|
|
0]
|
|
|
|
.entityList[
|
|
|
|
.entityList[
|
|
|
|
index]
|
|
|
|
index]
|
|
|
|
.medicationName,
|
|
|
|
.doseDetail,
|
|
|
|
remarks: model
|
|
|
|
remarks: model
|
|
|
|
.prescriptionList[
|
|
|
|
.prescriptionList[0]
|
|
|
|
0]
|
|
|
|
.entityList[index]
|
|
|
|
.entityList[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.remarks,
|
|
|
|
.remarks,
|
|
|
|
model:
|
|
|
|
model: model,
|
|
|
|
model,
|
|
|
|
context: context);
|
|
|
|
context:
|
|
|
|
|
|
|
|
context);
|
|
|
|
|
|
|
|
//model.postPrescription();
|
|
|
|
//model.postPrescription();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -577,7 +593,11 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
int drugId,
|
|
|
|
int drugId,
|
|
|
|
String remarks,
|
|
|
|
String remarks,
|
|
|
|
PrescriptionViewModel model,
|
|
|
|
PrescriptionViewModel model,
|
|
|
|
PatiantInformtion patient}) {
|
|
|
|
PatiantInformtion patient,
|
|
|
|
|
|
|
|
String rouat,
|
|
|
|
|
|
|
|
String frequency,
|
|
|
|
|
|
|
|
String dose,
|
|
|
|
|
|
|
|
String startDate}) {
|
|
|
|
TextEditingController remarksController = TextEditingController();
|
|
|
|
TextEditingController remarksController = TextEditingController();
|
|
|
|
TextEditingController doseController = TextEditingController();
|
|
|
|
TextEditingController doseController = TextEditingController();
|
|
|
|
TextEditingController frequencyController = TextEditingController();
|
|
|
|
TextEditingController frequencyController = TextEditingController();
|
|
|
|
@ -587,11 +607,11 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
isScrollControlled: true,
|
|
|
|
isScrollControlled: true,
|
|
|
|
builder: (BuildContext bc) {
|
|
|
|
builder: (BuildContext bc) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
height: 600,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.73,
|
|
|
|
child: Form(
|
|
|
|
child: Form(
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding:
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
|
|
|
|
EdgeInsets.symmetric(horizontal: 20.0, vertical: 12.0),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
@ -626,7 +646,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
border: Border.all(
|
|
|
|
border: Border.all(
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
child: TextFields(
|
|
|
|
child: TextFields(
|
|
|
|
hintText: 'Dose',
|
|
|
|
hintText: 'Dose Time',
|
|
|
|
controller: doseController,
|
|
|
|
controller: doseController,
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -649,7 +669,6 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 12.0,
|
|
|
|
height: 12.0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AppText('Remarks'),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
borderRadius:
|
|
|
|
@ -667,7 +686,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
height: 12.0,
|
|
|
|
height: 12.0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 140.0,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.12,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin:
|
|
|
|
margin:
|
|
|
|
@ -679,6 +698,10 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
title: 'update prescription'.toUpperCase(),
|
|
|
|
title: 'update prescription'.toUpperCase(),
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
updatePrescription(
|
|
|
|
updatePrescription(
|
|
|
|
|
|
|
|
startDate: startDate,
|
|
|
|
|
|
|
|
doseId: dose,
|
|
|
|
|
|
|
|
frequencyId: frequency,
|
|
|
|
|
|
|
|
routeId: rouat,
|
|
|
|
patient: patient,
|
|
|
|
patient: patient,
|
|
|
|
model: model,
|
|
|
|
model: model,
|
|
|
|
drugId: drugId,
|
|
|
|
drugId: drugId,
|
|
|
|
@ -704,10 +727,14 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
updatePrescription(
|
|
|
|
updatePrescription(
|
|
|
|
{PrescriptionViewModel model,
|
|
|
|
{PrescriptionViewModel model,
|
|
|
|
int drugId,
|
|
|
|
int drugId,
|
|
|
|
|
|
|
|
String frequencyId,
|
|
|
|
String remarks,
|
|
|
|
String remarks,
|
|
|
|
String dose,
|
|
|
|
String dose,
|
|
|
|
|
|
|
|
String doseId,
|
|
|
|
String frequency,
|
|
|
|
String frequency,
|
|
|
|
String route,
|
|
|
|
String route,
|
|
|
|
|
|
|
|
String routeId,
|
|
|
|
|
|
|
|
String startDate,
|
|
|
|
PatiantInformtion patient}) async {
|
|
|
|
PatiantInformtion patient}) async {
|
|
|
|
//PrescriptionViewModel model = PrescriptionViewModel();
|
|
|
|
//PrescriptionViewModel model = PrescriptionViewModel();
|
|
|
|
PostPrescriptionReqModel updatePrescriptionReqModel =
|
|
|
|
PostPrescriptionReqModel updatePrescriptionReqModel =
|
|
|
|
@ -722,17 +749,19 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiOGFjNDRjZGQtOWE0Mi00M2YxLWE2YTQtMWQ4NzBmZmYwNTUyIiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0Nz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TU2NDkiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA4NzM2NjY5LCJleHAiOjE2MDk2MDA2NjksImlhdCI6MTYwODczNjY2OX0.9EDgYrbe5fQA2CvgLdFT4s_PL7hD5R_Qggfpv4lDtUY";
|
|
|
|
sss.add(PrescriptionRequestModel(
|
|
|
|
sss.add(PrescriptionRequestModel(
|
|
|
|
covered: true,
|
|
|
|
covered: true,
|
|
|
|
dose: frequency.isNotEmpty ? int.parse(dose) : 1,
|
|
|
|
dose: 9, //frequency.isNotEmpty ? int.parse(dose) : 1,
|
|
|
|
itemId: drugId,
|
|
|
|
itemId: drugId,
|
|
|
|
doseUnitId: 1,
|
|
|
|
doseUnitId: 2,
|
|
|
|
route: frequency.isNotEmpty ? int.parse(route) : 1,
|
|
|
|
route: route.isNotEmpty ? int.parse(route) : int.parse(routeId),
|
|
|
|
frequency: frequency.isNotEmpty ? int.parse(frequency) : 1,
|
|
|
|
frequency: frequency.isNotEmpty
|
|
|
|
|
|
|
|
? int.parse(frequency)
|
|
|
|
|
|
|
|
: int.parse(frequencyId),
|
|
|
|
remarks: remarks.isEmpty ? '' : remarks,
|
|
|
|
remarks: remarks.isEmpty ? '' : remarks,
|
|
|
|
approvalRequired: true,
|
|
|
|
approvalRequired: true,
|
|
|
|
icdcode10Id: "test2",
|
|
|
|
icdcode10Id: "test2",
|
|
|
|
doseTime: 1,
|
|
|
|
doseTime: dose.isNotEmpty ? int.parse(dose) : int.parse(doseId),
|
|
|
|
duration: 2,
|
|
|
|
duration: 2,
|
|
|
|
doseStartDate: "2020-12-20T13:07:41.769Z"));
|
|
|
|
doseStartDate: startDate));
|
|
|
|
updatePrescriptionReqModel.prescriptionRequestModel = sss;
|
|
|
|
updatePrescriptionReqModel.prescriptionRequestModel = sss;
|
|
|
|
//postProcedureReqModel.procedures = controlsProcedure;
|
|
|
|
//postProcedureReqModel.procedures = controlsProcedure;
|
|
|
|
|
|
|
|
|
|
|
|
|