Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into roaa_schedule_design

merge-requests/961/head
RoaaGhali98 4 years ago
commit b8076f177b

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

@ -64,6 +64,7 @@ class BaseAppClient {
body['TokenID'] = token ?? '';
}
// body['TokenID'] = "@dm!n" ?? '';
if (!isFallLanguage) {
String lang = await sharedPref.getString(APP_Language);
if (lang != null && lang == 'ar')

@ -386,6 +386,18 @@ const GET_PENDING_DISCHARGE_SUMMARY =
const GET_ALL_DISCHARGE_SUMMARY =
"Services/DoctorApplication.svc/REST/DoctorApp_GetDischargeSummary";
const VTE_ASSESSMENT =
"Services/Patients.svc/REST/INP_GetVTEHistoryByTransactionNo";
const GET_INTERVENTION_MEDICATION =
"Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionMedications";
const GET_INTERVENTION_MEDICATION_HISTORY =
"Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionHistory";
const SET_ACCEPTED_OR_REJECTED =
"Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention";
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************

@ -20,6 +20,7 @@ const Map<String, Map<String, String>> localizedValues = {
"ar": "ليس لديك أي جدول"
},
"verify": {"en": "VERIFY", "ar": "تحقق"},
"pharmacy-intervention": {"en": "Pharmacy Intervention", "ar": "التدخل الصيدلاني"},
"referralDoctor": {"en": "Referral Doctor", "ar": "الطبيب المُحول إليه"},
"referringClinic": {"en": "Referring Clinic", "ar": "العيادة المُحول إليها"},
"frequency": {"en": "Frequency", "ar": "تكرر"},
@ -537,6 +538,10 @@ const Map<String, Map<String, String>> localizedValues = {
"selectSeverity": {"en": "Select Severity", "ar": "حدد الخطورة"},
"leaveCreated": {"en": "Leave has been created", "ar": "تم إنشاء الإجازة"},
"medications": {"en": "Medications", "ar": "الأدوية"},
"medication": {"en": "Medication", "ar": "الدواء"},
"createdByName": {"en": "Created By Name", "ar": "الدواء"},
"statusDescription": {"en": "Status Description", "ar": "وصف الحالة"},
"doctorComments": {"en": "Doctor Comments", "ar": "تعليقات الطبيب"},
"procedures": {"en": "Procedures", "ar": "الإجراءات"},
"vitalSignEmptyMsg": {
"en": "There is no vital signs for this patient",
@ -663,6 +668,7 @@ const Map<String, Map<String, String>> localizedValues = {
"progressNoteSOAP": {"en": "Progress Note", "ar": "ملاحظة التقدم"},
"addProgressNote": {"en": "Add Progress Note", "ar": "أضف ملاحظة التقدم"},
"createdBy": {"en": "Created By :", "ar": "أضيفت عن طريق: "},
"riskScore": {"en": "Risk Score :", "ar": "درجة المخاطر"},
"editedBy": {"en": "Edited By :", "ar": "عدلت من : "},
"currentMedications": {"en": "Current Medications", "ar": "الأدوية الحالية"},
"noItem": {
@ -1053,6 +1059,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 :",
@ -1118,4 +1126,7 @@ const Map<String, Map<String, String>> localizedValues = {
},
"planedProcedure": {"en": "Planed Procedure", "ar": "الإجراء المخطط"},
"moreDetails": {"en": "More Details", "ar": "المزيد من التفاصيل"},
"VTE_Type": {"en": "VTE Type", "ar": "VTE Type"},
"pharmacology": {"en": "Pharmacology", "ar": "علم العقاقير"},
"reasonsThrombo": {"en": "Reasons Thrombo", "ar": "أسباب ثرومبو"},
};

@ -0,0 +1,22 @@
class VteAssessmentRequestModel {
String setupID;
int parameterGroup;
int transactionNo;
VteAssessmentRequestModel(
{this.setupID = "010266", this.parameterGroup = 7, this.transactionNo});
VteAssessmentRequestModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
parameterGroup = json['ParameterGroup'];
transactionNo = json['TransactionNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ParameterGroup'] = this.parameterGroup;
data['TransactionNo'] = this.transactionNo;
return data;
}
}

@ -0,0 +1,48 @@
class VteAssessmentResponseModel {
int lineItemNo;
String vTEType;
String ambulationProtocol;
String pharmacology;
String reasonsThrombo;
String riskScore;
int totalScore;
int createdBy;
String createdOn;
VteAssessmentResponseModel(
{this.lineItemNo,
this.vTEType,
this.ambulationProtocol,
this.pharmacology,
this.reasonsThrombo,
this.riskScore,
this.totalScore,
this.createdBy,
this.createdOn});
VteAssessmentResponseModel.fromJson(Map<String, dynamic> json) {
lineItemNo = json['LineItemNo'];
vTEType = json['VTE_Type'];
ambulationProtocol = json['AmbulationProtocol'];
pharmacology = json['Pharmacology'];
reasonsThrombo = json['ReasonsThrombo'];
riskScore = json['Risk_Score'];
totalScore = json['Total_Score'];
createdBy = json['Created_By'];
createdOn = json['Created_On'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['LineItemNo'] = this.lineItemNo;
data['VTE_Type'] = this.vTEType;
data['AmbulationProtocol'] = this.ambulationProtocol;
data['Pharmacology'] = this.pharmacology;
data['ReasonsThrombo'] = this.reasonsThrombo;
data['Risk_Score'] = this.riskScore;
data['Total_Score'] = this.totalScore;
data['Created_By'] = this.createdBy;
data['Created_On'] = this.createdOn;
return data;
}
}

@ -0,0 +1,68 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.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';
class InterventionMedicationService extends BaseService {
List<InterventionMedicationResModel> _allInterventionList = [];
List<InterventionMedicationHistoryResModel> _allInterventionHistoryList = [];
List<InterventionMedicationResModel> get allInterventionList =>
_allInterventionList;
List<InterventionMedicationHistoryResModel> get allInterventionHistoryList =>
_allInterventionHistoryList;
Future getInterventionMedication(
{InterventionMedicationReqModel interventionMedicationReqModel}) async {
hasError = false;
await baseAppClient.post(GET_INTERVENTION_MEDICATION,
onSuccess: (dynamic response, int statusCode) {
_allInterventionList.clear();
response['List_InterventionMedications'].forEach(
(v) {
_allInterventionList.add(InterventionMedicationResModel.fromJson(v));
},
);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: interventionMedicationReqModel.toJson());
}
Future getInterventionMedicationHistory(
{InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel}) async {
hasError = false;
await baseAppClient.post(GET_INTERVENTION_MEDICATION_HISTORY,
onSuccess: (dynamic response, int statusCode) {
_allInterventionHistoryList.clear();
response['List_InterventionHistory'].forEach(
(v) {
_allInterventionHistoryList.add(InterventionMedicationHistoryResModel.fromJson(v));
},
);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: interventionMedicationHistoryReqModel.toJson());
}
Future setAcceptedOrRejected(
{AcceptOrRejectReqModel acceptOrRejectReqModel}) async {
hasError = false;
await baseAppClient.post(SET_ACCEPTED_OR_REJECTED,
onSuccess: (dynamic response, int statusCode) {
_allInterventionHistoryList.clear();
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: acceptOrRejectReqModel.toJson());
}
}

@ -0,0 +1,30 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart';
import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart';
class VteAssessmentService extends BaseService {
List<VteAssessmentResponseModel> _allVteHistoryList = [];
List<VteAssessmentResponseModel> get allVteHistoryList =>
_allVteHistoryList;
Future getVteAssessment(
{VteAssessmentRequestModel vteAssessmentRequestModel}) async {
hasError = false;
await baseAppClient.post(VTE_ASSESSMENT,
onSuccess: (dynamic response, int statusCode) {
_allVteHistoryList.clear();
response['INP_VTEHistoryByTransactionNo_List'].forEach(
(v) {
_allVteHistoryList.add(VteAssessmentResponseModel.fromJson(v));
},
);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: vteAssessmentRequestModel.toJson());
}
}

@ -126,7 +126,7 @@ class PatientSearchViewModel extends BaseViewModel {
} else if (OutPatientFilterType.NextWeek == outPatientFilterType) {
dateTo = AppDateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 6),
DateTime.now().day + 7),
'yyyy-MM-dd');
dateFrom = AppDateUtils.convertDateToFormat(

@ -230,12 +230,12 @@ class PatientReferralViewModel extends BaseViewModel {
Future makeReferral(PatiantInformtion patient, String isoStringDate,
int projectID, int clinicID, int doctorID, String remarks) async {
setState(ViewState.Busy);
setState(ViewState.BusyLocal);
await _referralPatientService.makeReferral(
patient, isoStringDate, projectID, clinicID, doctorID, remarks);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}

@ -0,0 +1,146 @@
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.now();
DateTime selectedToDate = DateTime.now().add(Duration(days: 1));
PatiantInformtion patient;
bool hasError = false;
InterventionMedicationService _interventionMedicationService =
locator<InterventionMedicationService>();
List<InterventionMedicationResModel> get allInterventionList =>
_interventionMedicationService.allInterventionList;
List<InterventionMedicationHistoryResModel> get allInterventionHistoryList =>
_interventionMedicationService.allInterventionHistoryList;
Future getInterventionMedication({
int projectId,
int patientId,
DateTime fromDate,
DateTime toDate,
}) async {
InterventionMedicationReqModel interventionMedicationReqModel =
InterventionMedicationReqModel(
projectID: projectId,
patientID: patientId,
fromDate: AppDateUtils.convertDateToServerFormat(fromDate),
toDate: AppDateUtils.convertDateToServerFormat(toDate),
);
hasError = false;
setState(ViewState.Busy);
await _interventionMedicationService.getInterventionMedication(
interventionMedicationReqModel: interventionMedicationReqModel);
if (_interventionMedicationService.hasError) {
error = _interventionMedicationService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
Future getInterventionMedicationHistory(
{
int projectId,
int patientId,
int admissionNo,
int prescriptionNo,
int orderNo,
bool isBusyLocal = false}) async {
InterventionMedicationHistoryReqModel
interventionMedicationHistoryReqModel =
InterventionMedicationHistoryReqModel(
projectID: projectId,
patientID: patientId,
admissionNo: admissionNo,
prescriptionNo: prescriptionNo,
orderNo: orderNo,
);
hasError = false;
if (isBusyLocal)
setState(ViewState.Busy);
else
setState(ViewState.Busy);
await _interventionMedicationService.getInterventionMedicationHistory(
interventionMedicationHistoryReqModel:
interventionMedicationHistoryReqModel);
if (_interventionMedicationService.hasError) {
error = _interventionMedicationService.error;
if (isBusyLocal)
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
Future setAcceptedOrRejected({
String remarks,
int memberId,
int projectId,
int patientID,
int admissionNo,
int prescriptionNo,
int orderNo,
int interventionStatus,
int status,
}) async {
AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel(
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);
await _interventionMedicationService.setAcceptedOrRejected(
acceptOrRejectReqModel: acceptOrRejectReqModel);
if (_interventionMedicationService.hasError) {
error = _interventionMedicationService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -0,0 +1,45 @@
import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart';
import 'package:doctor_app_flutter/core/service/patient/patientInPatientService.dart';
import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart';
import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
class PharmacyInterventionViewModel extends BaseViewModel {
OutPatientService _outPatientService = locator<OutPatientService>();
SpecialClinicsService _specialClinicsService =
locator<SpecialClinicsService>();
List<PatiantInformtion> get patientList => _outPatientService.patientList;
List<GetSpecialClinicalCareMappingListResponseModel>
get specialClinicalCareMappingList =>
_specialClinicsService.specialClinicalCareMappingList;
List<PatiantInformtion> filterData = [];
DateTime selectedFromDate;
DateTime selectedToDate;
int firstSubsetIndex = 0;
int inPatientPageSize = 20;
int lastSubsetIndex = 20;
List<String> InpatientClinicList = [];
PatientInPatientService _inPatientService =
locator<PatientInPatientService>();
List<PatiantInformtion> get inPatientList => _inPatientService.inPatientList;
List<PatiantInformtion> get myIinPatientList =>
_inPatientService.myInPatientList;
List<PatiantInformtion> filteredInPatientItems = List();
List<PatiantInformtion> filteredMyInPatientItems = List();
}

@ -0,0 +1,37 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/service/patient/profile/discharge_summary_servive.dart';
import 'package:doctor_app_flutter/core/service/patient/profile/vte_assessment_service.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/discharge_summary/GetDischargeSummaryReqModel.dart';
import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart';
class VteAssessmentViewModel extends BaseViewModel {
bool hasError = false;
VteAssessmentService _VteAssessmentService =
locator<VteAssessmentService>();
List<VteAssessmentResponseModel> get allVteHistoryList =>
_VteAssessmentService.allVteHistoryList;
Future getVteAssessment({
int patientId,
int admissionNo,
}) async {
VteAssessmentRequestModel vteAssessmentRequestModel =
VteAssessmentRequestModel(
transactionNo: admissionNo);
hasError = false;
setState(ViewState.Busy);
await _VteAssessmentService.getVteAssessment(
vteAssessmentRequestModel: vteAssessmentRequestModel);
if (_VteAssessmentService.hasError) {
error = _VteAssessmentService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -49,16 +49,13 @@ class _LandingPageState extends State<LandingPage> {
backgroundColor: HexColor('#FFFFFF'),
//textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: currentTab != 0
? Padding(
padding: const EdgeInsets.only(right: 188,top: 36),
child: AppText(
getText(currentTab),
letterSpacing: -1.44,
fontWeight: FontWeight.w700,
fontSize: 24.0,
color: Color(0xff2B353E),
),
)
? AppText(
getText(currentTab),
letterSpacing: -1.44,
fontWeight: FontWeight.w700,
fontSize: 24.0,
color: Color(0xff2B353E),
)
: SizedBox(),
leading: Builder(
builder: (BuildContext context) {

@ -14,7 +14,6 @@ import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_
import 'package:doctor_app_flutter/core/viewModel/scan_qr_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:get_it/get_it.dart';
import 'core/service/AnalyticsService.dart';
import 'core/service/NavigationService.dart';
import 'core/service/PatientRegistrationService.dart';
@ -32,7 +31,9 @@ import 'core/service/patient/out_patient_service.dart';
import 'core/service/patient/patient-doctor-referral-service.dart';
import 'core/service/patient/patientInPatientService.dart';
import 'core/service/patient/patient_service.dart';
import 'core/service/patient/profile/intervention_medication_service.dart';
import 'core/service/patient/profile/operation_report_servive.dart';
import 'core/service/patient/profile/vte_assessment_service.dart';
import 'core/service/patient/referral_patient_service.dart';
import 'core/service/patient_medical_file/admission_request/patient-admission-request-service.dart';
import 'core/service/patient_medical_file/insurance/InsuranceCardService.dart';
@ -65,6 +66,8 @@ import 'core/viewModel/patient-referral-viewmodel.dart';
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/vte_assessment_view_model.dart';
import 'core/viewModel/radiology_view_model.dart';
import 'core/viewModel/referral_view_model.dart';
import 'core/viewModel/schedule_view_model.dart';
@ -112,6 +115,8 @@ void setupLocator() {
locator.registerLazySingleton(() => PendingOrderService());
locator.registerLazySingleton(() => PatientRegistrationService());
locator.registerLazySingleton(() => DischargeSummaryService());
locator.registerLazySingleton(() => VteAssessmentService());
locator.registerLazySingleton(() => InterventionMedicationService());
/// View Model
locator.registerFactory(() => DoctorReplayViewModel());
@ -144,4 +149,6 @@ void setupLocator() {
locator.registerFactory(() => PatientRegistrationViewModel());
locator.registerFactory(() => PendingOrdersViewModel());
locator.registerFactory(() => DischargeSummaryViewModel());
locator.registerFactory(() => VteAssessmentViewModel());
locator.registerFactory(() => InterventionMedicationViewModel());
}

@ -1,6 +1,7 @@
// TODO = it have to be changed.
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
class PatiantInformtion {
PatiantInformtion patientDetails;
@ -199,8 +200,8 @@ class PatiantInformtion {
bedId = json["BedID"] ?? json["bedID"];
nursingStationId = json["NursingStationID"] ?? json["nursingStationID"];
description = json["Description"] ?? json["description"];
clinicDescription =
json["ClinicDescription"] ?? json["clinicDescription"];
clinicDescription = Helpers.convertToTitleCase(
json["ClinicDescription"] ?? json["clinicDescription"]??'');
clinicDescriptionN =
json["ClinicDescriptionN"] ?? json["clinicDescriptionN"];
nationalityName = json["NationalityName"] ??

@ -18,10 +18,12 @@ import 'package:doctor_app_flutter/screens/patients/profile/notes/note/progress_
import 'package:doctor_app_flutter/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/operation_report/operation_report.dart';
import 'package:doctor_app_flutter/screens/patients/profile/pending_orders/pending_orders_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/refer-patient-screen-in-patient.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vte_assessment/vte_assessment_screen.dart';
import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart';
import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart';
@ -80,7 +82,11 @@ const String NURSING_PROGRESS_NOTE = 'nursing_progress_note';
const String DIAGNOSIS_FOR_IN_PATIENT = 'get_diagnosis_for_in_patient';
const String DIABETIC_CHART_VALUES = 'get_diabetic_chart_values';
const String VTE_ASSESSMENT = 'vte_assessment ';
const String DISCHARGE_SUMMARY = 'discharge_summary';
const String PHARMACY_INTERVENTION = 'new_medication';
const String INTERVENTION_MEDICATION = 'intervention_medication';
//todo: change the routing way.
var routes = {
@ -131,4 +137,6 @@ var routes = {
DIAGNOSIS_FOR_IN_PATIENT: (_) => DiagnosisScreen(),
ADMISSION_ORDERS: (_) => AdmissionOrdersScreen(),
DIABETIC_CHART_VALUES: (_) => DiabeticChart(),
PHARMACY_INTERVENTION: (_) => PharmacyInterventionScreen(),
VTE_ASSESSMENT: (_) => VteAssessmentScreen(),
};

@ -207,10 +207,11 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
label: TranslationBase.of(context).fileNumber,
value: widget.reply.patientID.toString(),
isCopyable: false,
isExpanded: false,
),
CustomRow(
label: TranslationBase.of(context).age + " : ",
isCopyable: false,
label: TranslationBase.of(context).age + " : ", isCopyable: false,
isExpanded: false,
value:
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}",
),

@ -424,24 +424,24 @@ class _HomeScreenState extends State<HomeScreen> {
},
));
changeColorIndex();
patientCards.add(HomePatientCard(
gradient: backgroundColors[colorIndex],
backgroundIconColor: backgroundIconColors[colorIndex],
//TODO Elham* match the of the icon
cardIcon: DoctorApp.arrival_patients,
textColor: textColors[colorIndex],
text: TranslationBase.of(context).registerNewPatient,
onTap: () {
Navigator.push(
context,
FadePage(
page: RegisterPatientPage(),
),
);
},
));
changeColorIndex();
//TODO Keep commented
// patientCards.add(HomePatientCard(
// gradient: backgroundColors[colorIndex],
// backgroundIconColor: backgroundIconColors[colorIndex],
// //TODO Elham* match the of the icon
// cardIcon: DoctorApp.arrival_patients,
// textColor: textColors[colorIndex],
// text: TranslationBase.of(context).registerNewPatient,
// onTap: () {
// Navigator.push(
// context,
// FadePage(
// page: RegisterPatientPage(),
// ),
// );
// },
// ));
// changeColorIndex();
patientCards.add(HomePatientCard(
gradient: backgroundColors[colorIndex],

@ -13,7 +13,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/buttons/app_buttons_widget.dart';

@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/doctor_card.dart';

@ -4,7 +4,7 @@ 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/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/expandable-widget-header-body.dart';

@ -12,7 +12,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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';

@ -6,7 +6,7 @@ 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/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';

@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/insurance_approvals_details.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card_insurance.dart';
import 'package:flutter/cupertino.dart';

@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/user-guid/CusomRow.dart';

@ -38,6 +38,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
final _whereController = TextEditingController();
final _managementsLineController = TextEditingController();
final _signsController = TextEditingController();
///TODO Elham* fix this
List<Map> conditionsData = [
{"name": "CHRONIC", "isChecked": false},
{"name": "RTA", "isChecked": false},
@ -383,7 +385,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
error: model.patientVitalSignsHistory == null ||
model.patientVitalSignsHistory.length == 0
? TranslationBase.of(context).vitalSignEmptyMsg
: TranslationBase.of(context)))
: TranslationBase.of(context).chiefComplaintEmptyMsg))
: Container(),
),
);

@ -5,7 +5,7 @@ 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/UCAF/page-stepper-widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/buttons/app_buttons_widget.dart';

@ -5,7 +5,7 @@ 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/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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';

@ -9,7 +9,7 @@ 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/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/buttons/app_buttons_widget.dart';

@ -10,7 +10,7 @@ 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/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/buttons/app_buttons_widget.dart';

@ -12,7 +12,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/buttons/app_buttons_widget.dart';

@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/errors/error_message.dart';

@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.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/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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';

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/text_fields/text_fields_utils.dart';

@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/special_lab_result_details_page.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/doctor_card.dart';

@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/labs_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/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_pag
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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';

@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.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/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/errors/error_message.dart';

@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportMod
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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/errors/error_message.dart';

@ -14,7 +14,7 @@ import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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';

@ -16,7 +16,7 @@ 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/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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';

@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.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/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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';

@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/operation_report/update_operation_report.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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:flutter/material.dart';

@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dar
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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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';

@ -0,0 +1,66 @@
class AcceptOrRejectReqModel {
int patientID;
int projectID;
int admissionNo;
int prescriptionNo;
int orderNo;
String remarks;
int memberID;
int accessLevel;
int languageID;
int lineItemNo;
bool patientOutSA;
int interventionStatus;
int status;
AcceptOrRejectReqModel(
{this.patientID,
this.projectID,
this.admissionNo,
this.prescriptionNo,
this.orderNo,
this.remarks,
this.memberID,
this.accessLevel,
this.languageID,
this.lineItemNo,
this.patientOutSA,
this.interventionStatus,
this.status
});
AcceptOrRejectReqModel.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];
projectID = json['ProjectID'];
admissionNo = json['AdmissionNo'];
prescriptionNo = json['PrescriptionNo'];
orderNo = json['OrderNo'];
remarks = json['Remarks'];
memberID = json['MemberID'];
accessLevel = json['AccessLevel'];
languageID = json['LanguageID'];
lineItemNo = json['LineItemNo'];
patientOutSA = json['PatientOutSA'];
interventionStatus = json['InterventionStatus'];
status = json['Status'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientID'] = this.patientID;
data['ProjectID'] = this.projectID;
data['AdmissionNo'] = this.admissionNo;
data['PrescriptionNo'] = this.prescriptionNo;
data['OrderNo'] = this.orderNo;
data['Remarks'] = this.remarks;
data['MemberID'] = this.memberID;
data['AccessLevel'] = this.accessLevel;
data['LanguageID'] = this.languageID;
data['LineItemNo'] = this.lineItemNo;
data['PatientOutSA'] = this.patientOutSA;
data['InterventionStatus'] = this.interventionStatus;
data['Status'] = this.status;
return data;
}
}

@ -0,0 +1,32 @@
class InterventionMedicationHistoryReqModel {
int projectID;
int patientID;
int admissionNo;
int orderNo;
int prescriptionNo;
InterventionMedicationHistoryReqModel(
{this.projectID,
this.patientID,
this.admissionNo,
this.orderNo,
this.prescriptionNo});
InterventionMedicationHistoryReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
patientID = json['PatientID'];
admissionNo = json['AdmissionNo'];
orderNo = json['OrderNo'];
prescriptionNo = json['PrescriptionNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['AdmissionNo'] = this.admissionNo;
data['OrderNo'] = this.orderNo;
data['PrescriptionNo'] = this.prescriptionNo;
return data;
}
}

@ -0,0 +1,96 @@
class InterventionMedicationHistoryResModel {
String setupId;
String projectId;
int patientId;
int admissionNo;
int prescriptionId;
int orderNo;
int id;
int interventionId;
Null intervention;
String remark;
int commentedBy;
bool isDoctor;
bool isActive;
int createdBy;
String createdByName;
String createdByNameN;
String createdOn;
Null editedBy;
Null editedByName;
Null editedByNameN;
Null editedOn;
InterventionMedicationHistoryResModel(
{this.setupId,
this.projectId,
this.patientId,
this.admissionNo,
this.prescriptionId,
this.orderNo,
this.id,
this.interventionId,
this.intervention,
this.remark,
this.commentedBy,
this.isDoctor,
this.isActive,
this.createdBy,
this.createdByName,
this.createdByNameN,
this.createdOn,
this.editedBy,
this.editedByName,
this.editedByNameN,
this.editedOn});
InterventionMedicationHistoryResModel.fromJson(Map<String, dynamic> json) {
setupId = json['SetupId'];
projectId = json['ProjectId'];
patientId = json['PatientId'];
admissionNo = json['AdmissionNo'];
prescriptionId = json['PrescriptionId'];
orderNo = json['OrderNo'];
id = json['Id'];
interventionId = json['InterventionId'];
intervention = json['Intervention'];
remark = json['Remark'];
commentedBy = json['CommentedBy'];
isDoctor = json['IsDoctor'];
isActive = json['IsActive'];
createdBy = json['CreatedBy'];
createdByName = json['CreatedByName'];
createdByNameN = json['CreatedByNameN'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedByName = json['EditedByName'];
editedByNameN = json['EditedByNameN'];
editedOn = json['EditedOn'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupId'] = this.setupId;
data['ProjectId'] = this.projectId;
data['PatientId'] = this.patientId;
data['AdmissionNo'] = this.admissionNo;
data['PrescriptionId'] = this.prescriptionId;
data['OrderNo'] = this.orderNo;
data['Id'] = this.id;
data['InterventionId'] = this.interventionId;
data['Intervention'] = this.intervention;
data['Remark'] = this.remark;
data['CommentedBy'] = this.commentedBy;
data['IsDoctor'] = this.isDoctor;
data['IsActive'] = this.isActive;
data['CreatedBy'] = this.createdBy;
data['CreatedByName'] = this.createdByName;
data['CreatedByNameN'] = this.createdByNameN;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedByName'] = this.editedByName;
data['EditedByNameN'] = this.editedByNameN;
data['EditedOn'] = this.editedOn;
return data;
}
}

@ -0,0 +1,25 @@
class InterventionMedicationReqModel {
int projectID;
int patientID;
String fromDate;
String toDate;
InterventionMedicationReqModel(
{this.projectID, this.patientID, this.fromDate, this.toDate});
InterventionMedicationReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
patientID = json['PatientID'];
fromDate = json['FromDate'];
toDate = json['ToDate'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['FromDate'] = this.fromDate;
data['ToDate'] = this.toDate;
return data;
}
}

@ -0,0 +1,100 @@
class InterventionMedicationResModel {
String cS;
String iHR;
String setupID;
int projectID;
int accessLevel;
int patientID;
String patientName;
String description;
int admissionNo;
int orderNo;
int prescriptionNo;
int lineItemNo;
int itemID;
String medication;
String doctorComments;
String startDatetime;
String stopDatetime;
int status;
int createdBy;
int authorizedby;
Null pharmacyRemarks;
String statusDescription;
InterventionMedicationResModel(
{this.cS,
this.iHR,
this.setupID,
this.projectID,
this.accessLevel,
this.patientID,
this.patientName,
this.description,
this.admissionNo,
this.orderNo,
this.prescriptionNo,
this.lineItemNo,
this.itemID,
this.medication,
this.doctorComments,
this.startDatetime,
this.stopDatetime,
this.status,
this.createdBy,
this.authorizedby,
this.pharmacyRemarks,
this.statusDescription});
InterventionMedicationResModel.fromJson(Map<String, dynamic> json) {
cS = json['CS'];
iHR = json['IHR'];
setupID = json['SetupID'];
projectID = json['ProjectID'];
accessLevel = json['AccessLevel'];
patientID = json['PatientID'];
patientName = json['PatientName'];
description = json['Description'];
admissionNo = json['AdmissionNo'];
orderNo = json['OrderNo'];
prescriptionNo = json['PrescriptionNo'];
lineItemNo = json['LineItemNo'];
itemID = json['ItemID'];
medication = json['Medication'];
doctorComments = json['DoctorComments'];
startDatetime = json['StartDatetime'];
stopDatetime = json['StopDatetime'];
status = json['Status'];
createdBy = json['CreatedBy'];
authorizedby = json['Authorizedby'];
pharmacyRemarks = json['PharmacyRemarks'];
statusDescription = json['StatusDescription'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['CS'] = this.cS;
data['IHR'] = this.iHR;
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['AccessLevel'] = this.accessLevel;
data['PatientID'] = this.patientID;
data['PatientName'] = this.patientName;
data['Description'] = this.description;
data['AdmissionNo'] = this.admissionNo;
data['OrderNo'] = this.orderNo;
data['PrescriptionNo'] = this.prescriptionNo;
data['LineItemNo'] = this.lineItemNo;
data['ItemID'] = this.itemID;
data['Medication'] = this.medication;
data['DoctorComments'] = this.doctorComments;
data['StartDatetime'] = this.startDatetime;
data['StopDatetime'] = this.stopDatetime;
data['Status'] = this.status;
data['CreatedBy'] = this.createdBy;
data['Authorizedby'] = this.authorizedby;
data['PharmacyRemarks'] = this.pharmacyRemarks;
data['StatusDescription'] = this.statusDescription;
return data;
}
}

@ -0,0 +1,206 @@
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/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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';
import '../../../../widgets/transitions/fade_page.dart';
import 'intervention_medication_history_screen.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class InterventionMedicationScreen extends StatefulWidget {
final PatiantInformtion patient;
final InterventionMedicationViewModel previousModel;
const InterventionMedicationScreen(this.patient, {Key key, this.previousModel}) : super(key: key);
@override
_InterventionMedicationScreenState createState() =>
_InterventionMedicationScreenState();
}
class _InterventionMedicationScreenState
extends State<InterventionMedicationScreen> {
bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
return BaseView<InterventionMedicationViewModel>(
onModelReady: (model) => model.getInterventionMedication(
patientId: widget.patient.patientId,
//admissionNo: int.parse(widget.patient.admissionNo),
fromDate: widget.previousModel.selectedFromDate,
toDate: widget.previousModel.selectedToDate,
),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: PatientProfileAppBar(
widget.patient,
isInpatient: true,
),
body: model.allInterventionList == null ||
model.allInterventionList.length == 0
? Center(
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: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SizedBox(
height: 10,
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
width: MediaQuery.of(context)
.size
.width *
0.60,
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
CustomRow(
valueSize: 14,
label: '',
value: model.allInterventionList[index].cS,
)
],
),
),
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,
color: Color(0xFF2B353E),
),
],
),
],
)
],
),
SizedBox(
height: 8,
),
CustomRow(
labelSize: 12,
valueSize: 12,
label: TranslationBase.of(context).description,
value: model.allInterventionList[index].description,
),
SizedBox(
height: 8,
),
CustomRow(
labelSize: 12,
valueSize: 12,
label: TranslationBase.of(context).medication,
value: model.allInterventionList[index].medication,
),
SizedBox(
height: 8,
),
CustomRow(
labelSize: 12,
valueSize: 12,
label: TranslationBase.of(context).doctorComments,
value: model.allInterventionList[index].doctorComments,
),
SizedBox(
height: 8,
),
CustomRow(
labelSize: 12,
valueSize: 12,
label: TranslationBase.of(context).statusDescription,
value: model.allInterventionList[index].statusDescription,
),
],
),
SizedBox(
height: 20,
),
],
),
),
),
onTap: () {
Navigator.push(
context,
FadePage(
page: InterventionMedicationHistoryScreen(widget.patient, model.allInterventionList[index]),
),
);
},
);
}),
),
),
],
),
),
),
);
}
}

@ -0,0 +1,299 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
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';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/loader/gif_loader_dialog_utils.dart';
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();
class InterventionMedicationHistoryScreen extends StatefulWidget {
final PatiantInformtion patient;
final InterventionMedicationResModel interventionMedication;
const InterventionMedicationHistoryScreen(this.patient, this.interventionMedication, {Key key}) : super(key: key);
@override
_InterventionMedicationHistoryScreenState createState() => _InterventionMedicationHistoryScreenState();
}
class _InterventionMedicationHistoryScreenState extends State<InterventionMedicationHistoryScreen> {
bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
return BaseView<InterventionMedicationViewModel>(
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,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: PatientProfileAppBar(
widget.patient,
isInpatient: true,
),
body: model.allInterventionHistoryList == null ||
model.allInterventionHistoryList.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
),
)
: Container(
color: Colors.grey[200],
child: Column(
children: <Widget>[
Expanded(
child: Container(
child: ListView.builder(
itemCount: model.allInterventionHistoryList.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,
children: [
Container(
width: MediaQuery.of(context)
.size
.width *
0.60,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
CustomRow(
labelSize: 12,
valueSize: 12,
label: TranslationBase.of(context).createdByName,
value: model.allInterventionHistoryList[index].createdByName,
),
],
),
),
Column(
children: [
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
AppText(
AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(
model
.allInterventionHistoryList[
index].createdOn)
,isArabic:
projectViewModel
.isArabic,
isMonthShort: true),
fontWeight: FontWeight.w600,
fontSize: 14,
color: Color(0xFF2B353E),
),
],
),
],
)
],
),
SizedBox(
height: 8,
),
CustomRow(
labelSize: 12,
valueSize: 12,
label: TranslationBase.of(context).remarks,
value: model.allInterventionHistoryList[index].remark,
),
SizedBox(
height: 8,
),
SizedBox(
height: 8,
),
SizedBox(
height: 8,
),
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.end,
children: [
InkWell(
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.setAcceptedOrRejected(
remarks: "",
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,
interventionStatus: 1,
status: 61
);
if(model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
Helpers.showErrorToast(model.error);
} else {
await model.getInterventionMedicationHistory(patientId: widget.patient.patientId,
projectId: widget.interventionMedication.projectID,
admissionNo: widget.interventionMedication.admissionNo,
prescriptionNo: widget.interventionMedication.prescriptionNo,
orderNo: widget.interventionMedication.orderNo,);
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(
"Has been Successfully accepted");
}
},
child: Container(
decoration: BoxDecoration(
color: AppGlobal.appGreenColor,
borderRadius:
BorderRadius.circular(10),
),
// color:Colors.red[600],
child: Row(
children: [
SizedBox(
width: 2,
),
AppText(
TranslationBase.of(context)
.accept,
fontSize: 10,
color: Colors.white,
),
],
),
padding: EdgeInsets.all(6),
),
),
SizedBox(
width: 10,
),
InkWell(
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.setAcceptedOrRejected(
remarks: "",
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,
interventionStatus: 2,
status: 61
);
if(model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
Helpers.showErrorToast(model.error);
} else {
await model.getInterventionMedicationHistory(patientId: widget.patient.patientId,
projectId: widget.interventionMedication.projectID,
admissionNo: widget.interventionMedication.admissionNo,
prescriptionNo: widget.interventionMedication.prescriptionNo,
orderNo: widget.interventionMedication.orderNo,);
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(
"Has been Successfully Rejected");
}
},
child: Container(
decoration: BoxDecoration(
color: AppGlobal.appRedColor,
borderRadius:
BorderRadius.circular(10),
),
// color:Colors.red[600],
child: Row(
children: [
SizedBox(
width: 2,
),
AppText(
TranslationBase.of(context)
.reject,
fontSize: 10,
color: Colors.white,
),
],
),
padding: EdgeInsets.all(6),
),
),
],
),
],
),
SizedBox(
height: 20,
),
],
),
),
);
}),
),
),
],
),
),
),
);
}
}

@ -0,0 +1,261 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
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';
import 'intervention_medication.dart';
class PharmacyInterventionScreen extends StatefulWidget {
final OutPatientFilterType outPatientFilterType;
const PharmacyInterventionScreen({
Key key,
this.outPatientFilterType,
}) : super(key: key);
@override
_PharmacyInterventionScreenState createState() =>
_PharmacyInterventionScreenState();
}
class _PharmacyInterventionScreenState
extends State<PharmacyInterventionScreen> {
@override
void initState() {
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
return BaseView<InterventionMedicationViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 1.0,
child: Padding(
padding: EdgeInsets.all(0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
BottomSheetTitle(
title: (OutPatientFilterType.Previous ==
widget.outPatientFilterType)
? ""
: TranslationBase.of(context).pharmacyIntervention,
),
SizedBox(
height: 10.0,
),
Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
Container(
color: Colors.white,
child: InkWell(
onTap: () => selectDate(
context,
model,
firstDate: DateTime(
DateTime.now().year - 20,
DateTime.now().month,
DateTime.now().day),
lastDate: DateTime(
DateTime.now().year,
DateTime.now().month,
DateTime.now().day + 100),
selectedDate: model.selectedFromDate != null
? model.selectedFromDate
: DateTime.now(),
),
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).fromDate,
"${AppDateUtils.convertStringToDateFormat(model.selectedFromDate.toString(), "yyyy-MM-dd")}"
,
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
color: Colors.white,
child: InkWell(
onTap: () => selectDate(
context,
model,
isFromDate: false,
firstDate: DateTime(
DateTime.now().year - 20,
DateTime.now().month,
DateTime.now().day),
lastDate: DateTime(
DateTime.now().year,
DateTime.now().month,
DateTime.now().day + 100),
selectedDate: model.selectedToDate != null
? model.selectedToDate
: DateTime.now().add(Duration(days: 1)),
),
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context).toDate,
"${AppDateUtils.convertStringToDateFormat(model.selectedToDate.toString(), "yyyy-MM-dd")}"
,
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
),
),
],
),
),
),
],
),
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title: TranslationBase.of(context).search,
padding: 5,
color: Color(0xFF359846),
onPressed: () async {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
InterventionMedicationScreen(
patient,
previousModel: model,
)),
);
},
),
),
),
),
SizedBox(
height: 5,
),
],
),
)));
}
selectDate(BuildContext context, InterventionMedicationViewModel model,
{bool isFromDate = true,
DateTime firstDate,
lastDate,
selectedDate}) async {
Helpers.hideKeyboard(context);
final DateTime picked = await showDatePicker(
context: context,
initialDate: selectedDate,
firstDate: firstDate,
lastDate: lastDate,
initialEntryMode: DatePickerEntryMode.calendar,
);
if (picked != null) {
if (isFromDate) {
setState(() {
model.selectedFromDate = picked;
var date = picked.add(Duration(days: 1));
if (date.isBefore(lastDate)) {
model.selectedToDate = date;
} else
model.selectedToDate = lastDate;
});
} else {
setState(() {
model.selectedToDate = picked;
});
}
}
}
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.keyboard_arrow_down_sharp,
color: Color(0xff2E303A),
)
: null,
hintStyle: TextStyle(
fontSize: 13,
color: Color(0xff2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
labelText: selectedText != null ? '$hintText\n$selectedText' : null,
labelStyle: TextStyle(
fontSize: 13,
color: Color(0xff2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
);
}
}

@ -18,7 +18,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profi
import 'package:doctor_app_flutter/util/NotificationPermissionUtils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart';
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:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';

@ -167,6 +167,20 @@ class ProfileGridForInPatient extends StatelessWidget {
'assets/images/svgs/profile_screen/diabetic chart.svg',
isInPatient: isInpatient,
),
PatientProfileCardModel(
"VTE",
"Assessment",
VTE_ASSESSMENT,
'assets/images/svgs/profile_screen/diabetic chart.svg',
isInPatient: isInpatient,
),
PatientProfileCardModel(
TranslationBase.of(context).pharmacy,
TranslationBase.of(context).intervention,
PHARMACY_INTERVENTION,
'assets/images/svgs/profile_screen/medical report.svg',
isInPatient: isInpatient,
),
];
return Padding(

@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/radiology_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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/buttons/app_buttons_widget.dart';
@ -50,7 +50,7 @@ class RadiologyDetailsPage extends StatelessWidget {
),
isShowAppBar: true,
baseViewModel: model,
body: SingleChildScrollView(
body: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,

@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart';
import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/doctor_card.dart';

@ -8,7 +8,7 @@ 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/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/buttons/app_buttons_widget.dart';

@ -7,9 +7,10 @@ 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/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/buttons/app_buttons_widget.dart';
@ -209,19 +210,28 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
_selectedClinic == null ||
_selectedDoctor == null ||
_remarksController.text == null) return;
model
GifLoaderDialogUtils.showMyDialog(context);
await model
.makeReferral(
patient,
appointmentDate.toIso8601String(),
_selectedBranch['facilityId'],
_selectedClinic['ClinicID'],
_selectedDoctor['DoctorID'],
_remarksController.text)
.then((_) {
_remarksController.text);
if(model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
Helpers.showErrorToast(model.error);
} else {
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context).referralSuccessMsg);
Navigator.pop(context);
});
}
},
),
)

@ -142,318 +142,327 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
return Container(
margin: EdgeInsets.only(
left: 5, right: 5, top: 15, bottom: 15),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.start,
child: Column(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
Row(
children: [
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
letterSpacing: -0.4),
children: <TextSpan>[
new TextSpan(
text: "ICD : ".toUpperCase(),
),
new TextSpan(
text: assessment
.selectedICD.code
.trim()
.toUpperCase() ??
""),
],
),
),
Container(
width: MediaQuery.of(context)
.size
.width *
0.50,
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
5,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
),
children: <TextSpan>[
new TextSpan(
text: assessment
.selectedICD.description
.toString(),
),
],
),
),
),
RichText(
text: new TextSpan(
style: new TextStyle(
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
.getTextMultiplierBasedOnWidth() *
3.6,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
letterSpacing: -0.4),
children: <TextSpan>[
new TextSpan(
text: "ICD : ".toUpperCase(),
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
context)
.appointmentNo,
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
letterSpacing: -0.4,
color: Color(0xFF575757),
),
),
new TextSpan(
text: assessment.appointmentId
.toString() ??
"",
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
),
),
],
),
new TextSpan(
text: assessment
.selectedICD.code
.trim()
.toUpperCase() ??
""),
],
),
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
context)
.condition +
" : ",
style: new TextStyle(
letterSpacing: -0.4,
color: Color(0xFF575757),
),
Column(
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
AppText(
assessment.createdOn != null
? AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.parse(
assessment
.createdOn), isMonthShort: true)
: AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
),
AppText(
assessment.createdOn != null
? AppDateUtils.getHour(
DateTime.parse(
assessment
.createdOn))
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
),
],
),
],
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
width: MediaQuery.of(context)
.size
.width *
0.50,
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4.3,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
),
children: <TextSpan>[
new TextSpan(
text: assessment
.selectedICD.description
.toString(),
),
],
),
),
new TextSpan(
text: projectViewModel
.isArabic
? assessment
.selectedDiagnosisCondition
.nameAr
: assessment
.selectedDiagnosisCondition
.nameEn,
),
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
3.5,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
),
],
),
),
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
context)
.dType +
' : ',
style: new TextStyle(
letterSpacing: -0.4,
color: Color(0xFF575757),
),
.appointmentNo,
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
letterSpacing: -0.4,
color: Color(0xFF575757),
),
),
new TextSpan(
text: assessment.appointmentId
.toString() ??
"",
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
),
),
],
),
new TextSpan(
text: projectViewModel
.isArabic
? assessment
.selectedDiagnosisType
.nameAr
: assessment
.selectedDiagnosisType
.nameEn,
),
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
),
),
],
),
),
if (assessment.doctorName != null)
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight:
FontWeight.w600),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
context)
.doctor +
' : ',
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
letterSpacing: -0.4,
color: Color(0xFF575757),
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
context)
.condition +
" : ",
style: new TextStyle(
letterSpacing: -0.4,
color: Color(0xFF575757),
),
),
),
new TextSpan(
text:
assessment.doctorName ??
'',
style: new TextStyle(
new TextSpan(
text: projectViewModel
.isArabic
? assessment
.selectedDiagnosisCondition
.nameAr
: assessment
.selectedDiagnosisCondition
.nameEn,
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
),
),
],
),
),
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
3,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
context)
.dType +
' : ',
style: new TextStyle(
letterSpacing: -0.4,
color: Color(0xFF575757),
),
),
),
],
new TextSpan(
text: projectViewModel
.isArabic
? assessment
.selectedDiagnosisType
.nameAr
: assessment
.selectedDiagnosisType
.nameEn,
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
),
),
],
),
),
),
SizedBox(
height: 6,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
if (assessment.doctorName != null)
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight:
FontWeight.w600),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
context)
.doctor +
' : ',
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
letterSpacing: -0.4,
color: Color(0xFF575757),
),
),
new TextSpan(
text:
assessment.doctorName ??
'',
style: new TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
letterSpacing: -0.48,
color: Color(0xFF2B353E),
),
),
],
),
),
SizedBox(
height: 6,
),
AppText(
(assessment.remark != null &&
assessment.remark !=
'')
? TranslationBase.of(
context)
.remarks +
" : "
: '',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600),
RemarkText(
remark: assessment.remark ?? "",
),
],
),
],
),
Column(
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Row(
children: [
Column(
Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.end,
CrossAxisAlignment.start,
children: [
AppText(
assessment.createdOn != null
? AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.parse(
assessment
.createdOn))
: AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
SizedBox(
height: 6,
),
AppText(
assessment.createdOn != null
? AppDateUtils.getHour(
DateTime.parse(
assessment
.createdOn))
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.6,
(assessment.remark != null &&
assessment.remark !=
'')
? TranslationBase.of(
context)
.remarks +
" : "
: '',
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600),
RemarkText(
remark: assessment.remark ?? "",
),
],
),
],
),
SizedBox(
height: MediaQuery.of(context)
.size
.height *
0.05,
Column(
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
SizedBox(
height: MediaQuery.of(context)
.size
.height *
0.05,
),
InkWell(
onTap: () {
openAssessmentDialog(context,
isUpdate: true,
assessment: assessment,
model: model);
},
child: Icon(
DoctorApp.edit,
size: 18,
),
)
],
),
InkWell(
onTap: () {
openAssessmentDialog(context,
isUpdate: true,
assessment: assessment,
model: model);
},
child: Icon(
DoctorApp.edit,
size: 18,
),
)
],
),
],

@ -39,7 +39,7 @@ class StatusLabel extends StatelessWidget {
: TranslationBase.of(context).locked,
fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.7,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.5,
color: stepId == selectedStepId
? Color(0xFFCC9B14)
: stepId < selectedStepId

@ -7,7 +7,7 @@ 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/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/cupertino.dart';

@ -16,8 +16,8 @@ class LineChartCurved extends StatelessWidget {
List<double> yAxixs = List();
// DateFormat format = DateFormat("yyyy-MM-dd");
DateFormat yearFormat = DateFormat("yyyy/MMM");
DateFormat monthFormat = DateFormat("MMM");
DateFormat yearFormat = DateFormat("yyyy/MMM/dd");
DateFormat monthFormat = DateFormat("dd/MMM");
bool isDatesSameYear = true;
@override
@ -96,6 +96,7 @@ class LineChartCurved extends StatelessWidget {
}
}
LineChartData sampleData1(context) {
return LineChartData(
lineTouchData: LineTouchData(
@ -162,31 +163,25 @@ class LineChartCurved extends StatelessWidget {
return '';
},
),
leftTitles: SideTitles(
showTitles: true,
getTextStyles: (context, value) {
return TextStyle(
leftTitles: SideTitles(
showTitles: true,
getTextStyles: (cxt, value) => const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 10,
);
},
getTitles: (value) {
// if (timeSeries.length < 10) {
// return '${value.toInt()}';
// } else {
// if (value == getMinY())
// return '${value.toInt()}';
// if (value == getMaxY())
),
interval:getInterval(),
// getTitles: (value) {
// if (value.toInt() == 0)
// return '${value.toInt()}';
// if (yAxixs.contains(value)) {
// else if (value.toInt() % horizontalInterval == 0)
// return '${value.toInt()}';
// }
// return '';
// }
return '${value.toInt()}';
},
margin: 12,
),
// else
// return '';
// },
margin: 12,
),
),
borderData: FlBorderData(
show: true,
@ -208,12 +203,44 @@ class LineChartCurved extends StatelessWidget {
),
minX: 0,
maxX: (timeSeries.length - 1).toDouble(),
maxY: getMaxY() + 0.3,
minY: getMinY(),
maxY: getMaxY() + getInterval(),
minY: 0,
lineBarsData: getData(context),
);
}
// double getMaxY() {
// double max = 0;
// timeSeries.forEach((element) {
// double resultValueDouble = element.sales;
// if (resultValueDouble > max) max = resultValueDouble;
// });
//
// return max.roundToDouble();
// }
//
// double getMinY() {
// double min = timeSeries[0].sales;
// timeSeries.forEach((element) {
// double resultValueDouble = element.sales;
// if (resultValueDouble < min) min = resultValueDouble;
// });
// int value = min.toInt();
//
// return value.toDouble();
// }
double getInterval(){
return getMaxY() - getMinY() <= 100
? 20
: getMaxY() - getMinY() <= 1000
? 100
: 200;
}
double getMaxY() {
double max = 0;
timeSeries.forEach((element) {

@ -168,12 +168,12 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
),
leftTitles: SideTitles(
showTitles: true,
getTextStyles: (context, value) {
return TextStyle(
color: Colors.black,
fontSize: 10,
);
},
getTextStyles: (cxt, value) => const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 10,
),
interval:getInterval(),
getTitles: (value) {
return '${value.toInt()}';
},
@ -199,23 +199,31 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
),
),
minX: 0,
maxX: (timeSeries1.length - 1).toDouble(),
maxY: getMaxY() + 0.3,
minY: getMinY(),
maxX: 0,
maxY: getMaxY() + getInterval(),
minY: 0,
lineBarsData: getData(context),
);
}
double getInterval(){
return getMaxY() - getMinY() <= 100
? 20
: getMaxY() - getMinY() <= 1000
? 100
: 200;
}
double getMaxY() {
double max = 0;
timeSeries1.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > max) max = resultValueDouble;
});
timeSeries2.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > max) max = resultValueDouble;
});
return max.roundToDouble();
}
@ -226,15 +234,39 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
});
timeSeries2.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
});
int value = min.toInt();
return value.toDouble();
}
// double getMaxY() {
// double max = 0;
// timeSeries1.forEach((element) {
// double resultValueDouble = element.sales;
// if (resultValueDouble > max) max = resultValueDouble;
// });
// timeSeries2.forEach((element) {
// double resultValueDouble = element.sales;
// if (resultValueDouble > max) max = resultValueDouble;
// });
//
// return max.roundToDouble();
// }
//
// double getMinY() {
// double min = timeSeries1[0].sales;
// timeSeries1.forEach((element) {
// double resultValueDouble = element.sales;
// if (resultValueDouble < min) min = resultValueDouble;
// });
// timeSeries2.forEach((element) {
// double resultValueDouble = element.sales;
// if (resultValueDouble < min) min = resultValueDouble;
// });
//
// int value = min.toInt();
//
// return value.toDouble();
// }
List<LineChartBarData> getData(context) {
List<FlSpot> spots = List();

@ -79,14 +79,18 @@ class VitalSignDetailPainScale extends StatelessWidget {
margin: EdgeInsets.symmetric(horizontal: 16),
padding: EdgeInsets.only(left: 8),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 2,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Container(
@ -268,13 +272,24 @@ class VitalSignDetailPainScale extends StatelessWidget {
),
Expanded(
child: Container(
padding: EdgeInsets.all(8),
padding: EdgeInsets.symmetric(horizontal: 8),
child: Center(
child: AppText(
"${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM, yyyy hh:mm a")}",
fontWeight: FontWeight.w700,
color: Color(0XFF28353E),
fontSize: SizeConfig.textMultiplier * 1.6,
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
AppText(
"${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM")}",
fontWeight: FontWeight.w700,
color: Color(0XFF28353E),
fontSize: SizeConfig.textMultiplier * 1.6,
),
AppText(
"${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "hh:mm a")}",
fontWeight: FontWeight.w700,
color: Color(0XFF28353E),
fontSize: SizeConfig.textMultiplier * 1.6,
),
],
),
),
),

@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/errors/error_message.dart';

@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sig
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';

@ -0,0 +1,282 @@
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';
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/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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:flutter/material.dart';
import 'package:provider/provider.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class VteAssessmentScreen extends StatefulWidget {
const VteAssessmentScreen({Key key}) : super(key: key);
@override
_ProgressNoteState createState() => _ProgressNoteState();
}
class _ProgressNoteState extends State<VteAssessmentScreen> {
bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
if (routeArgs.containsKey('isDischargedPatient'))
isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<VteAssessmentViewModel>(
onModelReady: (model) => model.getVteAssessment(patientId: patient.patientId,
// admissionNo: 2016023498
admissionNo:int.parse(patient.admissionNo)
),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: PatientProfileAppBar(
patient,
isInpatient: true,
),
body: model.allVteHistoryList == null ||
model.allVteHistoryList.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
),
)
: Container(
color: Colors.grey[200],
child: Column(
children: <Widget>[
Expanded(
child: Container(
child: ListView.builder(
itemCount: model.allVteHistoryList.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,
children: [
Container(
width: MediaQuery.of(context)
.size
.width *
0.60,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
AppText(
model
.allVteHistoryList[
index].riskScore,
fontWeight: FontWeight.w600,
fontSize: 14,
),
],
),
],
),
),
Column(
children: [
AppText(
model
.allVteHistoryList[
index]
.createdOn !=
null
? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromString(model
.allVteHistoryList[
index]
.createdOn),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true)
: AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.now(),
isArabic:
projectViewModel
.isArabic),
fontWeight: FontWeight.w600,
fontSize: 14,
isCopyable: true,
),
AppText(
model
.allVteHistoryList[
index]
.createdOn !=
null
? AppDateUtils.getHour(
AppDateUtils
.getDateTimeFromString(model
.allVteHistoryList[
index]
.createdOn))
: 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
.allVteHistoryList[
index]
.vTEType,
fontSize: 12,
isCopyable: true,
),
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.pharmacology +
" : ",
fontSize: 12,
),
Expanded(
child: AppText(
model
.allVteHistoryList[
index]
.pharmacology,
fontSize: 12,
isCopyable: true,
),
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.reasonsThrombo +
" : ",
fontSize: 12,
),
Expanded(
child: AppText(
model
.allVteHistoryList[
index]
.reasonsThrombo,
fontSize: 12,
isCopyable: true,
),
),
]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Ambulation Protocol : ",
fontSize: 12,
),
Expanded(
child: AppText(
model
.allVteHistoryList[
index]
.ambulationProtocol,
fontSize: 12,
isCopyable: true,
),
),
])
],
),
SizedBox(
height: 20,
),
],
),
),
);
}),
),
),
],
),
),
),
);
}
}

@ -229,6 +229,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<MedicineViewModel>(
onModelReady: (model) async {
/// TODO Elham* Move this to view model
x = model.patientAssessmentList.map((element) {
return element.icdCode10ID;
});
@ -331,7 +332,6 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
// TODO change it secondary button and add loading
AppButton(
title: TranslationBase.of(
context)
@ -647,6 +647,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: InkWell(
onTap: () => selectDate(
context, widget.model),
/// TODO Elham* Use customTextFields for all TextFields here
child: TextField(
decoration:
textFieldSelectorDecoration(
@ -667,6 +668,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
),
SizedBox(
height: spaceBetweenTextFileds),
/// TODO Elham* Use customTextFields for all
PrescriptionTextFiled(
element: duration,
elementError: durationError,
@ -787,6 +789,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
.addMedication,
fontWeight: FontWeight.w600,
onPressed: () async {
/// TODO Elham* Use it to separate function
await locator<
AnalyticsService>()
.logEvent(
@ -1016,7 +1019,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
});
}
}
/// TODO Elham* Use it from the textfeild utils
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {
@ -1062,6 +1065,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
showModalBottomSheet(
context: context,
builder: (context) {
/// TODO Elham* Move this to widget
return Container(
height: SizeConfig.realScreenHeight * .8,
width: SizeConfig.realScreenWidth,
@ -1122,6 +1126,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
});
}
/// TODO Elham* Move this to view model
getPriscriptionforDrug(
List<PrescriptionModel> prescriptionList, MedicineViewModel model) {
var prescriptionDetails = [];

@ -28,6 +28,7 @@ class DrugToDrug extends StatefulWidget {
class _DrugToDrug extends State<DrugToDrug> {
int typeID = 1;
bool isLoaded = false;
/// TODO Elham* fix this
List<Map<dynamic, dynamic>> expandableList = [
{'name': 'CRITICAL', 'level': 'LEVEL_4'},
{'name': 'HIGH', 'level': 'LEVEL_3'},
@ -35,15 +36,7 @@ class _DrugToDrug extends State<DrugToDrug> {
{'name': 'LOW', 'level': 'LEVEL_1'},
{'name': 'INFO', 'level': 'INFO'},
];
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
patientMRN: 2954208,
//widget.patient.patientMRN,
episodeId: 210011002,
//widget.patient.episodeNo,
appointmentNo: 2016055308,
//widget.patient.appointmentNo,
doctorID: '',
editedBy: '');
VitalSignsViewModel model = new VitalSignsViewModel();
SOAPViewModel model2 = new SOAPViewModel();
@ -114,6 +107,18 @@ class _DrugToDrug extends State<DrugToDrug> {
}
getRequestedData() async {
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
/// TODO Elham* fix this today
patientMRN: widget.patient.patientMRN,
episodeId: widget.patient.episodeNo,
appointmentNo:
widget.patient.appointmentNo,
doctorID: '',
editedBy: '');
/// TODO Elham* rename model to meaning full not just modle with number
await model.getPatientVitalSign(widget.patient);
await model2.getPatientAllergy(generalGetReqForSOAP);
await model2.getMasterLookup(MasterKeysService.DiagnosisType);

@ -862,6 +862,8 @@ class _PrescriptionCheckOutScreenState
}
}
/// TODO Elham* Use it from the textfeild utils
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {

@ -5,7 +5,7 @@ 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/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';

@ -4,7 +4,7 @@ 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/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/dialogs/ShowImageDialog.dart';

@ -44,7 +44,7 @@ class _PrescriptionTextFiledState extends State<PrescriptionTextFiled> {
list: widget.elementList,
attributeName: '${widget.keyName}',
attributeValueId: widget.elementList.length == 1
? widget.elementList[0]['${widget.keyId}']
? widget.elementList[0]['${widget.keyId}'].toString()
: '${widget.keyId}',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) =>

@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';

@ -68,6 +68,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
int testNum = 0;
int strengthChar;
PatiantInformtion patient;
/// TODO Elham* add type
dynamic route;
dynamic doseTime;
dynamic frequencyUpdate;
@ -86,6 +87,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
strengthController.text = widget.doseStreangth;
remarksController.text = widget.remarks;
indicationList = List();
/// TODO Elham* create model and try to have them form service and add translation
dynamic indication1 = {"id": 545, "name": "Gingival Hyperplasia"};
dynamic indication2 = {"id": 546, "name": "Mild Drowsiness"};
@ -112,6 +114,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
indicationList.add(indication9);
indicationList.add(indication10);
}
/// TODO Elham* Add Translation
@override
Widget build(BuildContext context) {
@ -120,6 +123,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
(BuildContext context, StateSetter setState /*You can rename this!*/) {
return BaseView<MedicineViewModel>(
onModelReady: (model) async {
/// TODO Elham* Move this to view model and remove unused data
await model.getMedicationList();
await model.getMedicationStrength();
await model.getMedicationDuration();
@ -172,78 +177,6 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
),
Column(
children: [
// Container(
// height: MediaQuery.of(context).size.height *
// 0.070,
// child: InkWell(
// onTap: model.allMedicationList != null
// ? () {
// setState(() {
// newSelectedMedication = null;
// });
// }
// : null,
// child: newSelectedMedication == null
// ? AutoCompleteTextField<
// GetMedicationResponseModel>(
// decoration:
// textFieldSelectorDecoration(
// widget.drugNameGeneric,
// newSelectedMedication != null
// ? newSelectedMedication
// .genericName
// : null,
// true,
// ),
// itemSubmitted: (item) => setState(
// () => newSelectedMedication =
// item),
// key: key,
// suggestions:
// model.allMedicationList,
// itemBuilder: (context,
// suggestion) =>
// new Padding(
// child: AppText(suggestion
// .description +
// '/' +
// suggestion.genericName),
// padding:
// EdgeInsets.all(8.0)),
// itemSorter: (a, b) => 1,
// itemFilter: (suggestion, input) =>
// suggestion.genericName
// .toLowerCase()
// .startsWith(
// input.toLowerCase()) ||
// suggestion.description
// .toLowerCase()
// .startsWith(
// input.toLowerCase()) ||
// suggestion.keywords
// .toLowerCase()
// .startsWith(
// input.toLowerCase()),
// )
// : TextField(
// decoration:
// textFieldSelectorDecoration(
// TranslationBase.of(context)
// .searchMedicineNameHere,
// newSelectedMedication != null
// ? newSelectedMedication
// .description +
// ('${newSelectedMedication.genericName}')
// : null,
// true,
// ),
// enabled: false,
// ),
// ),
// ),
// SizedBox(
// height: 12,
// ),
Container(
height:
MediaQuery.of(context).size.height *
@ -284,15 +217,6 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
"Only 5 Digits allowed for strength");
}
},
// validator: (value) {
// if (value.isEmpty &&
// strengthController.text.length >
// 4)
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// },
),
),
SizedBox(
@ -805,6 +729,9 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
title: 'update prescription'
.toUpperCase(),
onPressed: () {
/// TODO Elham* Move this to function
if (double.parse(
strengthController.text) >
1000.0) {
@ -912,7 +839,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
});
}
}
// /// TODO Elham* Use it from the textfeild utils
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {
@ -945,6 +872,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
);
}
/// TODO Elham* Move this to view model and pass all data as model
updatePrescription(
{PrescriptionViewModel model,
int drugId,
@ -1030,6 +958,9 @@ void updatePrescriptionForm(
String uom,
int box,
String startDate}) {
/// TODO Elham* remove unused code.
TextEditingController remarksController = TextEditingController();
TextEditingController doseController = TextEditingController();
TextEditingController frequencyController = TextEditingController();

@ -1,15 +1,19 @@
//import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:flutter_svg/flutter_svg.dart';
class ProcedureCard extends StatelessWidget {
final Function onTap;
@ -82,14 +86,15 @@ class ProcedureCard extends StatelessWidget {
: 'Urgent',
color: entityList.orderType == 0
? Colors.black
: Colors.red[800],
: AppGlobal.appRedColor,
fontWeight: FontWeight.w600,
),
SizedBox(
height: 5,
),
AppText(
entityList.procedureName,
Helpers.convertToTitleCase(
entityList.procedureName),
bold: true,
fontSize: 14,
),
@ -104,13 +109,18 @@ class ProcedureCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.end,
children: [
AppText(
'${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}',
'${AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertISOStringToDateTime(
entityList.createdOn),
isMonthShort: true,
isArabic: projectViewModel.isArabic,
)}',
color: Colors.black,
fontWeight: FontWeight.w600,
fontSize: 14,
),
AppText(
'${AppDateUtils.getHour(AppDateUtils.convertISOStringToDateTime(entityList.orderDate))}',
'${AppDateUtils.getHour(AppDateUtils.convertISOStringToDateTime(entityList.createdOn))}',
fontWeight: FontWeight.w600,
color: Colors.grey[700],
fontSize: 14,
@ -154,8 +164,8 @@ class ProcedureCard extends StatelessWidget {
height: 40,
child: ClipRRect(
borderRadius: BorderRadius.circular(20.0),
child: Image.network(
'assets/images/male_avatar.png',
child: Image.asset(
'assets/images/dr_avatar.png',
height: 25,
width: 30,
errorBuilder: (BuildContext context,
@ -174,7 +184,8 @@ class ProcedureCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
entityList.doctorName,
Helpers.convertToTitleCase(
entityList.doctorName),
fontFamily: 'Poppins',
fontWeight: FontWeight.w800,
fontSize: 1.7 * SizeConfig.textMultiplier,
@ -182,7 +193,8 @@ class ProcedureCard extends StatelessWidget {
),
if (entityList.clinicDescription != null)
AppText(
entityList.clinicDescription,
Helpers.convertToTitleCase(
entityList.clinicDescription),
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.4 * SizeConfig.textMultiplier,
@ -201,7 +213,9 @@ class ProcedureCard extends StatelessWidget {
children: [
Expanded(
child: AppText(
entityList.remarks.toString() ?? '',
entityList.remarks!= null?Helpers.convertToTitleCase(
entityList.remarks.toString()) :
'',
fontSize: 12,
),
),

@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/procedures/update-procedure.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
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/transitions/slide_up_page.dart';

@ -28,6 +28,10 @@ class AppDateUtils {
return '/Date(${DateFormat(dateFormat).parse(date).millisecondsSinceEpoch})/';
}
static String convertDateToServerFormat(DateTime date) {
return '/Date(${date.millisecondsSinceEpoch})/';
}
static convertDateFromServerFormat(String str, dateFormat) {
var date = getDateTimeFromServerFormat(str);
@ -301,7 +305,7 @@ class AppDateUtils {
/// get data formatted like 26 Apr 2020
/// [dateTime] convert DateTime to data formatted
static String getDayMonthYearDateFormatted(DateTime dateTime,
{bool isArabic = false, bool isMonthShort = false}) {
{bool isArabic = false, bool isMonthShort = true}) {
if (dateTime != null)
return dateTime.day.toString() +
" " +

@ -580,6 +580,9 @@ class TranslationBase {
String get addSickLeave =>
localizedValues['add-sickleave'][locale.languageCode];
String get pharmacyIntervention =>
localizedValues['pharmacy-intervention'][locale.languageCode];
String get add => localizedValues['add'][locale.languageCode];
String get addSickLeaverequest =>
@ -906,6 +909,14 @@ class TranslationBase {
String get medications => localizedValues['medications'][locale.languageCode];
String get medication => localizedValues['medication'][locale.languageCode];
String get doctorComments => localizedValues['doctorComments'][locale.languageCode];
String get statusDescription => localizedValues['statusDescription'][locale.languageCode];
String get createdByName => localizedValues['createdByName'][locale.languageCode];
String get procedures => localizedValues['procedures'][locale.languageCode];
String get chiefComplaints =>
@ -1123,6 +1134,8 @@ class TranslationBase {
String get createdBy => localizedValues['createdBy'][locale.languageCode];
String get riskScore => localizedValues['riskScore'][locale.languageCode];
String get editedBy => localizedValues['editedBy'][locale.languageCode];
String get currentMedications =>
@ -1723,6 +1736,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 =>
@ -1735,6 +1752,9 @@ class TranslationBase {
localizedValues['planedProcedure'][locale.languageCode];
String get moreDetails => localizedValues['moreDetails'][locale.languageCode];
String get VTE_Type => localizedValues['VTE_Type'][locale.languageCode];
String get pharmacology => localizedValues['pharmacology'][locale.languageCode];
String get reasonsThrombo => localizedValues['reasonsThrombo'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -0,0 +1,44 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class HeaderRow extends StatelessWidget {
final String label;
final String value;
final bool isExpanded;
const HeaderRow({Key key, this.label, this.value, this.isExpanded = false}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
label,
isCopyable: true,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
isExpanded?Expanded(child: AppText(
value,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
), ):
AppText(
value,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
);
}
}

@ -11,7 +11,8 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'large_avatar.dart';
import '../large_avatar.dart';
import 'header_row.dart';
class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
final PatiantInformtion patient;
@ -342,7 +343,8 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'${TranslationBase.of(context).dr}$doctorName',
Helpers.convertToTitleCase(
'${TranslationBase.of(context).dr}$doctorName'),
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
fontSize: SizeConfig
@ -366,9 +368,16 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
value: branch ?? '',
),
if (clinic != null)
HeaderRow(
label: 'Clinic: ',
value: clinic ?? '',
Container(
width:
MediaQuery.of(context).size.width *
0.51,
child: HeaderRow(
label: 'Clinic: ',
value: Helpers.convertToTitleCase(
clinic) ??
'',
isExpanded: true),
),
if (isMedicalFile && episode != null)
HeaderRow(
@ -410,7 +419,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
? isInpatient
? (isFromLabResult ? 210 : 200)
: isAppointmentHeader
? 290
? 340
: SizeConfig.isHeightVeryShort
? 137
: SizeConfig.isHeightShort
@ -419,35 +428,3 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
(SizeConfig.isWidthLarge ? 25 : 20)
: height);
}
class HeaderRow extends StatelessWidget {
final String label;
final String value;
const HeaderRow({Key key, this.label, this.value}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
children: [
AppText(
label,
isCopyable: true,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
AppText(
value,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
);
}
}

@ -7,13 +7,14 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
import 'package:url_launcher/url_launcher.dart';
import 'header_row.dart';
class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
with PreferredSizeWidget {
final PatiantInformtion patient;

@ -12,6 +12,7 @@ class CustomRow extends StatelessWidget {
this.valueSize,
this.width,
this.isCopyable = true,
this.isExpanded = true,
}) : super(key: key);
final String label;
@ -20,6 +21,7 @@ class CustomRow extends StatelessWidget {
final double valueSize;
final double width;
final bool isCopyable;
final bool isExpanded;
@override
Widget build(BuildContext context) {
@ -38,6 +40,7 @@ class CustomRow extends StatelessWidget {
width: 1,
),
Expanded(
flex: isExpanded ? 1 : 0,
child: AppText(
value,
fontSize:

@ -489,6 +489,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0"
flutter_datetime_picker:
dependency: "direct main"
description:
name: flutter_datetime_picker
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.1"
flutter_device_type:
dependency: "direct main"
description:
@ -763,13 +770,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2"
meta:
dependency: transitive
description:
@ -1173,7 +1173,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.8"
version: "0.4.3"
timing:
dependency: transitive
description:

@ -112,6 +112,7 @@ dependencies:
# Hijri
# hijri: ^2.0.3
hijri_picker: ^3.0.0
flutter_datetime_picker: ^1.5.1
# flutter_math_fork: ^0.6.0
# flutter_math_fork: ^0.6.0

Loading…
Cancel
Save