|
|
|
|
@ -453,6 +453,9 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
.edit),
|
|
|
|
|
onTap: () {
|
|
|
|
|
updatePrescriptionForm(
|
|
|
|
|
startDate:
|
|
|
|
|
model.prescriptionList[0].entityList[index].startDate
|
|
|
|
|
.toString(),
|
|
|
|
|
dose: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
@ -460,13 +463,9 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
index]
|
|
|
|
|
.doseTimingID
|
|
|
|
|
.toString(),
|
|
|
|
|
frequency: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.frequencyID
|
|
|
|
|
.toString(),
|
|
|
|
|
frequency:
|
|
|
|
|
model.prescriptionList[0].entityList[index].frequencyID
|
|
|
|
|
.toString(),
|
|
|
|
|
rouat: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
@ -489,15 +488,11 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
index]
|
|
|
|
|
.doseDetail,
|
|
|
|
|
remarks: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.prescriptionList[0]
|
|
|
|
|
.entityList[index]
|
|
|
|
|
.remarks,
|
|
|
|
|
model:
|
|
|
|
|
model,
|
|
|
|
|
context:
|
|
|
|
|
context);
|
|
|
|
|
model: model,
|
|
|
|
|
context: context);
|
|
|
|
|
//model.postPrescription();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
@ -592,17 +587,17 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void updatePrescriptionForm({
|
|
|
|
|
context,
|
|
|
|
|
String drugName,
|
|
|
|
|
int drugId,
|
|
|
|
|
String remarks,
|
|
|
|
|
PrescriptionViewModel model,
|
|
|
|
|
PatiantInformtion patient,
|
|
|
|
|
String rouat,
|
|
|
|
|
String frequency,
|
|
|
|
|
String dose,
|
|
|
|
|
}) {
|
|
|
|
|
void updatePrescriptionForm(
|
|
|
|
|
{context,
|
|
|
|
|
String drugName,
|
|
|
|
|
int drugId,
|
|
|
|
|
String remarks,
|
|
|
|
|
PrescriptionViewModel model,
|
|
|
|
|
PatiantInformtion patient,
|
|
|
|
|
String rouat,
|
|
|
|
|
String frequency,
|
|
|
|
|
String dose,
|
|
|
|
|
String startDate}) {
|
|
|
|
|
TextEditingController remarksController = TextEditingController();
|
|
|
|
|
TextEditingController doseController = TextEditingController();
|
|
|
|
|
TextEditingController frequencyController = TextEditingController();
|
|
|
|
|
@ -703,6 +698,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
title: 'update prescription'.toUpperCase(),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
updatePrescription(
|
|
|
|
|
startDate: startDate,
|
|
|
|
|
doseId: dose,
|
|
|
|
|
frequencyId: frequency,
|
|
|
|
|
routeId: rouat,
|
|
|
|
|
@ -738,6 +734,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
String frequency,
|
|
|
|
|
String route,
|
|
|
|
|
String routeId,
|
|
|
|
|
String startDate,
|
|
|
|
|
PatiantInformtion patient}) async {
|
|
|
|
|
//PrescriptionViewModel model = PrescriptionViewModel();
|
|
|
|
|
PostPrescriptionReqModel updatePrescriptionReqModel =
|
|
|
|
|
@ -752,17 +749,19 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiOGFjNDRjZGQtOWE0Mi00M2YxLWE2YTQtMWQ4NzBmZmYwNTUyIiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTU2NDkiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA4NzM2NjY5LCJleHAiOjE2MDk2MDA2NjksImlhdCI6MTYwODczNjY2OX0.9EDgYrbe5fQA2CvgLdFT4s_PL7hD5R_Qggfpv4lDtUY";
|
|
|
|
|
sss.add(PrescriptionRequestModel(
|
|
|
|
|
covered: true,
|
|
|
|
|
dose: frequency.isNotEmpty ? int.parse(dose) : 1,
|
|
|
|
|
dose: 9, //frequency.isNotEmpty ? int.parse(dose) : 1,
|
|
|
|
|
itemId: drugId,
|
|
|
|
|
doseUnitId: 1,
|
|
|
|
|
route: route.isNotEmpty ? int.parse(route) : routeId,
|
|
|
|
|
frequency: frequency.isNotEmpty ? int.parse(frequency) : frequencyId,
|
|
|
|
|
doseUnitId: 2,
|
|
|
|
|
route: route.isNotEmpty ? int.parse(route) : int.parse(routeId),
|
|
|
|
|
frequency: frequency.isNotEmpty
|
|
|
|
|
? int.parse(frequency)
|
|
|
|
|
: int.parse(frequencyId),
|
|
|
|
|
remarks: remarks.isEmpty ? '' : remarks,
|
|
|
|
|
approvalRequired: true,
|
|
|
|
|
icdcode10Id: "test2",
|
|
|
|
|
doseTime: dose.isNotEmpty ? int.parse(frequency) : doseId,
|
|
|
|
|
doseTime: dose.isNotEmpty ? int.parse(dose) : int.parse(doseId),
|
|
|
|
|
duration: 2,
|
|
|
|
|
doseStartDate: "2020-12-20T13:07:41.769Z"));
|
|
|
|
|
doseStartDate: startDate));
|
|
|
|
|
updatePrescriptionReqModel.prescriptionRequestModel = sss;
|
|
|
|
|
//postProcedureReqModel.procedures = controlsProcedure;
|
|
|
|
|
|
|
|
|
|
|