Merge branch 'roaa2.8_addnewmedicationservice' into 'development'

Wrapping the Row cards with CustomRow in intervention_medication.dart and...

See merge request Cloud_Solution/doctor_app_flutter!957
merge-requests/958/merge
Elham Ali 4 years ago
commit c6a091ae32

@ -22,8 +22,8 @@ class InterventionMedicationViewModel extends BaseViewModel {
List<PatiantInformtion> filterData = [];
DateTime selectedFromDate;
DateTime selectedToDate;
DateTime selectedFromDate = DateTime.now();
DateTime selectedToDate = DateTime.now().add(Duration(days: 1));
PatiantInformtion patient;
bool hasError = false;
@ -37,21 +37,21 @@ class InterventionMedicationViewModel extends BaseViewModel {
_interventionMedicationService.allInterventionHistoryList;
Future getInterventionMedication({
int projectId,
int patientId,
DateTime fromDate,
DateTime toDate,
}) async {
InterventionMedicationReqModel interventionMedicationReqModel =
InterventionMedicationReqModel(
projectID: 15,
//projectId,
patientID: 79941,
//patientId,
fromDate: "\/Date(1488322922)\/",
//AppDateUtils.convertDateToServerFormat(fromDate),
toDate:
"\/Date(1635886800000)\/", //AppDateUtils.convertDateToServerFormat(toDate),
projectID: projectId,
patientID: patientId,
fromDate: AppDateUtils.convertDateToServerFormat(fromDate),
toDate: AppDateUtils.convertDateToServerFormat(toDate),
);
hasError = false;
setState(ViewState.Busy);
@ -66,24 +66,24 @@ class InterventionMedicationViewModel extends BaseViewModel {
}
Future getInterventionMedicationHistory(
{int projectId,
int patientId,
int admissionNo,
int prescriptionNo,
int orderNo,
{
int projectId,
int patientId,
int admissionNo,
int prescriptionNo,
int orderNo,
bool isBusyLocal = false}) async {
InterventionMedicationHistoryReqModel
interventionMedicationHistoryReqModel =
InterventionMedicationHistoryReqModel(
projectID: 15,
//projectId,
patientID: 79941,
//patientId,
admissionNo: 2018013900,
//admissionNo,
prescriptionNo: 2045165,
//prescriptionNo,
orderNo: 1171570, //orderNo,
projectID: projectId,
patientID: patientId,
admissionNo: admissionNo,
prescriptionNo: prescriptionNo,
orderNo: orderNo,
);
hasError = false;
if (isBusyLocal)
@ -105,6 +105,7 @@ class InterventionMedicationViewModel extends BaseViewModel {
}
Future setAcceptedOrRejected({
String remarks,
int memberId,
int projectId,
@ -113,24 +114,23 @@ class InterventionMedicationViewModel extends BaseViewModel {
int prescriptionNo,
int orderNo,
int interventionStatus,
int status,
}) async {
AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel(
projectID: 15,
//projectId,
patientID: 79941,
//patientID,
admissionNo: 2018013900,
//admissionNo,
prescriptionNo: 2045165,
//prescriptionNo,
orderNo: 1171570,
//orderNo,
accessLevel: 4,
lineItemNo: 1,
remarks: remarks,
memberID: 2804,
//memberId,
interventionStatus: interventionStatus,
projectID: projectId,
patientID: patientID,
admissionNo: admissionNo,
prescriptionNo: prescriptionNo,
orderNo: orderNo,
accessLevel: 4,
lineItemNo: 1,
remarks: remarks,
memberID: 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,
),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.description,
fontSize: 12,
isCopyable: true,
),
),
]),
CustomRow(
labelSize: 12,
valueSize: 12,
label: 'Description: ',
value: model.allInterventionList[index].description,
),
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,
),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.doctorComments,
fontSize: 12,
isCopyable: true,
),
),
]),
CustomRow(
labelSize: 12,
valueSize: 12,
label: 'Doctor Comments: ',
value: model.allInterventionList[index].doctorComments,
),
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: 12,
valueSize: 12,
label: 'Created By Name: ',
value: model.allInterventionHistoryList[index].createdByName,
),
],
),
@ -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,18 @@ 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,
),
),
]),
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 +176,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 +232,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,15 @@ 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(model.selectedFromDate.toString(), "yyyy-MM-dd")}"
,
true,
suffixIcon: Icon(
Icons.calendar_today,
@ -116,17 +114,15 @@ 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(model.selectedToDate.toString(), "yyyy-MM-dd")}"
,
true,
suffixIcon: Icon(
Icons.calendar_today,
@ -173,7 +169,10 @@ class _PharmacyInterventionScreenState
context,
MaterialPageRoute(
builder: (context) =>
InterventionMedicationScreen(patient,previousModel: model,)),
InterventionMedicationScreen(
patient,
previousModel: model,
)),
);
},
),

Loading…
Cancel
Save