Fix some issues

merge-requests/953/head
RoaaGhali98 4 years ago
parent 37928c1757
commit fde96fbce7

@ -1054,6 +1054,8 @@ const Map<String, Map<String, String>> localizedValues = {
"maritalStatus": {"en": "Marital Status", "ar": "الحالة الزوجية"},
"nursing": {"en": "Nursing", "ar": "تمريض"},
"diabetic": {"en": "Diabetic", "ar": "مرض السكري"},
"pharmacy": {"en": "Pharmacy", "ar": "الصيدلاني"},
"intervention": {"en": "Intervention", "ar": "التدخل"},
"chart": {"en": "Chart", "ar": "جدول"},
"operationTimeStart": {
"en": "Operation Time Start :",

@ -2,14 +2,30 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import '../../../models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart';
import '../../../screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart';
import '../../../screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_req_model.dart';
import '../../../screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_res_model.dart';
import '../../../screens/patients/profile/pharmacy-intervention-model/new_medication_req_model.dart';
import '../../../screens/patients/profile/pharmacy-intervention-model/new_medication_res_model.dart';
import '../../../util/date-utils.dart';
import '../../service/patient/profile/intervention_medication_service.dart';
import '../../service/special_clinics/special_clinic_service.dart';
class InterventionMedicationViewModel extends BaseViewModel {
SpecialClinicsService _specialClinicsService =
locator<SpecialClinicsService>();
List<GetSpecialClinicalCareMappingListResponseModel>
get specialClinicalCareMappingList =>
_specialClinicsService.specialClinicalCareMappingList;
List<PatiantInformtion> filterData = [];
DateTime selectedFromDate;
DateTime selectedToDate;
PatiantInformtion patient;
bool hasError = false;
InterventionMedicationService _interventionMedicationService =
@ -23,18 +39,25 @@ class InterventionMedicationViewModel extends BaseViewModel {
Future getInterventionMedication({
int projectId,
int patientId,
int admissionNo,
DateTime fromDate,
DateTime toDate,
}) async {
InterventionMedicationReqModel interventionMedicationReqModel =
InterventionMedicationReqModel(
projectID: 15,
patientID: 79941,
fromDate: '\/Date(1488322922)\/',
toDate: '\/Date(1635886800000)\/',
projectID: projectId,
patientID: patientId,
fromDate: AppDateUtils.convertToServerFormat(
fromDate.toString(),
'MM/dd/yyyy'),
toDate: AppDateUtils.convertToServerFormat(
toDate.toString(),
'MM/dd/yyyy'),
);
hasError = false;
setState(ViewState.Busy);
setState(ViewState.BusyLocal);
await _interventionMedicationService.getInterventionMedication(
interventionMedicationReqModel: interventionMedicationReqModel);
if (_interventionMedicationService.hasError) {
@ -47,18 +70,22 @@ class InterventionMedicationViewModel extends BaseViewModel {
Future getInterventionMedicationHistory({
int projectId,
int patientId,
int admissionNo,
int prescriptionNo,
int orderNo,
}) async {
InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel =
InterventionMedicationHistoryReqModel(
projectID: 15,
patientID: 79941,
admissionNo: 2018013900,
prescriptionNo: 2045165,
orderNo: 1171570,
projectID: projectId,
patientID: patientId,
admissionNo: admissionNo,
prescriptionNo: prescriptionNo,
orderNo: orderNo,
);
hasError = false;
setState(ViewState.Busy);
setState(ViewState.BusyLocal);
await _interventionMedicationService.getInterventionMedicationHistory(
interventionMedicationHistoryReqModel: interventionMedicationHistoryReqModel);
if (_interventionMedicationService.hasError) {
@ -72,15 +99,24 @@ class InterventionMedicationViewModel extends BaseViewModel {
Future setAcceptedOrRejected({
String remarks,
int memberId,
int projectId,
int patientID,
int admissionNo,
int prescriptionNo,
int orderNo,
}) async {
AcceptOrRejectReqModel acceptOrRejectReqModel =
AcceptOrRejectReqModel(
projectID: 15,
patientID: 79941,
admissionNo: 2018013900,
prescriptionNo: 2045165,
orderNo: 1171570,
remarks: remarks
projectID: projectId,
patientID: patientID,
admissionNo: admissionNo,
prescriptionNo: prescriptionNo,
orderNo: orderNo,
accessLevel: 4,
lineItemNo: 1,
remarks: remarks,
memberID: memberId,
);
hasError = false;
setState(ViewState.BusyLocal);

@ -67,7 +67,6 @@ import 'core/viewModel/patient-ucaf-viewmodel.dart';
import 'core/viewModel/patient-vital-sign-viewmodel.dart';
import 'core/viewModel/prescriptions_view_model.dart';
import 'core/viewModel/profile/intervention_medication_view_model.dart';
import 'core/viewModel/profile/pharmacy_intervention_view_model.dart';
import 'core/viewModel/profile/vte_assessment_view_model.dart';
import 'core/viewModel/radiology_view_model.dart';
import 'core/viewModel/referral_view_model.dart';
@ -150,7 +149,6 @@ void setupLocator() {
locator.registerFactory(() => PatientRegistrationViewModel());
locator.registerFactory(() => PendingOrdersViewModel());
locator.registerFactory(() => DischargeSummaryViewModel());
locator.registerFactory(() => PharmacyInterventionViewModel());
locator.registerFactory(() => VteAssessmentViewModel());
locator.registerFactory(() => InterventionMedicationViewModel());
}

@ -1,8 +1,4 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/profile/vte_assessment_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -16,7 +12,6 @@ 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:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../core/viewModel/profile/intervention_medication_view_model.dart';
import '../../../../widgets/transitions/fade_page.dart';
import 'intervention_medication_history_screen.dart';
@ -28,10 +23,12 @@ class InterventionMedicationScreen extends StatefulWidget {
const InterventionMedicationScreen(this.patient, {Key key}) : super(key: key);
@override
_InterventionMedicationScreenState createState() => _InterventionMedicationScreenState();
_InterventionMedicationScreenState createState() =>
_InterventionMedicationScreenState();
}
class _InterventionMedicationScreenState extends State<InterventionMedicationScreen> {
class _InterventionMedicationScreenState
extends State<InterventionMedicationScreen> {
bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel;
@ -42,11 +39,13 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
projectViewModel = Provider.of(context);
return BaseView<InterventionMedicationViewModel>(
onModelReady: (model) => model.getInterventionMedication(patientId: widget.patient.patientId,
// admissionNo: 2016023498
admissionNo:int.parse(widget.patient.admissionNo)
onModelReady: (model) => model.getInterventionMedication(
patientId: widget.patient.patientId,
admissionNo: int.parse(widget.patient.admissionNo),
fromDate: model.selectedFromDate,
toDate: model.selectedToDate,
),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
@ -55,270 +54,212 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
isInpatient: true,
),
body: model.allInterventionList == null ||
model.allInterventionList.length == 0
model.allInterventionList.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
),
)
: InkWell(
child: Container(
color: Colors.grey[200],
child: Column(
children: <Widget>[
Expanded(
child: Container(
child: ListView.builder(
itemCount: model.allInterventionList.length,
itemBuilder: (BuildContext ctxt, int index) {
return FractionallySizedBox(
widthFactor: 0.95,
child: CardWithBgWidget(
hasBorder: false,
bgColor: Colors.transparent,
widget: Column(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SizedBox(
height: 10,
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.start,
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
),
)
: Container(
color: Colors.grey[200],
child: Column(
children: <Widget>[
Expanded(
child: Container(
child: ListView.builder(
itemCount: model.allInterventionList.length,
itemBuilder: (BuildContext ctxt, int index) {
return InkWell(
child: FractionallySizedBox(
widthFactor: 0.95,
child: CardWithBgWidget(
hasBorder: false,
bgColor: Colors.transparent,
widget: Column(
children: [
Container(
width: MediaQuery.of(context)
.size
.width *
0.60,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
AppText(
model
.allInterventionList[
index].cS,
fontWeight: FontWeight.w600,
fontSize: 14,
),
],
),
],
),
),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SizedBox(
height: 10,
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment
.start,
CrossAxisAlignment.start,
children: [
AppText(
AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(
model
.allInterventionList[
index].startDatetime)
,isArabic:
projectViewModel
.isArabic,
isMonthShort: true),
fontWeight: FontWeight.w600,
fontSize: 14,
Container(
width: MediaQuery.of(context)
.size
.width *
0.60,
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
AppText(
model
.allInterventionList[
index]
.cS,
fontWeight:
FontWeight.w600,
fontSize: 14,
),
],
),
],
),
),
Column(
children: [
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
AppText(
AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(model
.allInterventionList[
index]
.startDatetime),
isArabic:
projectViewModel
.isArabic,
isMonthShort:
true),
fontWeight:
FontWeight.w600,
fontSize: 14,
),
],
),
],
)
],
),
],
)
// Column(
// children: [
// AppText(
// model
// .allInterventionList[
// index]
// .startDatetime !=
// null
// ? AppDateUtils.getDayMonthYearDateFormatted(
// AppDateUtils
// .getDateTimeFromString(model
// .allInterventionList[
// index]
// .startDatetime),
// isArabic:
// projectViewModel
// .isArabic,
// isMonthShort: true)
// : AppDateUtils
// .getDayMonthYearDateFormatted(
// DateTime.now(),
// isArabic:
// projectViewModel
// .isArabic),
// fontWeight: FontWeight.w600,
// fontSize: 14,
// isCopyable: true,
// ),
// AppText(
// model
// .allInterventionList[
// index]
// .startDatetime !=
// null
// ? AppDateUtils.getHour(
// AppDateUtils
// .getDateTimeFromString(model
// .allInterventionList[
// index]
// .startDatetime))
// : AppDateUtils.getHour(
// DateTime.now()),
// fontWeight: FontWeight.w600,
// fontSize: 14,
// isCopyable: true,
// ),
// ],
// crossAxisAlignment:
// CrossAxisAlignment.end,
// )
],
),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context)
// .VTE_Type +
// " : ",
// fontSize: 12,
// ),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.description,
fontSize: 12,
isCopyable: true,
SizedBox(
height: 8,
),
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context)
// .pharmacology +
// " : ",
// fontSize: 12,
// ),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.medication,
fontSize: 12,
isCopyable: true,
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'Description: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.description,
fontSize: 12,
isCopyable: true,
),
),
]),
SizedBox(
height: 8,
),
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context)
// .reasonsThrombo +
// " : ",
// fontSize: 12,
// ),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.doctorComments,
fontSize: 12,
isCopyable: true,
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'Medication: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.medication,
fontSize: 12,
isCopyable: true,
),
),
]),
SizedBox(
height: 8,
),
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context)
// .reasonsThrombo +
// " : ",
// fontSize: 12,
// ),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.statusDescription,
fontSize: 12,
isCopyable: true,
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'Doctor Comments: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.doctorComments,
fontSize: 12,
isCopyable: true,
),
),
]),
SizedBox(
height: 8,
),
),
]),
],
),
SizedBox(
height: 20,
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
'Status Description: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
.allInterventionList[
index]
.statusDescription,
fontSize: 12,
isCopyable: true,
),
),
]),
],
),
SizedBox(
height: 20,
),
],
),
),
),
],
),
),
);
}),
onTap: () {
Navigator.push(
context,
FadePage(
page: InterventionMedicationHistoryScreen(widget.patient, model.allInterventionList[index]),
),
);
},
);
}),
),
),
],
),
),
],
),
),
onTap: () {
// PatiantInformtion patient;
Navigator.push(
context,
FadePage(
page: InterventionMedicationHistoryScreen(widget.patient),
),
);
},
),
),
);
}

@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/pharmacy-intervention-model/new_medication_res_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
@ -24,7 +25,8 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class InterventionMedicationHistoryScreen extends StatefulWidget {
final PatiantInformtion patient;
const InterventionMedicationHistoryScreen(this.patient, {Key key}) : super(key: key);
final InterventionMedicationResModel interventionMedication;
const InterventionMedicationHistoryScreen(this.patient, this.interventionMedication, {Key key}) : super(key: key);
@override
_InterventionMedicationHistoryScreenState createState() => _InterventionMedicationHistoryScreenState();
@ -41,7 +43,12 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
projectViewModel = Provider.of(context);
return BaseView<InterventionMedicationViewModel>(
onModelReady: (model) => model.getInterventionMedicationHistory(patientId: widget.patient.patientId,
onModelReady: (model) => model.getInterventionMedicationHistory(
patientId: widget.patient.patientId,
projectId: widget.interventionMedication.projectID,
admissionNo: widget.interventionMedication.admissionNo,
prescriptionNo: widget.interventionMedication.prescriptionNo,
orderNo: widget.interventionMedication.orderNo,
),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
@ -133,61 +140,10 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
fontWeight: FontWeight.w600,
fontSize: 14,
),
],
),
],
)
// Column(
// children: [
// AppText(
// model
// .allInterventionList[
// index]
// .startDatetime !=
// null
// ? AppDateUtils.getDayMonthYearDateFormatted(
// AppDateUtils
// .getDateTimeFromString(model
// .allInterventionList[
// index]
// .startDatetime),
// isArabic:
// projectViewModel
// .isArabic,
// isMonthShort: true)
// : AppDateUtils
// .getDayMonthYearDateFormatted(
// DateTime.now(),
// isArabic:
// projectViewModel
// .isArabic),
// fontWeight: FontWeight.w600,
// fontSize: 14,
// isCopyable: true,
// ),
// AppText(
// model
// .allInterventionList[
// index]
// .startDatetime !=
// null
// ? AppDateUtils.getHour(
// AppDateUtils
// .getDateTimeFromString(model
// .allInterventionList[
// index]
// .startDatetime))
// : AppDateUtils.getHour(
// DateTime.now()),
// fontWeight: FontWeight.w600,
// fontSize: 14,
// isCopyable: true,
// ),
// ],
// crossAxisAlignment:
// CrossAxisAlignment.end,
// )
],
),
SizedBox(
@ -197,12 +153,10 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
mainAxisAlignment:
MainAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context)
// .VTE_Type +
// " : ",
// fontSize: 12,
// ),
AppText(
'Remark: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
@ -221,12 +175,10 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
mainAxisAlignment:
MainAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context)
// .pharmacology +
// " : ",
// fontSize: 12,
// ),
AppText(
'Created By Name: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
@ -245,12 +197,10 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
mainAxisAlignment:
MainAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context)
// .reasonsThrombo +
// " : ",
// fontSize: 12,
// ),
AppText(
'SetUp ID: ',
fontSize: 12,
),
Expanded(
child: AppText(
model
@ -265,28 +215,6 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context)
// .reasonsThrombo +
// " : ",
// fontSize: 12,
// ),
Expanded(
child: AppText(
model
.allInterventionHistoryList[
index]
.setupId,
fontSize: 12,
isCopyable: true,
),
),
]),
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
@ -295,9 +223,16 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
children: [
InkWell(
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.setAcceptedOrRejected(remarks: "Accepted", );
GifLoaderDialogUtils.showMyDialog(context);
model.setAcceptedOrRejected(
remarks: "Accepted",
memberId: model.allInterventionHistoryList[index].commentedBy,
prescriptionNo: model.allInterventionHistoryList[index].prescriptionId,
patientID: model.allInterventionHistoryList[index].patientId,
orderNo: model.allInterventionHistoryList[index].orderNo,
admissionNo: model.allInterventionHistoryList[index].admissionNo,
);
GifLoaderDialogUtils.hideDialog(context);
if(model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
@ -305,7 +240,6 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
DrAppToastMsg.showSuccesToast(
"Has been Successfully accepted");
}
},
child: Container(
decoration: BoxDecoration(
@ -339,8 +273,14 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
model.setAcceptedOrRejected(remarks: "Rejected");
model.setAcceptedOrRejected(
remarks: "Rejected",
memberId: model.allInterventionHistoryList[index].commentedBy,
prescriptionNo: model.allInterventionHistoryList[index].prescriptionId,
patientID: model.allInterventionHistoryList[index].patientId,
orderNo: model.allInterventionHistoryList[index].orderNo,
admissionNo: model.allInterventionHistoryList[index].admissionNo,
);
GifLoaderDialogUtils.hideDialog(context);
if(model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
@ -376,7 +316,6 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
),
],
),
],
),
SizedBox(

@ -7,8 +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/pharmacy_intervention_view_model.dart';
import '../../../../core/viewModel/profile/intervention_medication_view_model.dart';
import '../../../../models/patient/patiant_info_model.dart';
import '../../../base/base_view.dart';
import 'intervention_medication.dart';
@ -16,6 +15,7 @@ import 'intervention_medication.dart';
class PharmacyInterventionScreen extends StatefulWidget {
final OutPatientFilterType outPatientFilterType;
const PharmacyInterventionScreen({
Key key,
this.outPatientFilterType,
@ -38,7 +38,7 @@ class _PharmacyInterventionScreenState
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
return BaseView<PharmacyInterventionViewModel>(
return BaseView<InterventionMedicationViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
@ -173,7 +173,7 @@ class _PharmacyInterventionScreenState
context,
MaterialPageRoute(
builder: (context) =>
InterventionMedicationScreen(patient)),
InterventionMedicationScreen(patient,)),
);
},
),
@ -188,7 +188,7 @@ class _PharmacyInterventionScreenState
)));
}
selectDate(BuildContext context, PharmacyInterventionViewModel model,
selectDate(BuildContext context, InterventionMedicationViewModel model,
{bool isFromDate = true,
DateTime firstDate,
lastDate,
@ -205,7 +205,7 @@ class _PharmacyInterventionScreenState
if (isFromDate) {
setState(() {
model.selectedFromDate = picked;
var date = picked.add(Duration(days: 30));
var date = picked.add(Duration(days: 1));
if (date.isBefore(lastDate)) {
model.selectedToDate = date;
} else
@ -219,26 +219,6 @@ class _PharmacyInterventionScreenState
}
}
// getFirstDate(OutPatientFilterType outPatientFilterType) {
// if (outPatientFilterType == OutPatientFilterType.Previous) {
// return DateTime(F
// DateTime.now().year - 20, DateTime.now().month, DateTime.now().day);
// } else {
// return DateTime(
// DateTime.now().year, DateTime.now().month, DateTime.now().day + 1);
// }
// }
// getLastDate(OutPatientFilterType outPatientFilterType) {
// if (outPatientFilterType == OutPatientFilterType.Previous) {
// return DateTime(
// DateTime.now().year, DateTime.now().month, DateTime.now().day - 1);
// } else {
// return DateTime(
// DateTime.now().year , DateTime.now().month , DateTime.now().day + 100);
// }
// }
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {

@ -176,10 +176,10 @@ class ProfileGridForInPatient extends StatelessWidget {
isInPatient: isInpatient,
),
PatientProfileCardModel(
'Pharmacy',
'intervention',
TranslationBase.of(context).pharmacy,
TranslationBase.of(context).intervention,
PHARMACY_INTERVENTION,
'',
'assets/images/svgs/profile_screen/medical report.svg',
isInPatient: isInpatient,
),
];

@ -1725,6 +1725,10 @@ class TranslationBase {
String get diabetic => localizedValues['diabetic'][locale.languageCode];
String get pharmacy => localizedValues['pharmacy'][locale.languageCode];
String get intervention => localizedValues['intervention'][locale.languageCode];
String get chart => localizedValues['chart'][locale.languageCode];
String get investigation =>

Loading…
Cancel
Save