Wrapping the Row cards with CustomRow in intervention_medication.dart and intervention_medication_history_screen.dart and fix the accept or reject issue, fix the lable in intervention_medication_history_screen.dart and edit the initial date in pharmacy_intervention_screen.dart

merge-requests/957/head
RoaaGhali98 4 years ago
parent a829532717
commit 19d981d9e0

@ -113,6 +113,7 @@ class InterventionMedicationViewModel extends BaseViewModel {
int prescriptionNo,
int orderNo,
int interventionStatus,
int status,
}) async {
AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel(
projectID: 15,
@ -131,6 +132,7 @@ class InterventionMedicationViewModel extends BaseViewModel {
memberID: 2804,
//memberId,
interventionStatus: interventionStatus,
status: status
);
hasError = false;
setState(ViewState.BusyLocal);

@ -11,6 +11,7 @@ class AcceptOrRejectReqModel {
int lineItemNo;
bool patientOutSA;
int interventionStatus;
int status;
AcceptOrRejectReqModel(
{this.patientID,
@ -25,6 +26,7 @@ class AcceptOrRejectReqModel {
this.lineItemNo,
this.patientOutSA,
this.interventionStatus,
this.status
});
AcceptOrRejectReqModel.fromJson(Map<String, dynamic> json) {
@ -40,6 +42,8 @@ class AcceptOrRejectReqModel {
lineItemNo = json['LineItemNo'];
patientOutSA = json['PatientOutSA'];
interventionStatus = json['InterventionStatus'];
status = json['Status'];
}
Map<String, dynamic> toJson() {
@ -56,6 +60,7 @@ class AcceptOrRejectReqModel {
data['LineItemNo'] = this.lineItemNo;
data['PatientOutSA'] = this.patientOutSA;
data['InterventionStatus'] = this.interventionStatus;
data['Status'] = this.status;
return data;
}
}

@ -10,6 +10,7 @@ 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/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../core/viewModel/profile/intervention_medication_view_model.dart';
@ -102,22 +103,11 @@ class _InterventionMedicationScreenState
CrossAxisAlignment
.start,
children: [
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
AppText(
model
.allInterventionList[
index]
.cS,
fontWeight:
FontWeight.w600,
fontSize: 14,
),
],
),
CustomRow(
valueSize: 14,
label: '',
value: model.allInterventionList[index].cS,
)
],
),
),
@ -142,6 +132,7 @@ class _InterventionMedicationScreenState
fontWeight:
FontWeight.w600,
fontSize: 14,
color: Color(0xFF2B353E),
),
],
),
@ -152,91 +143,39 @@ class _InterventionMedicationScreenState
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'Description: ',
fontSize: 12,
CustomRow(
labelSize: 12,
valueSize: 12,
label: 'Description: ',
value: model.allInterventionList[index].description,
),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.description,
fontSize: 12,
isCopyable: true,
),
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'Medication: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.medication,
fontSize: 12,
isCopyable: true,
),
CustomRow(
labelSize: 12,
valueSize: 12,
label: 'Medication: ',
value: model.allInterventionList[index].medication,
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'Doctor Comments: ',
fontSize: 12,
CustomRow(
labelSize: 12,
valueSize: 12,
label: 'Doctor Comments: ',
value: model.allInterventionList[index].doctorComments,
),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.doctorComments,
fontSize: 12,
isCopyable: true,
),
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'Status Description: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.statusDescription,
fontSize: 12,
isCopyable: true,
),
CustomRow(
labelSize: 12,
valueSize: 12,
label: 'Status Description: ',
value: model.allInterventionList[index].statusDescription,
),
]),
],
),
SizedBox(

@ -19,6 +19,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../config/config.dart';
import '../../../../core/viewModel/profile/intervention_medication_view_model.dart';
import '../../../../widgets/shared/user-guid/CusomRow.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -102,20 +103,11 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
AppText(
model
.allInterventionHistoryList[
index].setupId,
fontWeight: FontWeight.w600,
fontSize: 14,
),
],
CustomRow(
labelSize: 14,
valueSize: 14,
label: 'Created By: ',
value: model.allInterventionHistoryList[index].createdBy.toString(),
),
],
),
@ -128,6 +120,7 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
.start,
children: [
AppText(
AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(
model
@ -139,6 +132,7 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
isMonthShort: true),
fontWeight: FontWeight.w600,
fontSize: 14,
color: Color(0xFF2B353E),
),
],
),
@ -149,69 +143,24 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'Remark: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
.allInterventionHistoryList[
index]
.remark,
fontSize: 12,
isCopyable: true,
),
CustomRow(
labelSize: 12,
valueSize: 12,
label: 'Remark: ',
value: model.allInterventionHistoryList[index].remark,
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'Created By Name: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
.allInterventionHistoryList[
index]
.createdByName,
fontSize: 12,
isCopyable: true,
),
CustomRow(
labelSize: 12,
valueSize: 12,
label: 'Created By Name: ',
value: model.allInterventionHistoryList[index].createdByName,
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'SetUp ID: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
.allInterventionHistoryList[
index]
.setupId,
fontSize: 12,
isCopyable: true,
),
),
]),
SizedBox(
height: 8,
),
@ -233,6 +182,7 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
orderNo: model.allInterventionHistoryList[index].orderNo,
admissionNo: model.allInterventionHistoryList[index].admissionNo,
interventionStatus: 1,
status: 61
);
if(model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
@ -288,7 +238,8 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
patientID: model.allInterventionHistoryList[index].patientId,
orderNo: model.allInterventionHistoryList[index].orderNo,
admissionNo: model.allInterventionHistoryList[index].admissionNo,
interventionStatus: 2
interventionStatus: 2,
status: 61
);
if(model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../../core/viewModel/profile/intervention_medication_view_model.dart';
import '../../../../models/patient/patiant_info_model.dart';
import '../../../base/base_view.dart';
@ -15,7 +16,6 @@ import 'intervention_medication.dart';
class PharmacyInterventionScreen extends StatefulWidget {
final OutPatientFilterType outPatientFilterType;
const PharmacyInterventionScreen({
Key key,
this.outPatientFilterType,
@ -78,17 +78,16 @@ class _PharmacyInterventionScreenState
DateTime.now().year,
DateTime.now().month,
DateTime.now().day + 100),
selectedDate: DateTime(
DateTime.now().year,
DateTime.now().month,
DateTime.now().day),
selectedDate: model.selectedFromDate != null
? model.selectedFromDate
: DateTime.now(),
),
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).fromDate,
model.selectedFromDate != null
? "${AppDateUtils.convertStringToDateFormat(model.selectedFromDate.toString(), "yyyy-MM-dd")}"
: null,
: "${AppDateUtils.convertStringToDateFormat(DateTime.now().toString(), "yyyy-MM-dd")}",
true,
suffixIcon: Icon(
Icons.calendar_today,
@ -116,17 +115,16 @@ class _PharmacyInterventionScreenState
DateTime.now().year,
DateTime.now().month,
DateTime.now().day + 100),
selectedDate: DateTime(
DateTime.now().year,
DateTime.now().month,
DateTime.now().day),
selectedDate: model.selectedToDate != null
? model.selectedToDate
: DateTime.now().add(Duration(days: 1)),
),
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).toDate,
model.selectedToDate != null
? "${AppDateUtils.convertStringToDateFormat(model.selectedToDate.toString(), "yyyy-MM-dd")}"
: null,
: "${AppDateUtils.convertStringToDateFormat(DateTime.now().add(Duration(days: 1)).toString(), "yyyy-MM-dd")}",
true,
suffixIcon: Icon(
Icons.calendar_today,
@ -173,7 +171,10 @@ class _PharmacyInterventionScreenState
context,
MaterialPageRoute(
builder: (context) =>
InterventionMedicationScreen(patient,previousModel: model,)),
InterventionMedicationScreen(
patient,
previousModel: model,
)),
);
},
),

Loading…
Cancel
Save