Merge branch 'development' into patients-new-design

# Conflicts:
#	lib/screens/patients/patients_screen.dart
#	lib/widgets/patients/profile/profile_medical_info_widget.dart
merge-requests/374/head
mosazaid 4 years ago
commit 56f2b5f63a

@ -98,7 +98,7 @@ PODS:
- Flutter
- path_provider_windows (0.0.1):
- Flutter
- "permission_handler (5.0.1+1)":
- "permission_handler (5.1.0+2)":
- Flutter
- PromisesObjC (1.2.11)
- Protobuf (3.13.0)
@ -297,7 +297,7 @@ SPEC CHECKSUMS:
OpenTok: fde03ecc5ea31fe0a453242847c4ee1f47e1d735
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f
Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
import 'dart:io' show Platform;
@ -85,7 +86,7 @@ class BaseAppClient {
print("URL : $url");
print("Body : ${json.encode(body)}");
String asd= json.encode(body);
if (await Helpers.checkConnection()) {
final response = await http.post(url,
body: json.encode(body),
@ -127,7 +128,7 @@ class BaseAppClient {
{Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
PatiantInformtion patient,
@required PatiantInformtion patient,
bool isExternal = false}) async {
String url = BASE_URL + endPoint;

@ -53,6 +53,9 @@ const GET_PRESCRIPTION_REPORT =
const GT_MY_PATIENT_QUESTION =
'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions';
const PRM_SEARCH_PATIENT =
'Services/Patients.svc/REST/GetPatientInformation_PRM';
const GET_PATIENT = 'Services/DoctorApplication.svc/REST/';
const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT =
@ -229,6 +232,21 @@ const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults";
const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus";
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT_NEW =
'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL =
'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************

@ -782,5 +782,10 @@ const Map<String, Map<String, String>> localizedValues = {
"companyName": {"en": "Company Name ", "ar": "اسم الشركة: "},
"procedureName": {"en": "Procedure Name", "ar": "اسم الاجراء"},
"usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"},
"prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"},
"notes": {"en": "Notes", "ar": "ملاحظات"},
"dailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"},
};

@ -0,0 +1,158 @@
import 'package:doctor_app_flutter/util/date-utils.dart';
class Prescriptions {
String setupID;
int projectID;
int patientID;
int appointmentNo;
String appointmentDate;
String doctorName;
String clinicDescription;
String name;
int episodeID;
int actualDoctorRate;
int admission;
int clinicID;
String companyName;
String despensedStatus;
DateTime dischargeDate;
int dischargeNo;
int doctorID;
String doctorImageURL;
int doctorRate;
String doctorTitle;
int gender;
String genderDescription;
bool isActiveDoctorProfile;
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
bool isInOutPatient;
bool isLiveCareAppointment;
String isInOutPatientDescription;
String isInOutPatientDescriptionN;
bool isInsurancePatient;
String nationalityFlagURL;
int noOfPatientsRate;
String qR;
List<String> speciality;
Prescriptions(
{this.setupID,
this.projectID,
this.patientID,
this.appointmentNo,
this.appointmentDate,
this.doctorName,
this.clinicDescription,
this.name,
this.episodeID,
this.actualDoctorRate,
this.admission,
this.clinicID,
this.companyName,
this.despensedStatus,
this.dischargeDate,
this.dischargeNo,
this.doctorID,
this.doctorImageURL,
this.doctorRate,
this.doctorTitle,
this.gender,
this.genderDescription,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isInOutPatient,
this.isInOutPatientDescription,
this.isInOutPatientDescriptionN,
this.isInsurancePatient,
this.nationalityFlagURL,
this.noOfPatientsRate,
this.qR,
this.speciality,this.isLiveCareAppointment});
Prescriptions.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
appointmentNo = json['AppointmentNo'];
appointmentDate = json['AppointmentDate'];
doctorName = json['DoctorName'];
clinicDescription = json['ClinicDescription'];
name = json['Name'];
episodeID = json['EpisodeID'];
actualDoctorRate = json['ActualDoctorRate'];
admission = json['Admission'];
clinicID = json['ClinicID'];
companyName = json['CompanyName'];
despensedStatus = json['Despensed_Status'];
dischargeDate = DateUtils.convertStringToDate(json['DischargeDate']);
dischargeNo = json['DischargeNo'];
doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL'];
doctorRate = json['DoctorRate'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
isInOutPatient = json['IsInOutPatient'];
isInOutPatientDescription = json['IsInOutPatientDescription'];
isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
isInsurancePatient = json['IsInsurancePatient'];
nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate'];
qR = json['QR'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
// speciality = json['Speciality'].cast<String>();
}
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['AppointmentNo'] = this.appointmentNo;
data['AppointmentDate'] = this.appointmentDate;
data['DoctorName'] = this.doctorName;
data['ClinicDescription'] = this.clinicDescription;
data['Name'] = this.name;
data['EpisodeID'] = this.episodeID;
data['ActualDoctorRate'] = this.actualDoctorRate;
data['Admission'] = this.admission;
data['ClinicID'] = this.clinicID;
data['CompanyName'] = this.companyName;
data['Despensed_Status'] = this.despensedStatus;
data['DischargeDate'] = this.dischargeDate;
data['DischargeNo'] = this.dischargeNo;
data['DoctorID'] = this.doctorID;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorRate'] = this.doctorRate;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['IsExecludeDoctor'] = this.isExecludeDoctor;
data['IsInOutPatient'] = this.isInOutPatient;
data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
data['IsInsurancePatient'] = this.isInsurancePatient;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['QR'] = this.qR;
data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
return data;
}
}
class PrescriptionsList {
String filterName = "";
List<Prescriptions> prescriptionsList = List();
PrescriptionsList({this.filterName, Prescriptions prescriptions}) {
prescriptionsList.add(prescriptions);
}
}

@ -0,0 +1,108 @@
class PharmacyPrescriptions {
String expiryDate;
dynamic sellingPrice;
int quantity;
int itemID;
int locationID;
int projectID;
String setupID;
String locationDescription;
Null locationDescriptionN;
String itemDescription;
Null itemDescriptionN;
String alias;
int locationTypeID;
int barcode;
Null companybarcode;
int cityID;
String cityName;
int distanceInKilometers;
String latitude;
int locationType;
String longitude;
String phoneNumber;
String projectImageURL;
Null sortOrder;
PharmacyPrescriptions(
{this.expiryDate,
this.sellingPrice,
this.quantity,
this.itemID,
this.locationID,
this.projectID,
this.setupID,
this.locationDescription,
this.locationDescriptionN,
this.itemDescription,
this.itemDescriptionN,
this.alias,
this.locationTypeID,
this.barcode,
this.companybarcode,
this.cityID,
this.cityName,
this.distanceInKilometers,
this.latitude,
this.locationType,
this.longitude,
this.phoneNumber,
this.projectImageURL,
this.sortOrder});
PharmacyPrescriptions.fromJson(Map<String, dynamic> json) {
expiryDate = json['ExpiryDate'];
sellingPrice = json['SellingPrice'];
quantity = json['Quantity'];
itemID = json['ItemID'];
locationID = json['LocationID'];
projectID = json['ProjectID'];
setupID = json['SetupID'];
locationDescription = json['LocationDescription'];
locationDescriptionN = json['LocationDescriptionN'];
itemDescription = json['ItemDescription'];
itemDescriptionN = json['ItemDescriptionN'];
alias = json['Alias'];
locationTypeID = json['LocationTypeID'];
barcode = json['Barcode'];
companybarcode = json['Companybarcode'];
cityID = json['CityID'];
cityName = json['CityName'];
distanceInKilometers = json['DistanceInKilometers'];
latitude = json['Latitude'];
locationType = json['LocationType'];
longitude = json['Longitude'];
phoneNumber = json['PhoneNumber'];
projectImageURL = json['ProjectImageURL'];
sortOrder = json['SortOrder'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ExpiryDate'] = this.expiryDate;
data['SellingPrice'] = this.sellingPrice;
data['Quantity'] = this.quantity;
data['ItemID'] = this.itemID;
data['LocationID'] = this.locationID;
data['ProjectID'] = this.projectID;
data['SetupID'] = this.setupID;
data['LocationDescription'] = this.locationDescription;
data['LocationDescriptionN'] = this.locationDescriptionN;
data['ItemDescription'] = this.itemDescription;
data['ItemDescriptionN'] = this.itemDescriptionN;
data['Alias'] = this.alias;
data['LocationTypeID'] = this.locationTypeID;
data['Barcode'] = this.barcode;
data['Companybarcode'] = this.companybarcode;
data['CityID'] = this.cityID;
data['CityName'] = this.cityName;
data['DistanceInKilometers'] = this.distanceInKilometers;
data['Latitude'] = this.latitude;
data['LocationType'] = this.locationType;
data['Longitude'] = this.longitude;
data['PhoneNumber'] = this.phoneNumber;
data['ProjectImageURL'] = this.projectImageURL;
data['SortOrder'] = this.sortOrder;
return data;
}
}

@ -0,0 +1,191 @@
class PrescriptionReport {
String address;
int appointmentNo;
String clinic;
String companyName;
int days;
String doctorName;
var doseDailyQuantity;
String frequency;
int frequencyNumber;
String image;
String imageExtension;
String imageSRCUrl;
String imageString;
String imageThumbUrl;
String isCovered;
String itemDescription;
int itemID;
String orderDate;
int patientID;
String patientName;
String phoneOffice1;
String prescriptionQR;
int prescriptionTimes;
String productImage;
String productImageBase64;
String productImageString;
int projectID;
String projectName;
String remarks;
String route;
String sKU;
int scaleOffset;
String startDate;
String patientAge;
String patientGender;
String phoneOffice;
int doseTimingID;
int frequencyID;
int routeID;
String name;
String itemDescriptionN;
String routeN;
String frequencyN;
PrescriptionReport({
this.address,
this.appointmentNo,
this.clinic,
this.companyName,
this.days,
this.doctorName,
this.doseDailyQuantity,
this.frequency,
this.frequencyNumber,
this.image,
this.imageExtension,
this.imageSRCUrl,
this.imageString,
this.imageThumbUrl,
this.isCovered,
this.itemDescription,
this.itemID,
this.orderDate,
this.patientID,
this.patientName,
this.phoneOffice1,
this.prescriptionQR,
this.prescriptionTimes,
this.productImage,
this.productImageBase64,
this.productImageString,
this.projectID,
this.projectName,
this.remarks,
this.route,
this.sKU,
this.scaleOffset,
this.startDate,
this.patientAge,
this.patientGender,
this.phoneOffice,
this.doseTimingID,
this.frequencyID,
this.routeID,
this.name,
this.itemDescriptionN,
this.routeN,
this.frequencyN,
});
PrescriptionReport.fromJson(Map<String, dynamic> json) {
address = json['Address'];
appointmentNo = json['AppointmentNo'];
clinic = json['Clinic'];
companyName = json['CompanyName'];
days = json['Days'];
doctorName = json['DoctorName'];
doseDailyQuantity = json['DoseDailyQuantity'];
frequency = json['Frequency'];
frequencyNumber = json['FrequencyNumber'];
image = json['Image'];
imageExtension = json['ImageExtension'];
imageSRCUrl = json['ImageSRCUrl'];
imageString = json['ImageString'];
imageThumbUrl = json['ImageThumbUrl'];
isCovered = json['IsCovered'];
itemDescription = json['ItemDescription'];
itemID = json['ItemID'];
orderDate = json['OrderDate'];
patientID = json['PatientID'];
patientName = json['PatientName'];
phoneOffice1 = json['PhoneOffice1'];
prescriptionQR = json['PrescriptionQR'];
prescriptionTimes = json['PrescriptionTimes'];
productImage = json['ProductImage'];
productImageBase64 = json['ProductImageBase64'];
productImageString = json['ProductImageString'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
remarks = json['Remarks'];
route = json['Route'];
sKU = json['SKU'];
scaleOffset = json['ScaleOffset'];
startDate = json['StartDate'];
patientAge = json['patientAge'];
patientGender = json['patientGender'];
phoneOffice = json['phoneOffice'];
doseTimingID = json['doseTimingID'];
frequencyID = json['frequencyID'];
routeID = json['routeID'];
name = json['name'];
itemDescriptionN = json['itemDescriptionN'];
routeN = json['routeN'];
frequencyN = json['frequencyN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Address'] = this.address;
data['AppointmentNo'] = this.appointmentNo;
data['Clinic'] = this.clinic;
data['CompanyName'] = this.companyName;
data['Days'] = this.days;
data['DoctorName'] = this.doctorName;
data['DoseDailyQuantity'] = this.doseDailyQuantity;
data['Frequency'] = this.frequency;
data['FrequencyNumber'] = this.frequencyNumber;
data['Image'] = this.image;
data['ImageExtension'] = this.imageExtension;
data['ImageSRCUrl'] = this.imageSRCUrl;
data['ImageString'] = this.imageString;
data['ImageThumbUrl'] = this.imageThumbUrl;
data['IsCovered'] = this.isCovered;
data['ItemDescription'] = this.itemDescription;
data['ItemID'] = this.itemID;
data['OrderDate'] = this.orderDate;
data['PatientID'] = this.patientID;
data['PatientName'] = this.patientName;
data['PhoneOffice1'] = this.phoneOffice1;
data['PrescriptionQR'] = this.prescriptionQR;
data['PrescriptionTimes'] = this.prescriptionTimes;
data['ProductImage'] = this.productImage;
data['ProductImageBase64'] = this.productImageBase64;
data['ProductImageString'] = this.productImageString;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['Remarks'] = this.remarks;
data['Route'] = this.route;
data['SKU'] = this.sKU;
data['ScaleOffset'] = this.scaleOffset;
data['StartDate'] = this.startDate;
data['PatientAge'] = this.patientAge;
data['PatientGender'] = this.patientGender;
data['PhoneOffice'] = this.phoneOffice;
data['DoseTimingID'] = this.doseTimingID;
data['FrequencyID'] = this.frequencyID;
data['RouteID'] = this.routeID;
data['Name'] = this.name;
data['ItemDescriptionN'] = this.itemDescriptionN;
data['RouteN'] = this.routeN;
data['FrequencyN'] = this.frequencyN;
data['hasPlan'] = false;
return data;
}
}

@ -0,0 +1,144 @@
class PrescriptionReportEnh {
String address;
int appointmentNo;
String clinic;
Null companyName;
int days;
String doctorName;
int doseDailyQuantity;
String frequency;
int frequencyNumber;
Null image;
Null imageExtension;
String imageSRCUrl;
Null imageString;
String imageThumbUrl;
String isCovered;
String itemDescription;
int itemID;
String orderDate;
int patientID;
String patientName;
String phoneOffice1;
Null prescriptionQR;
int prescriptionTimes;
Null productImage;
Null productImageBase64;
String productImageString;
int projectID;
String projectName;
String remarks;
String route;
String sKU;
int scaleOffset;
String startDate;
PrescriptionReportEnh(
{this.address,
this.appointmentNo,
this.clinic,
this.companyName,
this.days,
this.doctorName,
this.doseDailyQuantity,
this.frequency,
this.frequencyNumber,
this.image,
this.imageExtension,
this.imageSRCUrl,
this.imageString,
this.imageThumbUrl,
this.isCovered,
this.itemDescription,
this.itemID,
this.orderDate,
this.patientID,
this.patientName,
this.phoneOffice1,
this.prescriptionQR,
this.prescriptionTimes,
this.productImage,
this.productImageBase64,
this.productImageString,
this.projectID,
this.projectName,
this.remarks,
this.route,
this.sKU,
this.scaleOffset,
this.startDate});
PrescriptionReportEnh.fromJson(Map<String, dynamic> json) {
address = json['Address'];
appointmentNo = json['AppointmentNo'];
clinic = json['Clinic'];
companyName = json['CompanyName'];
days = json['Days'];
doctorName = json['DoctorName'];
doseDailyQuantity = json['DoseDailyQuantity'];
frequency = json['Frequency'];
frequencyNumber = json['FrequencyNumber'];
image = json['Image'];
imageExtension = json['ImageExtension'];
imageSRCUrl = json['ImageSRCUrl'];
imageString = json['ImageString'];
imageThumbUrl = json['ImageThumbUrl'];
isCovered = json['IsCovered'];
itemDescription = json['ItemDescription'];
itemID = json['ItemID'];
orderDate = json['OrderDate'];
patientID = json['PatientID'];
patientName = json['PatientName'];
phoneOffice1 = json['PhoneOffice1'];
prescriptionQR = json['PrescriptionQR'];
prescriptionTimes = json['PrescriptionTimes'];
productImage = json['ProductImage'];
productImageBase64 = json['ProductImageBase64'];
productImageString = json['ProductImageString'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
remarks = json['Remarks'];
route = json['Route'];
sKU = json['SKU'];
scaleOffset = json['ScaleOffset'];
startDate = json['StartDate'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Address'] = this.address;
data['AppointmentNo'] = this.appointmentNo;
data['Clinic'] = this.clinic;
data['CompanyName'] = this.companyName;
data['Days'] = this.days;
data['DoctorName'] = this.doctorName;
data['DoseDailyQuantity'] = this.doseDailyQuantity;
data['Frequency'] = this.frequency;
data['FrequencyNumber'] = this.frequencyNumber;
data['Image'] = this.image;
data['ImageExtension'] = this.imageExtension;
data['ImageSRCUrl'] = this.imageSRCUrl;
data['ImageString'] = this.imageString;
data['ImageThumbUrl'] = this.imageThumbUrl;
data['IsCovered'] = this.isCovered;
data['ItemDescription'] = this.itemDescription;
data['ItemID'] = this.itemID;
data['OrderDate'] = this.orderDate;
data['PatientID'] = this.patientID;
data['PatientName'] = this.patientName;
data['PhoneOffice1'] = this.phoneOffice1;
data['PrescriptionQR'] = this.prescriptionQR;
data['PrescriptionTimes'] = this.prescriptionTimes;
data['ProductImage'] = this.productImage;
data['ProductImageBase64'] = this.productImageBase64;
data['ProductImageString'] = this.productImageString;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['Remarks'] = this.remarks;
data['Route'] = this.route;
data['SKU'] = this.sKU;
data['ScaleOffset'] = this.scaleOffset;
data['StartDate'] = this.startDate;
return data;
}
}

@ -0,0 +1,134 @@
import 'package:doctor_app_flutter/util/date-utils.dart';
class PrescriptionsOrder {
int iD;
dynamic patientID;
bool patientOutSA;
bool isOutPatient;
int projectID;
int nearestProjectID;
double longitude;
double latitude;
dynamic appointmentNo;
dynamic dischargeID;
int lineItemNo;
int status;
dynamic description;
dynamic descriptionN;
DateTime createdOn;
int serviceID;
int createdBy;
DateTime editedOn;
int editedBy;
int channel;
dynamic clientRequestID;
bool returnedToQueue;
dynamic pickupDateTime;
dynamic pickupLocationName;
dynamic dropoffLocationName;
int realRRTHaveTransactions;
dynamic nearestProjectDescription;
dynamic nearestProjectDescriptionN;
dynamic projectDescription;
dynamic projectDescriptionN;
PrescriptionsOrder(
{this.iD,
this.patientID,
this.patientOutSA,
this.isOutPatient,
this.projectID,
this.nearestProjectID,
this.longitude,
this.latitude,
this.appointmentNo,
this.dischargeID,
this.lineItemNo,
this.status,
this.description,
this.descriptionN,
this.createdOn,
this.serviceID,
this.createdBy,
this.editedOn,
this.editedBy,
this.channel,
this.clientRequestID,
this.returnedToQueue,
this.pickupDateTime,
this.pickupLocationName,
this.dropoffLocationName,
this.realRRTHaveTransactions,
this.nearestProjectDescription,
this.nearestProjectDescriptionN,
this.projectDescription,
this.projectDescriptionN});
PrescriptionsOrder.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
patientID = json['PatientID'];
patientOutSA = json['PatientOutSA'];
isOutPatient = json['IsOutPatient'];
projectID = json['ProjectID'];
nearestProjectID = json['NearestProjectID'];
longitude = json['Longitude'];
latitude = json['Latitude'];
appointmentNo = json['AppointmentNo'];
dischargeID = json['DischargeID'];
lineItemNo = json['LineItemNo'];
status = json['Status'];
description = json['Description'];
descriptionN = json['DescriptionN'];
createdOn = DateUtils.convertStringToDate(json['CreatedOn']);
serviceID = json['ServiceID'];
createdBy = json['CreatedBy'];
editedOn = DateUtils.convertStringToDate(json['EditedOn']);
editedBy = json['EditedBy'];
channel = json['Channel'];
clientRequestID = json['ClientRequestID'];
returnedToQueue = json['ReturnedToQueue'];
pickupDateTime = json['PickupDateTime'];
pickupLocationName = json['PickupLocationName'];
dropoffLocationName = json['DropoffLocationName'];
realRRTHaveTransactions = json['RealRRT_HaveTransactions'];
nearestProjectDescription = json['NearestProjectDescription'];
nearestProjectDescriptionN = json['NearestProjectDescriptionN'];
projectDescription = json['ProjectDescription'];
projectDescriptionN = json['ProjectDescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['PatientID'] = this.patientID;
data['PatientOutSA'] = this.patientOutSA;
data['IsOutPatient'] = this.isOutPatient;
data['ProjectID'] = this.projectID;
data['NearestProjectID'] = this.nearestProjectID;
data['Longitude'] = this.longitude;
data['Latitude'] = this.latitude;
data['AppointmentNo'] = this.appointmentNo;
data['DischargeID'] = this.dischargeID;
data['LineItemNo'] = this.lineItemNo;
data['Status'] = this.status;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
data['CreatedOn'] = this.createdOn;
data['ServiceID'] = this.serviceID;
data['CreatedBy'] = this.createdBy;
data['EditedOn'] = this.editedOn;
data['EditedBy'] = this.editedBy;
data['Channel'] = this.channel;
data['ClientRequestID'] = this.clientRequestID;
data['ReturnedToQueue'] = this.returnedToQueue;
data['PickupDateTime'] = this.pickupDateTime;
data['PickupLocationName'] = this.pickupLocationName;
data['DropoffLocationName'] = this.dropoffLocationName;
data['RealRRT_HaveTransactions'] = this.realRRTHaveTransactions;
data['NearestProjectDescription'] = this.nearestProjectDescription;
data['NearestProjectDescriptionN'] = this.nearestProjectDescriptionN;
data['ProjectDescription'] = this.projectDescription;
data['ProjectDescriptionN'] = this.projectDescriptionN;
return data;
}
}

@ -0,0 +1,60 @@
class RequestGetListPharmacyForPrescriptions {
int latitude;
int longitude;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int itemID;
RequestGetListPharmacyForPrescriptions(
{this.latitude,
this.longitude,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.itemID});
RequestGetListPharmacyForPrescriptions.fromJson(Map<String, dynamic> json) {
latitude = json['Latitude'];
longitude = json['Longitude'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
itemID = json['ItemID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['ItemID'] = this.itemID;
return data;
}
}

@ -0,0 +1,88 @@
class RequestPrescriptionReport {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int appointmentNo;
String setupID;
int episodeID;
int clinicID;
int projectID;
int dischargeNo;
RequestPrescriptionReport(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.appointmentNo,
this.setupID,
this.episodeID,
this.clinicID,
this.projectID,
this.dischargeNo});
RequestPrescriptionReport.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
appointmentNo = json['AppointmentNo'];
setupID = json['SetupID'];
episodeID = json['EpisodeID'];
clinicID = json['ClinicID'];
projectID = json['ProjectID'];
dischargeNo = json['DischargeNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['AppointmentNo'] = this.appointmentNo;
data['SetupID'] = this.setupID;
data['EpisodeID'] = this.episodeID;
data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID;
data['DischargeNo'] = this.dischargeNo;
return data;
}
}

@ -0,0 +1,86 @@
class RequestPrescriptionReportEnh {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int appointmentNo;
String setupID;
int dischargeNo;
int episodeID;
int clinicID;
int projectID;
RequestPrescriptionReportEnh(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.appointmentNo,
this.setupID,
this.episodeID,
this.clinicID,
this.projectID,this.dischargeNo});
RequestPrescriptionReportEnh.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
appointmentNo = json['AppointmentNo'];
setupID = json['SetupID'];
episodeID = json['EpisodeID'];
clinicID = json['ClinicID'];
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['AppointmentNo'] = this.appointmentNo;
data['SetupID'] = this.setupID;
data['EpisodeID'] = this.episodeID;
data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID;
data['DischargeNo'] = this.dischargeNo;
return data;
}
}

@ -0,0 +1,190 @@
import 'package:doctor_app_flutter/util/date-utils.dart';
class FinalRadiology {
String setupID;
int projectID;
Null patientID;
int invoiceLineItemNo;
int invoiceNo;
int doctorID;
int clinicID;
DateTime orderDate;
String reportData;
String imageURL;
String procedureID;
int appointmentNo;
Null dIAPacsURL;
bool isRead;
String readOn;
var admissionNo;
bool isInOutPatient;
int actualDoctorRate;
String clinicDescription;
String dIAPACSURL;
String doctorImageURL;
String doctorName;
int doctorRate;
String doctorTitle;
int gender;
String genderDescription;
bool isActiveDoctorProfile;
bool isExecludeDoctor;
String isInOutPatientDescription;
String isInOutPatientDescriptionN;
String nationalityFlagURL;
int noOfPatientsRate;
int orderNo;
String projectName;
String qR;
String reportDataHTML;
String reportDataTextString;
List<String> speciality;
bool isCVI;
bool isRadMedicalReport;
bool isLiveCareAppointment;
FinalRadiology(
{this.setupID,
this.projectID,
this.patientID,
this.invoiceLineItemNo,
this.invoiceNo,
this.doctorID,
this.clinicID,
this.orderDate,
this.reportData,
this.imageURL,
this.procedureID,
this.appointmentNo,
this.dIAPacsURL,
this.isRead,
this.readOn,
this.admissionNo,
this.isInOutPatient,
this.actualDoctorRate,
this.clinicDescription,
this.dIAPACSURL,
this.doctorImageURL,
this.doctorName,
this.doctorRate,
this.doctorTitle,
this.gender,
this.genderDescription,
this.isActiveDoctorProfile,
this.isExecludeDoctor,
this.isInOutPatientDescription,
this.isInOutPatientDescriptionN,
this.nationalityFlagURL,
this.noOfPatientsRate,
this.orderNo,
this.projectName,
this.qR,
this.reportDataHTML,
this.reportDataTextString,
this.speciality,
this.isCVI,
this.isRadMedicalReport,this.isLiveCareAppointment});
FinalRadiology.fromJson(Map<String, dynamic> json) {
try {
setupID = json['SetupID'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
invoiceLineItemNo = json['InvoiceLineItemNo'];
invoiceNo = json['InvoiceNo'];
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
orderDate = DateUtils.convertStringToDate(json['OrderDate']);
reportData = json['ReportData'];
imageURL = json['ImageURL'];
procedureID = json['ProcedureID'];
appointmentNo = json['AppointmentNo'];
dIAPacsURL = json['DIAPacsURL'];
isRead = json['IsRead'];
readOn = json['ReadOn'];
admissionNo = json['AdmissionNo'];
isInOutPatient = json['IsInOutPatient'];
actualDoctorRate = json['ActualDoctorRate'];
clinicDescription = json['ClinicDescription'];
dIAPACSURL = json['DIA_PACS_URL'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
doctorRate = json['DoctorRate'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isExecludeDoctor = json['IsExecludeDoctor'];
isInOutPatientDescription = json['IsInOutPatientDescription'];
isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate'];
orderNo = json['OrderNo'];
projectName = json['ProjectName'];
qR = json['QR'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
reportDataHTML = json['ReportDataHTML'];
reportDataTextString = json['ReportDataTextString'];
// speciality = json['Speciality'].cast<String>();
isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport'];
} catch (e) {
print(e);
}
}
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['InvoiceLineItemNo'] = this.invoiceLineItemNo;
data['InvoiceNo'] = this.invoiceNo;
data['DoctorID'] = this.doctorID;
data['ClinicID'] = this.clinicID;
data['OrderDate'] = this.orderDate;
data['ReportData'] = this.reportData;
data['ImageURL'] = this.imageURL;
data['ProcedureID'] = this.procedureID;
data['AppointmentNo'] = this.appointmentNo;
data['DIAPacsURL'] = this.dIAPacsURL;
data['IsRead'] = this.isRead;
data['ReadOn'] = this.readOn;
data['AdmissionNo'] = this.admissionNo;
data['IsInOutPatient'] = this.isInOutPatient;
data['ActualDoctorRate'] = this.actualDoctorRate;
data['ClinicDescription'] = this.clinicDescription;
data['DIA_PACS_URL'] = this.dIAPACSURL;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorName'] = this.doctorName;
data['DoctorRate'] = this.doctorRate;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
data['IsExecludeDoctor'] = this.isExecludeDoctor;
data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['OrderNo'] = this.orderNo;
data['ProjectName'] = this.projectName;
data['QR'] = this.qR;
data['ReportDataHTML'] = this.reportDataHTML;
data['ReportDataTextString'] = this.reportDataTextString;
data['Speciality'] = this.speciality;
data['isCVI'] = this.isCVI;
data['isRadMedicalReport'] = this.isRadMedicalReport;
return data;
}
}
class FinalRadiologyList {
String filterName = "";
List<FinalRadiology> finalRadiologyList = List();
FinalRadiologyList({this.filterName, FinalRadiology finalRadiology}) {
finalRadiologyList.add(finalRadiology);
}
}

@ -0,0 +1,92 @@
class RequestPatientRadOrdersDetails {
int projectID;
int orderNo;
int invoiceNo;
String setupID;
String procedureID;
bool isMedicalReport;
bool isCVI;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
RequestPatientRadOrdersDetails(
{this.projectID,
this.orderNo,
this.invoiceNo,
this.setupID,
this.procedureID,
this.isMedicalReport,
this.isCVI,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
RequestPatientRadOrdersDetails.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
orderNo = json['OrderNo'];
invoiceNo = json['InvoiceNo'];
setupID = json['SetupID'];
procedureID = json['ProcedureID'];
isMedicalReport = json['IsMedicalReport'];
isCVI = json['isCVI'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['OrderNo'] = this.orderNo;
data['InvoiceNo'] = this.invoiceNo;
data['SetupID'] = this.setupID;
data['ProcedureID'] = this.procedureID;
data['IsMedicalReport'] = this.isMedicalReport;
data['isCVI'] = this.isCVI;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
return data;
}
}

@ -0,0 +1,116 @@
class RequestSendRadReportEmail {
int channel;
String clinicName;
String dateofBirth;
int deviceTypeID;
String doctorName;
String generalid;
int invoiceNo;
String iPAdress;
bool isDentalAllowedBackend;
int languageID;
String orderDate;
int patientID;
String patientIditificationNum;
String patientMobileNumber;
String patientName;
int patientOutSA;
int patientType;
int patientTypeID;
int projectID;
String projectName;
String radResult;
String sessionID;
String setupID;
String to;
String tokenID;
double versionID;
RequestSendRadReportEmail(
{this.channel,
this.clinicName,
this.dateofBirth,
this.deviceTypeID,
this.doctorName,
this.generalid,
this.invoiceNo,
this.iPAdress,
this.isDentalAllowedBackend,
this.languageID,
this.orderDate,
this.patientID,
this.patientIditificationNum,
this.patientMobileNumber,
this.patientName,
this.patientOutSA,
this.patientType,
this.patientTypeID,
this.projectID,
this.projectName,
this.radResult,
this.sessionID,
this.setupID,
this.to,
this.tokenID,
this.versionID});
RequestSendRadReportEmail.fromJson(Map<String, dynamic> json) {
channel = json['Channel'];
clinicName = json['ClinicName'];
dateofBirth = json['DateofBirth'];
deviceTypeID = json['DeviceTypeID'];
doctorName = json['DoctorName'];
generalid = json['generalid'];
invoiceNo = json['InvoiceNo'];
iPAdress = json['IPAdress'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
languageID = json['LanguageID'];
orderDate = json['OrderDate'];
patientID = json['PatientID'];
patientIditificationNum = json['PatientIditificationNum'];
patientMobileNumber = json['PatientMobileNumber'];
patientName = json['PatientName'];
patientOutSA = json['PatientOutSA'];
patientType = json['PatientType'];
patientTypeID = json['PatientTypeID'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
radResult = json['RadResult'];
sessionID = json['SessionID'];
setupID = json['SetupID'];
to = json['To'];
tokenID = json['TokenID'];
versionID = json['VersionID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Channel'] = this.channel;
data['ClinicName'] = this.clinicName;
data['DateofBirth'] = this.dateofBirth;
data['DeviceTypeID'] = this.deviceTypeID;
data['DoctorName'] = this.doctorName;
data['generalid'] = this.generalid;
data['InvoiceNo'] = this.invoiceNo;
data['IPAdress'] = this.iPAdress;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['LanguageID'] = this.languageID;
data['OrderDate'] = this.orderDate;
data['PatientID'] = this.patientID;
data['PatientIditificationNum'] = this.patientIditificationNum;
data['PatientMobileNumber'] = this.patientMobileNumber;
data['PatientName'] = this.patientName;
data['PatientOutSA'] = this.patientOutSA;
data['PatientType'] = this.patientType;
data['PatientTypeID'] = this.patientTypeID;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['RadResult'] = this.radResult;
data['SessionID'] = this.sessionID;
data['SetupID'] = this.setupID;
data['To'] = this.to;
data['TokenID'] = this.tokenID;
data['VersionID'] = this.versionID;
return data;
}
}

@ -87,13 +87,18 @@ class PatientService extends BaseService {
ClinicByProjectIdRequest();
ReferToDoctorRequest _referToDoctorRequest;
Future<dynamic> getPatientList( patient, patientType) async {
Future<dynamic> getPatientList(patient, patientType, {isView}) async {
hasError = false;
int val = int.parse(patientType);
var url;
if (isView == false && patientType == '1') {
url = PRM_SEARCH_PATIENT;
} else {
url = GET_PATIENT + SERVICES_PATIANT[val];
}
dynamic localRes;
await baseAppClient.post(
GET_PATIENT + SERVICES_PATIANT[val],
url,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
},
@ -101,28 +106,32 @@ class PatientService extends BaseService {
hasError = true;
super.error = error;
},
body:val ==7?patient: {
"ProjectID": patient.ProjectID,
"ClinicID": patient.ClinicID,
"DoctorID": patient.DoctorID,
"FirstName": patient.FirstName,
"MiddleName": patient.MiddleName,
"LastName": patient.LastName,
"PatientMobileNumber": patient.PatientMobileNumber,
"PatientIdentificationID": patient.PatientIdentificationID,
"PatientID": patient.PatientID,
"From": patient.From,
"To": patient.To,
"LanguageID": patient.LanguageID,
"stamp": patient.stamp,
"IPAdress": patient.IPAdress,
"VersionID": patient.VersionID,
"Channel": patient.Channel,
"TokenID": patient.TokenID,
"SessionID": patient.SessionID,
"IsLoginForDoctorApp": patient.IsLoginForDoctorApp,
"PatientOutSA": patient.PatientOutSA
},
body: val == 7
? patient
: {
"ProjectID": patient.ProjectID,
"ClinicID": patient.ClinicID,
"DoctorID": patient.DoctorID,
"FirstName": patient.FirstName,
"MiddleName": patient.MiddleName,
"LastName": patient.LastName,
"PatientMobileNumber": patient.PatientMobileNumber,
"PatientIdentificationID": patient.PatientIdentificationID,
"PatientID": patient.PatientID,
"From": patient.From,
"To": patient.To,
"LanguageID": patient.LanguageID,
"stamp": patient.stamp,
"IPAdress": patient.IPAdress,
"VersionID": patient.VersionID,
"Channel": patient.Channel,
"TokenID": patient.TokenID,
"SessionID": patient.SessionID,
"IsLoginForDoctorApp": patient.IsLoginForDoctorApp,
"PatientOutSA": patient.PatientOutSA,
"SearchType": patient.Searchtype,
"MobileNo": ''
},
);
return Future.value(localRes);

@ -0,0 +1,182 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report_enh.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/cupertino.dart';
import 'base/base_service.dart';
class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = List();
List<PrescriptionsOrder> prescriptionsOrderList = List();
Future getPrescriptions(PatiantInformtion patient) async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.postPatient(PRESCRIPTIONS,patient: patient,
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) {
prescriptionsList.add(Prescriptions.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport(
appointmentNo: 0, isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport({Prescriptions prescriptions,@required PatiantInformtion patient}) async {
hasError = false;
_requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
_requestPrescriptionReport.projectID = prescriptions.projectID;
_requestPrescriptionReport.clinicID = prescriptions.clinicID;
_requestPrescriptionReport.setupID = prescriptions.setupID;
_requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.postPatient(
prescriptions.isInOutPatient
? GET_PRESCRIPTION_REPORT_ENH
: GET_PRESCRIPTION_REPORT_NEW,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
prescriptionReportEnhList.clear();
if (prescriptions.isInOutPatient) {
response['ListPRM'].forEach((prescriptions) {
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptionReport.toJson());
}
RequestGetListPharmacyForPrescriptions
requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions(
latitude: 0,
longitude: 0,
isDentalAllowedBackend: false,
);
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List();
Future getListPharmacyForPrescriptions({int itemId,@required PatiantInformtion patient}) async {
hasError = false;
requestGetListPharmacyForPrescriptions.itemID = itemId;
await baseAppClient.postPatient(GET_PHARMACY_LIST,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
pharmacyPrescriptionsList.clear();
response['PharmList'].forEach((prescriptions) {
pharmacyPrescriptionsList
.add(PharmacyPrescriptions.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: requestGetListPharmacyForPrescriptions.toJson());
}
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
RequestPrescriptionReportEnh(
isDentalAllowedBackend: false,
);
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
Future getPrescriptionReportEnh(
{PrescriptionsOrder prescriptionsOrder, @required PatiantInformtion patient}) async {
///This logic copy from the old app from class [order-history.component.ts] in line 45
bool isInPatient = false;
prescriptionsList.forEach((element) {
if (prescriptionsOrder.appointmentNo == "0") {
if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient;
}
} else {
if (int.parse(prescriptionsOrder.appointmentNo) ==
element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient;
///call inpGetPrescriptionReport
}
}
});
hasError = false;
await baseAppClient.postPatient(
isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear();
if (isInPatient) {
response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
PrescriptionReportEnh reportEnh =
PrescriptionReportEnh.fromJson(prescriptions);
reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh);
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptionReportEnh.toJson());
}
Future getPrescriptionsOrders() async {
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS,
onSuccess: (dynamic response, int statusCode) {
prescriptionsOrderList.clear();
response['PatientER_GetPatientAllPresOrdersList']
.forEach((prescriptionsOrder) {
prescriptionsOrderList
.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -0,0 +1,48 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:doctor_app_flutter/core/model/radiology/request_send_rad_report_email.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/cupertino.dart';
import 'base/base_service.dart';
class RadiologyService extends BaseService {
List<FinalRadiology> finalRadiologyList = List();
String url = '';
Future getRadImageURL({int invoiceNo, int lineItem, int projectId,@required PatiantInformtion patient}) async {
hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = invoiceNo;
body['LineIt emNo'] = lineItem;
body['ProjectID'] = projectId;
await baseAppClient.postPatient(GET_RAD_IMAGE_URL,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
url = response['Data'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getPatientRadOrders(PatiantInformtion patient) async {
hasError = false;
await baseAppClient.postPatient(GET_PATIENT_ORDERS,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
finalRadiologyList.clear();
response['FinalRadiologyList'].forEach((radiology) {
finalRadiologyList.add(FinalRadiology.fromJson(radiology));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}
}

@ -49,23 +49,21 @@ class PatientViewModel extends BaseViewModel {
_patientService.referalFrequancyList;
Future getPatientList(patient, patientType,
{bool isBusyLocal = false}) async {
var localRes ;
{bool isBusyLocal = false, isView}) async {
var localRes;
if (isBusyLocal) {
setState(ViewState.BusyLocal);
} else {
setState(ViewState.Busy);
}
localRes = await _patientService.getPatientList(patient, patientType);
localRes = await _patientService.getPatientList(patient, patientType,
isView: isView);
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.Error);
}
return localRes;
}
Future getPatientVitalSign(patient) async {

@ -0,0 +1,145 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/service/prescriptions_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/material.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class PrescriptionsViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
PrescriptionsService _prescriptionsService = locator<PrescriptionsService>();
List<PrescriptionsList> _prescriptionsOrderListClinic = List();
List<PrescriptionsList> _prescriptionsOrderListHospital = List();
List<PrescriptionReport> get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
List<Prescriptions> get prescriptionsList =>
_prescriptionsService.prescriptionsList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList ;
List<PrescriptionReportEnh> get prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList;
List<PrescriptionsList> get prescriptionsOrderList =>
filterType == FilterType.Clinic
? _prescriptionsOrderListClinic
: _prescriptionsOrderListHospital;
getPrescriptions(PatiantInformtion patient) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptions(patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
_filterList();
await _getPrescriptionsOrders();
setState(ViewState.Idle);
}
}
_getPrescriptionsOrders() async {
await _prescriptionsService.getPrescriptionsOrders();
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
void _filterList() {
_prescriptionsService.prescriptionsList.forEach((element) {
/// PrescriptionsList list sort clinic
List<PrescriptionsList> prescriptionsByClinic =
_prescriptionsOrderListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (prescriptionsByClinic.length != 0) {
_prescriptionsOrderListClinic[
_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListClinic.add(PrescriptionsList(
filterName: element.clinicDescription, prescriptions: element));
}
/// PrescriptionsList list sort via hospital
List<PrescriptionsList> prescriptionsByHospital =
_prescriptionsOrderListHospital
.where(
(elementClinic) => elementClinic.filterName == element.name,
)
.toList();
if (prescriptionsByHospital.length != 0) {
_prescriptionsOrderListHospital[_prescriptionsOrderListHospital
.indexOf(prescriptionsByHospital[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListHospital.add(PrescriptionsList(
filterName: element.name, prescriptions: element));
}
});
}
setFilterType(FilterType filterType) {
this.filterType = filterType;
notifyListeners();
}
getPrescriptionReport({Prescriptions prescriptions,@required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions,patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
getListPharmacyForPrescriptions({int itemId,@required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getListPharmacyForPrescriptions(itemId: itemId,patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder,@required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder,patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
}

@ -0,0 +1,88 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:doctor_app_flutter/core/service/radiology_service.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/foundation.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class RadiologyViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
RadiologyService _radiologyService = locator<RadiologyService>();
List<FinalRadiologyList> _finalRadiologyListClinic = List();
List<FinalRadiologyList> _finalRadiologyListHospital = List();
List<FinalRadiologyList> get finalRadiologyList =>
filterType == FilterType.Clinic
? _finalRadiologyListClinic
: _finalRadiologyListHospital;
void getPatientRadOrders(PatiantInformtion patient) async {
setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient);
if (_radiologyService.hasError) {
error = _radiologyService.error;
setState(ViewState.Error);
} else {
_radiologyService.finalRadiologyList.forEach((element) {
List<FinalRadiologyList> finalRadiologyListClinic =
_finalRadiologyListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (finalRadiologyListClinic.length != 0) {
_finalRadiologyListClinic[
finalRadiologyListClinic.indexOf(finalRadiologyListClinic[0])]
.finalRadiologyList
.add(element);
} else {
_finalRadiologyListClinic.add(FinalRadiologyList(
filterName: element.clinicDescription, finalRadiology: element));
}
// FinalRadiologyList list sort via project
List<FinalRadiologyList> finalRadiologyListHospital =
_finalRadiologyListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
if (finalRadiologyListHospital.length != 0) {
_finalRadiologyListHospital[finalRadiologyListHospital
.indexOf(finalRadiologyListHospital[0])]
.finalRadiologyList
.add(element);
} else {
_finalRadiologyListHospital.add(FinalRadiologyList(
filterName: element.projectName, finalRadiology: element));
}
});
setState(ViewState.Idle);
}
}
String get radImageURL => _radiologyService.url;
getRadImageURL({int invoiceNo, int lineItem, int projectId,@required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _radiologyService.getRadImageURL(
invoiceNo: invoiceNo, lineItem: lineItem, projectId: projectId,patient: patient);
if (_radiologyService.hasError) {
error = _radiologyService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
setFilterType(FilterType filterType) {
this.filterType = filterType;
notifyListeners();
}
}

@ -25,6 +25,8 @@ import 'core/service/medicine_service.dart';
import 'core/service/patient-ucaf-service.dart';
import 'core/service/patient-vital-signs-service.dart';
import 'core/service/patient-doctor-referral-service.dart';
import 'core/service/prescriptions_service.dart';
import 'core/service/radiology_service.dart';
import 'core/service/referral_patient_service.dart';
import 'core/service/referred_patient_service.dart';
import 'core/service/schedule_service.dart';
@ -38,6 +40,8 @@ import 'core/viewModel/patient-admission-request-viewmodel.dart';
import 'core/viewModel/patient-ucaf-viewmodel.dart';
import 'core/viewModel/patient-vital-sign-viewmodel.dart';
import 'core/viewModel/patient-referral-viewmodel.dart';
import 'core/viewModel/prescriptions_view_model.dart';
import 'core/viewModel/radiology_view_model.dart';
import 'core/viewModel/referral_view_model.dart';
import 'core/viewModel/referred_view_model.dart';
import 'core/viewModel/schedule_view_model.dart';
@ -67,6 +71,8 @@ void setupLocator() {
locator.registerLazySingleton(() => PatientMuseService());
locator.registerLazySingleton(() => LabsService());
locator.registerLazySingleton(() => InsuranceCardService());
locator.registerLazySingleton(() => RadiologyService());
locator.registerLazySingleton(() => PrescriptionsService());
/// View Model
locator.registerFactory(() => DoctorReplayViewModel());
@ -89,4 +95,6 @@ void setupLocator() {
locator.registerFactory(() => PatientMuseViewModel());
locator.registerFactory(() => LabsViewModel());
locator.registerFactory(() => InsuranceViewModel());
locator.registerFactory(() => RadiologyViewModel());
locator.registerFactory(() => PrescriptionsViewModel());
}

@ -3,7 +3,7 @@
class PatiantInformtion {
final List<PatiantInformtion> list;
int genderInt;
String age;
dynamic age;
String appointmentDate;
int appointmentNo;
String appointmentType;
@ -139,7 +139,8 @@ class PatiantInformtion {
emailAddress: json["EmailAddress"] ?? json["emailAddress"],
patientIdentificationNo:
json["PatientIdentificationNo"] ?? json["patientIdentificationNo"],
patientType: json["PatientType"] ?? json["patientType"],
//TODO make 7 dynamic when the backend retrun it in patient arrival
patientType: json["PatientType"] ?? json["patientType"]??7,
admissionNo: json["AdmissionNo"] ?? json["admissionNo"],
admissionDate: json["AdmissionDate"] ?? json["admissionDate"],
createdOn: json["CreatedOn"] ?? json["CreatedOn"],

@ -1,4 +1,3 @@
/*
*@author:Modified by amjad add getter and setter Amjad Amireh
*@Date:11/5/2020
@ -29,91 +28,88 @@ class PatientModel {
String SessionID;
bool IsLoginForDoctorApp;
bool PatientOutSA;
int Searchtype;
int get getProjectID => ProjectID;
int get getProjectID => ProjectID;
set setProjectID(int ProjectID) => this.ProjectID = ProjectID;
set setProjectID(int ProjectID) => this.ProjectID = ProjectID;
int get getClinicID => ClinicID;
int get getClinicID => ClinicID;
set setClinicID(int ClinicID) => this.ClinicID = ClinicID;
set setClinicID(int ClinicID) => this.ClinicID = ClinicID;
int get getDoctorID => DoctorID;
int get getDoctorID => DoctorID;
set setDoctorID(int DoctorID) => this.DoctorID = DoctorID;
set setDoctorID(int DoctorID) => this.DoctorID = DoctorID;
String get getFirstName => FirstName;
set setFirstName(String FirstName) => this.FirstName = FirstName;
set setFirstName(String FirstName) => this.FirstName = FirstName;
String get getMiddleName => MiddleName;
String get getMiddleName => MiddleName;
set setMiddleName(String MiddleName) => this.MiddleName = MiddleName;
set setMiddleName(String MiddleName) => this.MiddleName = MiddleName;
String get getLastName => LastName;
String get getLastName => LastName;
set setLastName(String LastName) => this.LastName = LastName;
set setLastName(String LastName) => this.LastName = LastName;
String get getPatientMobileNumber => PatientMobileNumber;
String get getPatientMobileNumber => PatientMobileNumber;
set setPatientMobileNumber(String PatientMobileNumber) => this.PatientMobileNumber = PatientMobileNumber;
set setPatientMobileNumber(String PatientMobileNumber) =>
this.PatientMobileNumber = PatientMobileNumber;
// String get getPatientIdentificationID => PatientIdentificationID;
// set setPatientIdentificationID(String PatientIdentificationID) => this.PatientIdentificationID = PatientIdentificationID;
int get getPatientID => PatientID;
set setPatientID(int PatientID) => this.PatientID = PatientID;
String get getFrom => From;
int get getPatientID => PatientID;
set setFrom(String From) => this.From = From;
set setPatientID(int PatientID) => this.PatientID = PatientID;
String get getTo => To;
String get getFrom => From;
set setTo(String To) => this.To = To;
set setFrom(String From) => this.From = From;
int get getLanguageID => LanguageID;
String get getTo => To;
set setLanguageID(int LanguageID) => this.LanguageID = LanguageID;
set setTo(String To) => this.To = To;
String get getStamp => stamp;
int get getLanguageID => LanguageID;
set setStamp(String stamp) => this.stamp = stamp;
set setLanguageID(int LanguageID) => this.LanguageID = LanguageID;
String get getIPAdress => IPAdress;
String get getStamp => stamp;
set setIPAdress(String IPAdress) => this.IPAdress = IPAdress;
set setStamp(String stamp) => this.stamp = stamp;
double get getVersionID => VersionID;
String get getIPAdress => IPAdress;
set setVersionID(double VersionID) => this.VersionID = VersionID;
set setIPAdress(String IPAdress) => this.IPAdress = IPAdress;
int get getChannel => Channel;
double get getVersionID => VersionID;
set setChannel(int Channel) => this.Channel = Channel;
set setVersionID(double VersionID) => this.VersionID = VersionID;
String get getTokenID => TokenID;
int get getChannel => Channel;
set setTokenID(String TokenID) => this.TokenID = TokenID;
set setChannel(int Channel) => this.Channel = Channel;
String get getSessionID => SessionID;
String get getTokenID => TokenID;
set setSessionID(String SessionID) => this.SessionID = SessionID;
set setTokenID(String TokenID) => this.TokenID = TokenID;
bool get getIsLoginForDoctorApp => IsLoginForDoctorApp;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) => this.IsLoginForDoctorApp = IsLoginForDoctorApp;
bool get getPatientOutSA => PatientOutSA;
set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA;
String get getSessionID => SessionID;
set setSessionID(String SessionID) => this.SessionID = SessionID;
bool get getIsLoginForDoctorApp => IsLoginForDoctorApp;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) =>
this.IsLoginForDoctorApp = IsLoginForDoctorApp;
bool get getPatientOutSA => PatientOutSA;
set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA;
PatientModel(
{this.ProjectID,
@ -135,15 +131,13 @@ class PatientModel {
this.TokenID,
this.SessionID,
this.IsLoginForDoctorApp,
this.PatientOutSA});
this.PatientOutSA,
this.Searchtype});
factory PatientModel.fromJson(Map<String, dynamic> json) => PatientModel(
factory PatientModel.fromJson(Map<String, dynamic> json) => PatientModel(
FirstName: json["FirstName"],
LastName: json["LasttName"],
);
LastName: json["LasttName"],
);
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.ProjectID;
@ -167,8 +161,8 @@ class PatientModel {
data['SessionID'] = this.SessionID;
data['IsLoginForDoctorApp'] = this.IsLoginForDoctorApp;
data['PatientOutSA'] = this.PatientOutSA;
data['Searchtype'] = this.Searchtype;
return data;
}
}
//***************************

@ -9,11 +9,13 @@ import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/progress_note_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/refer_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart';
import 'package:doctor_app_flutter/screens/live_care/video_call.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_screen_history.dart';
import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart';
import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
@ -107,6 +109,7 @@ const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details';
// const String VIDEO_CALL = 'video-call';
const String LIVECARE_PENDING_LIST = 'livecare-pendinglist';
const String ORDER_PRESCRIPTION = 'prescription/prescriptionsss';
const String ORDER_PRESCRIPTION_NEW = 'prescription/prescription_new';
const String ORDER_PRESCRIPTION_HISTORY = 'prescription/prescriptionsssH';
const String ORDER_PROCEDURE = 'procedure/procedure';
// const String LIVECARE_END_DIALOG = 'video-call/EndCallDialogBox';
@ -114,6 +117,7 @@ const String PATIENT_SICKLEAVE = 'patients/patient_sickleave';
const String ADD_SICKLEAVE = 'add-sickleave';
const String SHOW_SICKLEAVE = 'show-sickleave';
const String RADIOLOGY = 'radiology';
const String RADIOLOGY_PATIENT = 'radiology-patient';
//todo: change the routing way.
var routes = {
ROOT: (_) => RootPage(),
@ -151,6 +155,7 @@ var routes = {
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
PATIENT_VITAL_SIGN: (_) => PatientVitalSignScreen(),
RADIOLOGY: (_) => RadiologyScreen(),
RADIOLOGY_PATIENT: (_) => RadiologyHomePage(),
PATIENT_ADMISSION_REQUEST: (_) => AdmissionRequestFirstScreen(),
PATIENT_ADMISSION_REQUEST_2: (_) => AdmissionRequestSecondScreen(),
PATIENT_ADMISSION_REQUEST_3: (_) => AdmissionRequestThirdScreen(),
@ -170,6 +175,7 @@ var routes = {
ADD_SICKLEAVE: (_) => AddSickLeavScreen(),
SHOW_SICKLEAVE: (_) => ShowSickLeaveScreen(),
ORDER_PRESCRIPTION: (_) => NewPrescriptionScreen(),
ORDER_PRESCRIPTION_NEW: (_) => PrescriptionsPage(),
ORDER_PRESCRIPTION_HISTORY: (_) => NewPrescriptionHistoryScreen(),
ORDER_PROCEDURE: (_) => ProcedureScreen(),

@ -93,6 +93,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
"patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType,
"isSearch": true,
"isView": isView
});
}
} else {
@ -180,7 +181,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText:
TranslationBase.of(context).phoneNumber,
TranslationBase.of(context).patientID,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
@ -188,15 +189,14 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
focusNode: _nodeText1,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientMobileNumber = "0"
: _patientSearchFormValues
.setPatientMobileNumber = value;
? _patientSearchFormValues.setPatientID =
0
: _patientSearchFormValues.setPatientID =
int.parse(value);
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setPatientMobileNumber = "0";
_patientSearchFormValues.setPatientID = 0;
}
},
),
@ -263,7 +263,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
elevation: 16,
selectedItemBuilder:
(BuildContext context) {
return PATIENT_TYPE_Des.map((item) {
return PATIENT_TYPE_Des.map(
(item) {
return Row(
mainAxisSize:
MainAxisSize.max,
@ -292,7 +293,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
int.parse(_selectedType);
})
},
items: PATIENT_TYPE_Des.map((item) {
items:
PATIENT_TYPE_Des.map((item) {
!projectsProvider.isArabic
? itemText = item['text']
: itemText =
@ -347,6 +349,42 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
SizedBox(
height: 10,
),
if (_selectedType != '7')
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.phoneNumber,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientMobileNumber = "0"
: _patientSearchFormValues
.setPatientMobileNumber =
value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setPatientMobileNumber = "0";
}
},
),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
@ -440,32 +478,32 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.patientFile,
borderColor: Colors.white,
textInputType: TextInputType.number,
focusNode: _nodeText3,
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {},
),
),
(!(_selectedType == '2' ||
_selectedType == '4'))
? DynamicElements(
_patientSearchFormValues,
isFormSubmitted)
: SizedBox(
height: 0,
),
// Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(
// Radius.circular(6.0)),
// border: Border.all(
// width: 1.0,
// color: HexColor("#CCCCCC"))),
// padding: EdgeInsets.all(10),
// child: AppTextFormField(
// labelText: TranslationBase.of(context)
// .patientFile,
// borderColor: Colors.white,
// textInputType: TextInputType.number,
// focusNode: _nodeText3,
// inputFormatter: ONLY_NUMBERS,
// onSaved: (value) {},
// ),
// ),
// (!(_selectedType == '2' ||
// _selectedType == '4'))
// ? DynamicElements(
// _patientSearchFormValues,
// isFormSubmitted)
// : SizedBox(
// height: 0,
// ),
SizedBox(
height: 10,
),

@ -24,6 +24,7 @@ import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.d
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import '../../config/size_config.dart';
@ -34,11 +35,13 @@ class PatientsScreen extends StatefulWidget {
final selectedType;
final isAppbar;
final arrivalType;
final isView;
PatientsScreen(
{this.patientSearchForm,
this.selectedType,
this.isAppbar = true,
this.arrivalType});
this.arrivalType,
this.isView});
@override
_PatientsScreenState createState() => _PatientsScreenState();
}
@ -76,7 +79,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
String error = "";
String arrivalType;
ProjectViewModel projectsProvider;
var isView;
final _controller = TextEditingController();
PatientModel patient;
@ -236,6 +239,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
if (routeArgs != null && routeArgs.containsKey("isSearch")) {
isSearch = routeArgs['isSearch'];
}
if (routeArgs != null && routeArgs.containsKey("isSearch")) {
isView = routeArgs['isView'];
patient.Searchtype = 1;
}
if (!projectsProvider.isArabic)
patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)];
@ -261,7 +268,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
val2 == 7
? getPatientArrivalListRequestModel.toJson()
: patient,
patientType)
patientType,
isView: isView)
.then((res) {
setState(() {
if (res != null && res['MessageStatus'] == 1) {
@ -285,10 +293,35 @@ class _PatientsScreenState extends State<PatientsScreen> {
lItems = localList;
}
} else {
lItems = res[SERVICES_PATIANT2[val2]];
if (isView == false && val2 == 1) {
lItems = res['GetPatientFileInformation_PRMList'];
} else {
lItems = res[SERVICES_PATIANT2[val2]];
}
}
parsed = lItems;
responseModelList = new ModelResponse.fromJson(parsed).list;
//if (val2 == 7) {
responseModelList.sort((a, b) {
if (b.startTime != null && b.startTime != null) {
DateTime now = DateTime.now();
DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm");
String formattedDate =
DateFormat('yyyy-MM-dd ' + a.startTime).format(now);
DateTime dateTimeA = dateFormat.parse(formattedDate);
String formattedDateB =
DateFormat('yyyy-MM-dd ' + b.startTime).format(now);
DateTime dateTimeB = dateFormat.parse(formattedDateB);
var adate = dateTimeA; //a.startTime;
var bdate = dateTimeB;
return adate.compareTo(bdate);
} else {
var adate = convertDateFormat(a.appointmentDate);
var bdate = convertDateFormat(b.appointmentDate);
return bdate.compareTo(adate);
}
});
//}
responseModelList2 = responseModelList;
_isError = false;
} else {
@ -598,8 +631,16 @@ class _PatientsScreenState extends State<PatientsScreen> {
parsed = lItems;
responseModelList = new ModelResponse.fromJson(parsed).list;
responseModelList.sort((a, b) {
var adate = a.arrivedOn;
var bdate = b.arrivedOn; //before -> var bdate = b.expiry;
DateTime now = DateTime.now();
DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm");
String formattedDate =
DateFormat('yyyy-MM-dd ' + a.startTime).format(now);
DateTime dateTimeA = dateFormat.parse(formattedDate);
String formattedDateB =
DateFormat('yyyy-MM-dd ' + b.startTime).format(now);
DateTime dateTimeB = dateFormat.parse(formattedDateB);
var adate = dateTimeA; //a.startTime;
var bdate = dateTimeB;
return adate.compareTo(bdate);
});
responseModelList2 = responseModelList;

@ -0,0 +1,79 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
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/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
class RadiologyDetailsPage extends StatelessWidget {
final FinalRadiology finalRadiology;
final PatiantInformtion patient;
RadiologyDetailsPage({Key key, this.finalRadiology, this.patient});
@override
Widget build(BuildContext context) {
return BaseView<RadiologyViewModel>(
onModelReady: (model) => model.getRadImageURL(
patient: patient,
projectId: finalRadiology.projectID,
lineItem: finalRadiology.invoiceLineItemNo,
invoiceNo: finalRadiology.invoiceNo),
builder: (_, model, widget) => AppScaffold(
appBarTitle: TranslationBase.of(context).radiologyReport,
isShowAppBar: true,
baseViewModel: model,
body: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Texts(
'${finalRadiology.reportData}',
textAlign: TextAlign.center,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'${finalRadiology.reportData}',
textAlign: TextAlign.start,
fontSize: 17,
),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.2,
)
],
),
),
bottomSheet: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.14,
color: Colors.grey[100],
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Divider(),
if (finalRadiology.dIAPACSURL != "")
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
onTap: () {
launch(model.radImageURL);
},
title: TranslationBase.of(context).openRad,
),
),
],
),
)),
);
}
}

@ -0,0 +1,114 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
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/screens/patients/profile/radiology/radiology_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/shared/app_expandable_notifier_new.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/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class RadiologyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
return BaseView<RadiologyViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).radiology,
baseViewModel: model,
body: FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () => model.setFilterType(FilterType.Clinic),
child: ListTile(
title: Text(TranslationBase.of(context).clinic),
leading: Radio(
value: FilterType.Clinic,
groupValue: model.filterType,
onChanged: (FilterType value) {
model.setFilterType(value);
},
),
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => model.setFilterType(FilterType.Hospital),
child: ListTile(
title: Text(TranslationBase.of(context).hospital),
leading: Radio(
value: FilterType.Hospital,
groupValue: model.filterType,
onChanged: (FilterType value) {
model.setFilterType(value);
},
),
),
),
)
],
),
...List.generate(
model.finalRadiologyList.length,
(index) => AppExpandableNotifier(
title: model.finalRadiologyList[index].filterName,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: model
.finalRadiologyList[index].finalRadiologyList
.map((radiology) {
return InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: RadiologyDetailsPage(
finalRadiology: radiology,
patient: patient,
),
),
),
child: DoctorCard(
isInOutPatient: radiology.isInOutPatient,
isLiveCareAppointment:
radiology.isLiveCareAppointment,
name: radiology.doctorName,
profileUrl: radiology.doctorImageURL,
billNo: '${radiology.invoiceNo}',
subName: '${radiology.projectName}',
date: projectViewModel.isArabic
? DateUtils.getMonthDayYearDateFormattedAr(
radiology.orderDate)
: DateUtils.getMonthDayYearDateFormatted(
radiology.orderDate),
),
);
}).toList(),
)),
)
],
),
),
),
);
}
}

@ -0,0 +1,168 @@
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class PrescriptionDetailsPage extends StatelessWidget {
final PrescriptionReport prescriptionReport;
PrescriptionDetailsPage({Key key, this.prescriptionReport});
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).prescriptions,
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(color: Colors.grey[200], width: 0.5),
),
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
prescriptionReport.imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
prescriptionReport.itemDescription.isNotEmpty
? prescriptionReport.itemDescription
: prescriptionReport.itemDescriptionN),
),
),
)
],
),
),
Container(
color: Colors.white,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
outside: BorderSide(width: 0.5)),
children: [
TableRow(
children: [
Container(
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(
child: Texts(
TranslationBase.of(context).route,
fontSize: 14,
))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(
child: Texts(
TranslationBase.of(context).frequency,
fontSize: 14,
))),
Container(
color: Colors.white,
width: double.infinity,
padding: EdgeInsets.symmetric(horizontal: 4),
child: Center(
child: Texts(
"${TranslationBase.of(context).dailyDoses}",
fontSize: 14,
))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
child: Center(
child: Texts(
TranslationBase.of(context).duration,
fontSize: 14,
))),
],
),
TableRow(
children: [
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child:
Center(child: Text(prescriptionReport.routeN))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child:
Text(prescriptionReport.frequencyN ?? ''))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child: Text(
'${prescriptionReport.doseDailyQuantity}'))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child:
Center(child: Text('${prescriptionReport.days}')))
],
),
],
),
),
Container(
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
width: double.infinity,
color: Colors.white,
padding: EdgeInsets.all(5),
child: Center(
child: Column(
children: <Widget>[
Texts(TranslationBase.of(context).notes),
SizedBox(
height: 5,
),
Divider(
height: 0.5,
color: Colors.grey[300],
),
SizedBox(
height: 5,
),
Texts(prescriptionReport.remarks ?? ''),
],
),
),
)
],
),
),
);
}
}

@ -0,0 +1,183 @@
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/viewModel/prescriptions_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/prescription/prescription_details_page.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class PrescriptionItemsPage extends StatelessWidget {
final Prescriptions prescriptions;
final PatiantInformtion patient;
PrescriptionItemsPage({Key key, this.prescriptions, this.patient});
@override
Widget build(BuildContext context) {
return BaseView<PrescriptionsViewModel>(
onModelReady: (model) =>
model.getPrescriptionReport(prescriptions: prescriptions,patient: patient),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).prescriptions,
baseViewModel: model,
body: SingleChildScrollView(
child: Container(
child: Column(
children: [
if (!prescriptions.isInOutPatient)
...List.generate(
model.prescriptionReportList.length,
(index) => InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport:
model.prescriptionReportList[index],
),
),
),
child: Container(
width: double.infinity,
margin:
EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: Colors.grey[200], width: 0.5),
),
child: Row(
children: <Widget>[
ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.prescriptionReportList[index]
.imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
SizedBox(
width: 10,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(model
.prescriptionReportList[index]
.itemDescription
.isNotEmpty
? model.prescriptionReportList[index]
.itemDescription
: model.prescriptionReportList[index]
.itemDescriptionN)),
)),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
),
),
))
else
...List.generate(
model.prescriptionReportEnhList.length,
(index) => InkWell(
onTap: () {
PrescriptionReport prescriptionReport =
PrescriptionReport(
imageSRCUrl: model
.prescriptionReportEnhList[index].imageSRCUrl,
itemDescription: model
.prescriptionReportEnhList[index]
.itemDescription,
itemDescriptionN: model
.prescriptionReportEnhList[index]
.itemDescription,
routeN:
model.prescriptionReportEnhList[index].route,
frequency: model
.prescriptionReportEnhList[index].frequency,
frequencyN: model
.prescriptionReportEnhList[index].frequency,
doseDailyQuantity: model
.prescriptionReportEnhList[index]
.doseDailyQuantity,
days: model.prescriptionReportEnhList[index].days,
itemID:
model.prescriptionReportEnhList[index].itemID,
remarks: model
.prescriptionReportEnhList[index].remarks);
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport: prescriptionReport,
),
),
);
},
child: Container(
margin: EdgeInsets.all(8.0),
color: Colors.white,
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model
.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
SizedBox(
width: 10,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(model.prescriptionReportEnhList[index]
.itemDescription),
],
),
),
),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
),
),
),
),
],
),
),
),
),
);
}
}

@ -0,0 +1,123 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/viewModel/prescriptions_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/prescription/prescription_items_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/shared/app_expandable_notifier_new.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/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PrescriptionsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionsViewModel>(
onModelReady: (model) => model.getPrescriptions(patient),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).prescriptions,
body: FractionallySizedBox(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () => model
.setFilterType(FilterType.Clinic),
child: ListTile(
title: Text(TranslationBase.of(context).clinic),
leading: Radio(
value: FilterType.Clinic,
groupValue: model.filterType,
onChanged: (FilterType value) {
model.setFilterType(value);
},
),
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => model
.setFilterType(FilterType.Hospital),
child: ListTile(
title: Text(TranslationBase.of(context).hospital),
leading: Radio(
value: FilterType.Hospital,
groupValue: model.filterType,
onChanged: (FilterType value) {
model.setFilterType(value);
},
),
),
),
)
],
),
...List.generate(
model.prescriptionsOrderList.length,
(index) => AppExpandableNotifier(
title: model
.prescriptionsOrderList[index].filterName,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: model
.prescriptionsOrderList[index].prescriptionsList
.map((prescriptions) {
return InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionItemsPage(
prescriptions: prescriptions,
patient: patient,
),
),
),
child: DoctorCard(
name: prescriptions.doctorName,
profileUrl: prescriptions.doctorImageURL,
rat:
prescriptions.actualDoctorRate.toDouble(),
subName: prescriptions.name,
isInOutPatient: prescriptions.isInOutPatient,
isLiveCareAppointment:
prescriptions.isLiveCareAppointment,
date: projectViewModel.isArabic
? DateUtils
.getMonthDayYearDateFormattedAr(
DateUtils.convertStringToDate(
prescriptions
.appointmentDate))
: DateUtils.getMonthDayYearDateFormatted(
DateUtils.convertStringToDate(
prescriptions.appointmentDate)),
),
);
}).toList(),
)),
)
],
),
),
));
}
}

@ -1160,6 +1160,10 @@ class TranslationBase {
String get companyName => localizedValues['companyName'][locale.languageCode];
String get procedureName => localizedValues['procedureName'][locale.languageCode];
String get usageStatus => localizedValues['usageStatus'][locale.languageCode];
String get prescriptions => localizedValues['prescriptions'][locale.languageCode];
String get notes => localizedValues['notes'][locale.languageCode];
String get dailyDoses => localizedValues['dailyDoses'][locale.languageCode];
}

@ -286,7 +286,14 @@ class PatientCard extends StatelessWidget {
bottomRight: Radius.circular(8),
topLeft: Radius.circular(8),
),
color: Colors.red,
color: patientInfo.appointmentType ==
'Regular' &&
patientInfo.visitTypeId == 100
? HexColor('#D02127')
: patientInfo.appointmentType ==
'Walkin'
? HexColor('#28323A')
: HexColor('#6C7379'),
),
child: Image.asset(
patientInfo.appointmentType ==

@ -171,6 +171,13 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
icon: 'patient/patient_sick_leave.png'),
],
),
);

@ -8,10 +8,10 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
String from;
String to;
PatiantInformtion patient;
String patientType;
final String from;
final String to;
final PatiantInformtion patient;
final String patientType;
ProfileMedicalInfoWidgetSearch(
{Key key, this.patient, this.patientType, this.from, this.to});
@ -29,7 +29,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
route: RADIOLOGY,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'radiology-1.png'),
@ -69,14 +69,14 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
? PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PRESCRIPTION,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'lab.png')
: PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PRESCRIPTION_HISTORY,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'lab.png'),

Loading…
Cancel
Save