|
|
|
|
@ -453,21 +453,30 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
.edit),
|
|
|
|
|
onTap: () {
|
|
|
|
|
updatePrescriptionForm(
|
|
|
|
|
context,
|
|
|
|
|
model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.medicationName,
|
|
|
|
|
model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.medicineCode,
|
|
|
|
|
model,
|
|
|
|
|
);
|
|
|
|
|
patient:
|
|
|
|
|
patient,
|
|
|
|
|
drugId: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.medicineCode,
|
|
|
|
|
drugName: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.medicationName,
|
|
|
|
|
remarks: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.remarks,
|
|
|
|
|
model:
|
|
|
|
|
model,
|
|
|
|
|
context:
|
|
|
|
|
context);
|
|
|
|
|
//model.postPrescription();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
@ -563,7 +572,12 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void updatePrescriptionForm(
|
|
|
|
|
context, String drugName, int drugId, PrescriptionViewModel model) {
|
|
|
|
|
{context,
|
|
|
|
|
String drugName,
|
|
|
|
|
int drugId,
|
|
|
|
|
String remarks,
|
|
|
|
|
PrescriptionViewModel model,
|
|
|
|
|
PatiantInformtion patient}) {
|
|
|
|
|
TextEditingController remarksController = TextEditingController();
|
|
|
|
|
TextEditingController doseController = TextEditingController();
|
|
|
|
|
TextEditingController frequencyController = TextEditingController();
|
|
|
|
|
@ -635,6 +649,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12.0,
|
|
|
|
|
),
|
|
|
|
|
AppText('Remarks'),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
@ -642,7 +657,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: 'Remarks',
|
|
|
|
|
hintText: remarks,
|
|
|
|
|
controller: remarksController,
|
|
|
|
|
maxLines: 7,
|
|
|
|
|
minLines: 4,
|
|
|
|
|
@ -664,6 +679,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
title: 'update prescription'.toUpperCase(),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
updatePrescription(
|
|
|
|
|
patient: patient,
|
|
|
|
|
model: model,
|
|
|
|
|
drugId: drugId,
|
|
|
|
|
remarks: remarksController.text,
|
|
|
|
|
@ -685,23 +701,23 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updatePrescription({
|
|
|
|
|
PrescriptionViewModel model,
|
|
|
|
|
int drugId,
|
|
|
|
|
String remarks,
|
|
|
|
|
String dose,
|
|
|
|
|
String frequency,
|
|
|
|
|
String route,
|
|
|
|
|
}) async {
|
|
|
|
|
updatePrescription(
|
|
|
|
|
{PrescriptionViewModel model,
|
|
|
|
|
int drugId,
|
|
|
|
|
String remarks,
|
|
|
|
|
String dose,
|
|
|
|
|
String frequency,
|
|
|
|
|
String route,
|
|
|
|
|
PatiantInformtion patient}) async {
|
|
|
|
|
//PrescriptionViewModel model = PrescriptionViewModel();
|
|
|
|
|
PostPrescriptionReqModel updatePrescriptionReqModel =
|
|
|
|
|
new PostPrescriptionReqModel();
|
|
|
|
|
List<PrescriptionRequestModel> sss = List();
|
|
|
|
|
|
|
|
|
|
updatePrescriptionReqModel.appointmentNo = 2016055159;
|
|
|
|
|
updatePrescriptionReqModel.clinicID = 17;
|
|
|
|
|
updatePrescriptionReqModel.episodeID = 200012330;
|
|
|
|
|
updatePrescriptionReqModel.patientMRN = 3120877;
|
|
|
|
|
updatePrescriptionReqModel.appointmentNo = patient.appointmentNo;
|
|
|
|
|
updatePrescriptionReqModel.clinicID = patient.clinicId;
|
|
|
|
|
updatePrescriptionReqModel.episodeID = patient.episodeNo;
|
|
|
|
|
updatePrescriptionReqModel.patientMRN = patient.patientMRN;
|
|
|
|
|
updatePrescriptionReqModel.vidaAuthTokenID =
|
|
|
|
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiOGFjNDRjZGQtOWE0Mi00M2YxLWE2YTQtMWQ4NzBmZmYwNTUyIiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTU2NDkiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA4NzM2NjY5LCJleHAiOjE2MDk2MDA2NjksImlhdCI6MTYwODczNjY2OX0.9EDgYrbe5fQA2CvgLdFT4s_PL7hD5R_Qggfpv4lDtUY";
|
|
|
|
|
sss.add(PrescriptionRequestModel(
|
|
|
|
|
|