Merge branch 'improve_code_stander' into 'development'

Improve code stander

See merge request Cloud_Solution/doctor_app_flutter!944
merge-requests/945/merge
Elham Ali 4 years ago
commit b70ccf66be

@ -32,18 +32,27 @@ class UpdatePage extends StatelessWidget {
children: [
Image.asset(
'assets/images/update_rocket_image.png',
width: double.maxFinite,fit: BoxFit.fill,
width: double.maxFinite,
fit: BoxFit.fill,
),
Image.asset('assets/images/HMG_logo.png'),
SizedBox(height: 8,),
SizedBox(
height: 8,
),
AppText(
TranslationBase.of(context).updateTheApp.toUpperCase(),fontSize: 17,
TranslationBase.of(context).updateTheApp.toUpperCase(),
fontSize: 17,
fontWeight: FontWeight.w600,
),
SizedBox(height: 12,),
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(message??"Update the app",fontSize: 12,),
child: AppText(
message ?? "Update the app",
fontSize: 12,
),
)
],
),

@ -110,7 +110,11 @@ class BaseAppClient {
var asd2;
if (await Helpers.checkConnection()) {
final response = await http.post(Uri.parse(url),
body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
body: json.encode(body),
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
});
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) {
onFailure(Helpers.generateContactAdminMsg(), statusCode);
@ -234,7 +238,8 @@ class BaseAppClient {
var asd = json.encode(body);
var asd2;
if (await Helpers.checkConnection()) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
final response = await http.post(Uri.parse(url.trim()),
body: json.encode(body), headers: headers);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {

@ -21,6 +21,7 @@ class SizeConfig {
static bool isHeightMiddle = false;
static bool isHeightLarge = false;
static bool isWidthLarge = false;
void init(BoxConstraints constraints, Orientation orientation) {
realScreenHeight = constraints.maxHeight;
realScreenWidth = constraints.maxWidth;

@ -1,4 +1,4 @@
enum CalenderType{
enum CalenderType {
Gregorian,
Hijri,
}
}

@ -1,4 +1,4 @@
enum PatientType{
enum PatientType {
IN_PATIENT,
OUT_PATIENT,
}
}

@ -1,4 +1,5 @@
enum AuthMethodTypes { SMS, WhatsApp, Fingerprint,FaceID,MoreOptions }
enum AuthMethodTypes { SMS, WhatsApp, Fingerprint, FaceID, MoreOptions }
extension SelectedAuthMethodTypesService on AuthMethodTypes {
// ignore: missing_return
int getTypeIdService() {
@ -18,12 +19,11 @@ extension SelectedAuthMethodTypesService on AuthMethodTypes {
case AuthMethodTypes.MoreOptions:
return 5;
break;
}
}
// ignore: missing_return
static getMethodsTypeService( int typeId) {
static getMethodsTypeService(int typeId) {
switch (typeId) {
case 1:
return AuthMethodTypes.SMS;
@ -40,7 +40,6 @@ extension SelectedAuthMethodTypesService on AuthMethodTypes {
case 5:
return AuthMethodTypes.MoreOptions;
break;
}
}
}
}

@ -1,6 +1,3 @@
enum FilterType { Clinic, Hospital }
enum OutPatientFilterType { Previous, Today, NextWeek }

@ -19,7 +19,6 @@ enum MasterKeysService {
MedicationFrequency,
MedicationDoseTime,
MedicationIndications,
AdmissionRequestType,
DiagnosisSelectionType,
}

@ -1,2 +1 @@
enum PatientType { inPatient, OutPatient }

@ -27,30 +27,30 @@ class CheckActivationCodeModel {
CheckActivationCodeModel(
{this.patientMobileNumber,
this.mobileNo,
this.projectOutSA,
this.loginType,
this.zipCode,
this.isRegister,
this.logInTokenID,
this.searchType,
this.patientID,
this.nationalID,
this.patientIdentificationID,
this.forRegisteration,
this.activationCode,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.dOB,
this.isHijri,
this.healthId});
this.mobileNo,
this.projectOutSA,
this.loginType,
this.zipCode,
this.isRegister,
this.logInTokenID,
this.searchType,
this.patientID,
this.nationalID,
this.patientIdentificationID,
this.forRegisteration,
this.activationCode,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.dOB,
this.isHijri,
this.healthId});
CheckActivationCodeModel.fromJson(Map<String, dynamic> json) {
patientMobileNumber = json['PatientMobileNumber'];

@ -19,22 +19,22 @@ class CheckPatientForRegistrationModel {
CheckPatientForRegistrationModel(
{this.patientIdentificationID,
this.patientMobileNumber,
this.zipCode,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.tokenID,
this.patientID,
this.isRegister,
this.dOB,
this.isHijri});
this.patientMobileNumber,
this.zipCode,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.tokenID,
this.patientID,
this.isRegister,
this.dOB,
this.isHijri});
CheckPatientForRegistrationModel.fromJson(Map<String, dynamic> json) {
patientIdentificationID = json['PatientIdentificationID'];

@ -14,17 +14,17 @@ class GetPatientInfoRequestModel {
GetPatientInfoRequestModel(
{this.patientIdentificationID,
this.dOB,
this.isHijri,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
this.dOB,
this.isHijri,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
GetPatientInfoRequestModel.fromJson(Map<String, dynamic> json) {
patientIdentificationID = json['PatientIdentificationID'];

@ -90,93 +90,93 @@ class GetPatientInfoResponseModel {
GetPatientInfoResponseModel(
{this.date,
this.languageID,
this.serviceName,
this.time,
this.androidLink,
this.authenticationTokenID,
this.data,
this.dataw,
this.dietType,
this.errorCode,
this.errorEndUserMessage,
this.errorEndUserMessageN,
this.errorMessage,
this.errorType,
this.foodCategory,
this.iOSLink,
this.isAuthenticated,
this.mealOrderStatus,
this.mealType,
this.messageStatus,
this.numberOfResultRecords,
this.patientBlodType,
this.successMsg,
this.successMsgN,
this.vidaUpdatedResponse,
this.accessTokenObject,
this.age,
this.clientIdentifierId,
this.createdBy,
this.dateOfBirth,
this.firstNameAr,
this.firstNameEn,
this.gender,
this.genderAr,
this.genderEn,
this.healthId,
this.idNumber,
this.idType,
this.isHijri,
this.isInstertedOrUpdated,
this.isNull,
this.isPatientExistNHIC,
this.isRecordLockedByCurrentUser,
this.lastNameAr,
this.lastNameEn,
this.listActiveAccessToken,
this.maritalStatus,
this.maritalStatusCode,
this.nationalDateOfBirth,
this.nationality,
this.nationalityCode,
this.occupation,
this.pCDTransactionDataResultList,
this.pCDGetVidaPatientForManualVerificationList,
this.pCDNHICHMGPatientDetailsMatchCalulationList,
this.pCDReturnValue,
this.patientStatus,
this.placeofBirth,
this.practitionerStatusCode,
this.practitionerStatusDescAr,
this.practitionerStatusDescEn,
this.rowCount,
this.secondNameAr,
this.secondNameEn,
this.thirdNameAr,
this.thirdNameEn,
this.yakeenVidaPatientDataStatisticsByPatientIdList,
this.yakeenVidaPatientDataStatisticsList,
this.yakeenVidaPatientDataStatisticsPrefferedList,
this.accessToken,
this.categoryCode,
this.categoryNameAr,
this.categoryNameEn,
this.constraintCode,
this.constraintNameAr,
this.constraintNameEn,
this.content,
this.errorList,
this.licenseExpiryDate,
this.licenseIssuedDate,
this.licenseStatusCode,
this.licenseStatusDescAr,
this.licenseStatusDescEn,
this.organizations,
this.registrationNumber,
this.specialtyCode,
this.specialtyNameAr,
this.specialtyNameEn});
this.languageID,
this.serviceName,
this.time,
this.androidLink,
this.authenticationTokenID,
this.data,
this.dataw,
this.dietType,
this.errorCode,
this.errorEndUserMessage,
this.errorEndUserMessageN,
this.errorMessage,
this.errorType,
this.foodCategory,
this.iOSLink,
this.isAuthenticated,
this.mealOrderStatus,
this.mealType,
this.messageStatus,
this.numberOfResultRecords,
this.patientBlodType,
this.successMsg,
this.successMsgN,
this.vidaUpdatedResponse,
this.accessTokenObject,
this.age,
this.clientIdentifierId,
this.createdBy,
this.dateOfBirth,
this.firstNameAr,
this.firstNameEn,
this.gender,
this.genderAr,
this.genderEn,
this.healthId,
this.idNumber,
this.idType,
this.isHijri,
this.isInstertedOrUpdated,
this.isNull,
this.isPatientExistNHIC,
this.isRecordLockedByCurrentUser,
this.lastNameAr,
this.lastNameEn,
this.listActiveAccessToken,
this.maritalStatus,
this.maritalStatusCode,
this.nationalDateOfBirth,
this.nationality,
this.nationalityCode,
this.occupation,
this.pCDTransactionDataResultList,
this.pCDGetVidaPatientForManualVerificationList,
this.pCDNHICHMGPatientDetailsMatchCalulationList,
this.pCDReturnValue,
this.patientStatus,
this.placeofBirth,
this.practitionerStatusCode,
this.practitionerStatusDescAr,
this.practitionerStatusDescEn,
this.rowCount,
this.secondNameAr,
this.secondNameEn,
this.thirdNameAr,
this.thirdNameEn,
this.yakeenVidaPatientDataStatisticsByPatientIdList,
this.yakeenVidaPatientDataStatisticsList,
this.yakeenVidaPatientDataStatisticsPrefferedList,
this.accessToken,
this.categoryCode,
this.categoryNameAr,
this.categoryNameEn,
this.constraintCode,
this.constraintNameAr,
this.constraintNameEn,
this.content,
this.errorList,
this.licenseExpiryDate,
this.licenseIssuedDate,
this.licenseStatusCode,
this.licenseStatusDescAr,
this.licenseStatusDescEn,
this.organizations,
this.registrationNumber,
this.specialtyCode,
this.specialtyNameAr,
this.specialtyNameEn});
GetPatientInfoResponseModel.fromJson(Map<String, dynamic> json) {
date = json['Date'];
@ -233,9 +233,9 @@ class GetPatientInfoResponseModel {
occupation = json['Occupation'];
pCDTransactionDataResultList = json['PCDTransactionDataResultList'];
pCDGetVidaPatientForManualVerificationList =
json['PCD_GetVidaPatientForManualVerificationList'];
json['PCD_GetVidaPatientForManualVerificationList'];
pCDNHICHMGPatientDetailsMatchCalulationList =
json['PCD_NHIC_HMG_PatientDetailsMatchCalulationList'];
json['PCD_NHIC_HMG_PatientDetailsMatchCalulationList'];
pCDReturnValue = json['PCD_ReturnValue'];
patientStatus = json['PatientStatus'];
placeofBirth = json['PlaceofBirth'];
@ -248,11 +248,11 @@ class GetPatientInfoResponseModel {
thirdNameAr = json['ThirdNameAr'];
thirdNameEn = json['ThirdNameEn'];
yakeenVidaPatientDataStatisticsByPatientIdList =
json['YakeenVidaPatientDataStatisticsByPatientIdList'];
json['YakeenVidaPatientDataStatisticsByPatientIdList'];
yakeenVidaPatientDataStatisticsList =
json['YakeenVidaPatientDataStatisticsList'];
json['YakeenVidaPatientDataStatisticsList'];
yakeenVidaPatientDataStatisticsPrefferedList =
json['YakeenVidaPatientDataStatisticsPrefferedList'];
json['YakeenVidaPatientDataStatisticsPrefferedList'];
accessToken = json['accessToken'];
categoryCode = json['categoryCode'];
categoryNameAr = json['categoryNameAr'];

@ -20,23 +20,23 @@ class PatientRegistrationModel {
PatientRegistrationModel(
{this.patientobject,
this.patientIdentificationID,
this.patientMobileNumber,
this.logInTokenID,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.tokenID,
this.dOB,
this.isHijri,
this.healthId,
this.zipCode});
this.patientIdentificationID,
this.patientMobileNumber,
this.logInTokenID,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.tokenID,
this.dOB,
this.isHijri,
this.healthId,
this.zipCode});
PatientRegistrationModel.fromJson(Map<String, dynamic> json) {
patientobject = json['Patientobject'] != null
@ -112,26 +112,26 @@ class Patientobject {
Patientobject(
{this.tempValue,
this.patientIdentificationType,
this.patientIdentificationNo,
this.mobileNumber,
this.patientOutSA,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.firstName,
this.middleName,
this.lastName,
this.strDateofBirth,
this.dateofBirth,
this.gender,
this.nationalityID,
this.dateofBirthN,
this.emailAddress,
this.sourceType,
this.preferredLanguage,
this.marital,
this.eHealthIDField});
this.patientIdentificationType,
this.patientIdentificationNo,
this.mobileNumber,
this.patientOutSA,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.firstName,
this.middleName,
this.lastName,
this.strDateofBirth,
this.dateofBirth,
this.gender,
this.nationalityID,
this.dateofBirthN,
this.emailAddress,
this.sourceType,
this.preferredLanguage,
this.marital,
this.eHealthIDField});
Patientobject.fromJson(Map<String, dynamic> json) {
tempValue = json['TempValue'];

@ -26,29 +26,29 @@ class SendActivationCodeByOTPNotificationTypeForRegistrationModel {
SendActivationCodeByOTPNotificationTypeForRegistrationModel(
{this.patientMobileNumber,
this.mobileNo,
this.projectOutSA,
this.loginType,
this.zipCode,
this.isRegister,
this.logInTokenID,
this.searchType,
this.patientID,
this.nationalID,
this.patientIdentificationID,
this.oTPSendType,
this.languageID,
this.versionID,
this.channel,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.dOB,
this.isHijri,
this.healthId});
this.mobileNo,
this.projectOutSA,
this.loginType,
this.zipCode,
this.isRegister,
this.logInTokenID,
this.searchType,
this.patientID,
this.nationalID,
this.patientIdentificationID,
this.oTPSendType,
this.languageID,
this.versionID,
this.channel,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.dOB,
this.isHijri,
this.healthId});
SendActivationCodeByOTPNotificationTypeForRegistrationModel.fromJson(
Map<String, dynamic> json) {

@ -69,7 +69,8 @@ class Prescriptions {
this.nationalityFlagURL,
this.noOfPatientsRate,
this.qR,
this.speciality,this.isLiveCareAppointment});
this.speciality,
this.isLiveCareAppointment});
Prescriptions.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
@ -105,7 +106,7 @@ class Prescriptions {
noOfPatientsRate = json['NoOfPatientsRate'];
qR = json['QR'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
// speciality = json['Speciality'].cast<String>();
// speciality = json['Speciality'].cast<String>();
}
Map<String, dynamic> toJson() {

@ -26,29 +26,29 @@ class PharmacyPrescriptions {
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});
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'];

@ -61,6 +61,7 @@ class EntityList {
dynamic pharmacyInervention;
dynamic refill;
dynamic mediSpanGPICode;
EntityList(
{this.appointmentNo,
this.clinicName,

@ -35,38 +35,38 @@ class PrescriptionReportEnh {
PrescriptionReportEnh(
{this.address,
this.appodynamicmentNo,
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.appodynamicmentNo,
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'];

@ -34,35 +34,35 @@ class PrescriptionsOrder {
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});
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'];

@ -14,17 +14,17 @@ class RequestGetListPharmacyForPrescriptions {
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});
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'];

@ -21,24 +21,24 @@ class RequestPrescriptionReport {
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});
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'];

@ -21,23 +21,24 @@ class RequestPrescriptionReportEnh {
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});
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'];

@ -7,10 +7,10 @@ class Clinic {
Clinic(
{this.clinicGroupID,
this.clinicGroupName,
this.clinicID,
this.clinicNameArabic,
this.clinicNameEnglish});
this.clinicGroupName,
this.clinicID,
this.clinicNameArabic,
this.clinicNameEnglish});
Clinic.fromJson(Map<String, dynamic> json) {
clinicGroupID = json['clinicGroupID'];
@ -29,5 +29,4 @@ class Clinic {
data['clinicNameEnglish'] = this.clinicNameEnglish;
return data;
}
}
}

@ -1,12 +1,10 @@
class WardModel{
class WardModel {
String description;
String descriptionN;
int floorID;
bool isActive;
WardModel(
{this.description, this.descriptionN, this.floorID, this.isActive});
WardModel({this.description, this.descriptionN, this.floorID, this.isActive});
WardModel.fromJson(Map<String, dynamic> json) {
description = json['description'];
@ -23,4 +21,4 @@ class WardModel{
data['isActive'] = this.isActive;
return data;
}
}
}

@ -15,7 +15,8 @@ class ActivationCodeModel {
this.memberID,
this.facilityId,
this.otpSendType,
this.generalid,this.loginDoctorID});
this.generalid,
this.loginDoctorID});
ActivationCodeModel.fromJson(Map<String, dynamic> json) {
channel = json['Channel'];

@ -13,6 +13,7 @@ class ActivationCodeForVerificationScreenModel {
String vidaAuthTokenID;
String vidaRefreshTokenID;
String iMEI;
ActivationCodeForVerificationScreenModel(
{this.oTPSendType,
this.mobileNumber,
@ -26,7 +27,8 @@ class ActivationCodeForVerificationScreenModel {
this.isMobileFingerPrint,
this.vidaAuthTokenID,
this.vidaRefreshTokenID,
this.iMEI,this.loginDoctorID});
this.iMEI,
this.loginDoctorID});
ActivationCodeForVerificationScreenModel.fromJson(Map<String, dynamic> json) {
oTPSendType = json['OTP_SendType'];

@ -19,6 +19,7 @@ class CheckActivationCodeRequestModel {
String iMEI;
bool isForSilentLogin;
int oTPSendType;
CheckActivationCodeRequestModel(
{this.mobileNumber,
this.zipCode,
@ -33,7 +34,13 @@ class CheckActivationCodeRequestModel {
this.activationCode,
this.vidaAuthTokenID,
this.vidaRefreshTokenID,
this.oTPSendType,this.password,this.facilityId,this.memberID,this.isForSilentLogin=false,this.iMEI,this.loginDoctorID});
this.oTPSendType,
this.password,
this.facilityId,
this.memberID,
this.isForSilentLogin = false,
this.iMEI,
this.loginDoctorID});
CheckActivationCodeRequestModel.fromJson(Map<String, dynamic> json) {
mobileNumber = json['MobileNumber'];

@ -28,6 +28,7 @@ class GetIMEIDetailsModel {
String vidaAuthTokenID;
String vidaRefreshTokenID;
String password;
GetIMEIDetailsModel(
{this.iD,
this.iMEI,

@ -32,6 +32,7 @@ class InsertIMEIDetailsModel {
String vidaAuthTokenID;
String vidaRefreshTokenID;
dynamic password;
InsertIMEIDetailsModel(
{this.iMEI,
this.logInTypeID,

@ -11,14 +11,14 @@ class NewLoginInformationModel {
NewLoginInformationModel(
{this.doctorID,
this.listMemberInformation,
this.logInTokenID,
this.mobileNumber,
this.sELECTDeviceIMEIbyIMEIList,
this.userID,
this.zipCode,
this.isActiveCode,
this.isSMSSent});
this.listMemberInformation,
this.logInTokenID,
this.mobileNumber,
this.sELECTDeviceIMEIbyIMEIList,
this.userID,
this.zipCode,
this.isActiveCode,
this.isSMSSent});
NewLoginInformationModel.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID'];
@ -70,16 +70,16 @@ class ListMemberInformation {
ListMemberInformation(
{this.setupID,
this.memberID,
this.memberName,
this.memberNameN,
this.preferredLang,
this.pIN,
this.saltHash,
this.referenceID,
this.employeeID,
this.roleID,
this.projectid});
this.memberID,
this.memberName,
this.memberNameN,
this.preferredLang,
this.pIN,
this.saltHash,
this.referenceID,
this.employeeID,
this.roleID,
this.projectid});
ListMemberInformation.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];

@ -6,9 +6,9 @@ class SendActivationCodeForDoctorAppResponseModel {
SendActivationCodeForDoctorAppResponseModel(
{this.logInTokenID,
this.verificationCode,
this.vidaAuthTokenID,
this.vidaRefreshTokenID});
this.verificationCode,
this.vidaAuthTokenID,
this.vidaRefreshTokenID});
SendActivationCodeForDoctorAppResponseModel.fromJson(
Map<String, dynamic> json) {

@ -10,13 +10,13 @@ class GetDiabeticChartValuesRequestModel {
GetDiabeticChartValuesRequestModel(
{this.deviceTypeID,
this.patientID,
this.resultType,
this.admissionNo,
this.setupID,
this.patientOutSA,
this.patientType,
this.patientTypeID});
this.patientID,
this.resultType,
this.admissionNo,
this.setupID,
this.patientOutSA,
this.patientType,
this.patientTypeID});
GetDiabeticChartValuesRequestModel.fromJson(Map<String, dynamic> json) {
deviceTypeID = json['DeviceTypeID'];

@ -8,11 +8,11 @@ class GetDiabeticChartValuesResponseModel {
GetDiabeticChartValuesResponseModel(
{this.resultType,
this.admissionNo,
this.dateChart,
this.resultValue,
this.createdBy,
this.createdOn});
this.admissionNo,
this.dateChart,
this.resultValue,
this.createdBy,
this.createdOn});
GetDiabeticChartValuesResponseModel.fromJson(Map<String, dynamic> json) {
resultType = json['ResultType'];

@ -7,10 +7,10 @@ class GetDiagnosisForInPatientRequestModel {
GetDiagnosisForInPatientRequestModel(
{this.patientID,
this.admissionNo,
this.setupID,
this.patientType,
this.patientTypeID});
this.admissionNo,
this.setupID,
this.patientType,
this.patientTypeID});
GetDiagnosisForInPatientRequestModel.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];

@ -13,14 +13,15 @@ class GetDiagnosisForInPatientResponseModel {
GetDiagnosisForInPatientResponseModel(
{this.iCDCode10ID,
this.diagnosisTypeID,
this.conditionID,
this.complexDiagnosis,
this.asciiDesc,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn, this.createdByName});
this.diagnosisTypeID,
this.conditionID,
this.complexDiagnosis,
this.asciiDesc,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn,
this.createdByName});
GetDiagnosisForInPatientResponseModel.fromJson(Map<String, dynamic> json) {
iCDCode10ID = json['ICDCode10ID'];

@ -11,14 +11,14 @@ class GetHospitalsRequestModel {
GetHospitalsRequestModel(
{this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.memberID});
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.memberID});
GetHospitalsRequestModel.fromJson(Map<String, dynamic> json) {
languageID = json['LanguageID'];

@ -16,22 +16,23 @@ class HospitalsModel {
dynamic projectOutSA;
bool usingInDoctorApp;
HospitalsModel({this.desciption,
this.desciptionN,
this.iD,
this.legalName,
this.legalNameN,
this.name,
this.nameN,
this.phoneNumber,
this.setupID,
this.distanceInKilometers,
this.isActive,
this.latitude,
this.longitude,
this.mainProjectID,
this.projectOutSA,
this.usingInDoctorApp});
HospitalsModel(
{this.desciption,
this.desciptionN,
this.iD,
this.legalName,
this.legalNameN,
this.name,
this.nameN,
this.phoneNumber,
this.setupID,
this.distanceInKilometers,
this.isActive,
this.latitude,
this.longitude,
this.mainProjectID,
this.projectOutSA,
this.usingInDoctorApp});
HospitalsModel.fromJson(Map<String, dynamic> json) {
desciption = json['Desciption'];

@ -2,6 +2,7 @@ class ApporvalDetails {
int approvalNo;
String procedureName;
//String procedureNameN;
String status;

@ -21,24 +21,24 @@ class LabOrderResult {
LabOrderResult(
{this.description,
this.femaleInterpretativeData,
this.gender,
this.lineItemNo,
this.maleInterpretativeData,
this.notes,
this.packageID,
this.patientID,
this.projectID,
this.referanceRange,
this.resultValue,
this.sampleCollectedOn,
this.sampleReceivedOn,
this.setupID,
this.superVerifiedOn,
this.testCode,
this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
this.femaleInterpretativeData,
this.gender,
this.lineItemNo,
this.maleInterpretativeData,
this.notes,
this.packageID,
this.patientID,
this.projectID,
this.referanceRange,
this.resultValue,
this.sampleCollectedOn,
this.sampleReceivedOn,
this.setupID,
this.superVerifiedOn,
this.testCode,
this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
LabOrderResult.fromJson(Map<String, dynamic> json) {
description = json['Description'];

@ -26,29 +26,29 @@ class LabResultHistory {
LabResultHistory(
{this.description,
this.femaleInterpretativeData,
this.gender,
this.isCertificateAllowed,
this.lineItemNo,
this.maleInterpretativeData,
this.notes,
this.orderLineItemNo,
this.orderNo,
this.packageID,
this.patientID,
this.projectID,
this.referanceRange,
this.resultValue,
this.resultValueBasedLineItemNo,
this.resultValueFlag,
this.sampleCollectedOn,
this.sampleReceivedOn,
this.setupID,
this.superVerifiedOn,
this.testCode,
this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
this.femaleInterpretativeData,
this.gender,
this.isCertificateAllowed,
this.lineItemNo,
this.maleInterpretativeData,
this.notes,
this.orderLineItemNo,
this.orderNo,
this.packageID,
this.patientID,
this.projectID,
this.referanceRange,
this.resultValue,
this.resultValueBasedLineItemNo,
this.resultValueFlag,
this.sampleCollectedOn,
this.sampleReceivedOn,
this.setupID,
this.superVerifiedOn,
this.testCode,
this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
LabResultHistory.fromJson(Map<String, dynamic> json) {
description = json['Description'];
@ -105,4 +105,4 @@ class LabResultHistory {
data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
return data;
}
}
}

@ -46,6 +46,7 @@ class AllSpecialLabResultModel {
String resultDataHTML;
dynamic resultDataTxt;
String setupID;
//List<String> speciality;
dynamic status;
dynamic statusDesc;

@ -110,10 +110,9 @@ class LabResult {
} else {
return 0;
}
}catch (e){
} catch (e) {
return 0;
}
}
}

@ -35,6 +35,7 @@ class PatientLabOrders {
String setupID;
List<String> speciality;
bool isLiveCareAppointment;
PatientLabOrders(
{this.actualDoctorRate,
this.clinicDescription,
@ -68,11 +69,12 @@ class PatientLabOrders {
this.projectNameN,
this.qR,
this.setupID,
this.speciality,this.isLiveCareAppointment});
this.speciality,
this.isLiveCareAppointment});
PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate'];
clinicDescription = json['ClinicDescription']?? json['ClinicName'];
clinicDescription = json['ClinicDescription'] ?? json['ClinicName'];
clinicDescriptionEnglish = json['ClinicDescriptionEnglish'];
clinicDescriptionN = json['ClinicDescriptionN'];
clinicID = json['ClinicID'];
@ -104,7 +106,7 @@ class PatientLabOrders {
qR = json['QR'];
setupID = json['SetupID'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
// speciality = json['Speciality'].cast<String>();
// speciality = json['Speciality'].cast<String>();
}
Map<String, dynamic> toJson() {

@ -7,10 +7,10 @@ class PatientLabSpecialResult {
PatientLabSpecialResult(
{this.invoiceNo,
this.moduleID,
this.resultData,
this.resultDataHTML,
this.resultDataTxt});
this.moduleID,
this.resultData,
this.resultDataHTML,
this.resultDataTxt});
PatientLabSpecialResult.fromJson(Map<String, dynamic> json) {
invoiceNo = json['InvoiceNo'];

@ -15,18 +15,18 @@ class RequestPatientLabOrders {
RequestPatientLabOrders(
{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.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
RequestPatientLabOrders.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];

@ -20,23 +20,23 @@ class RequestPatientLabSpecialResult {
RequestPatientLabSpecialResult(
{this.invoiceNo,
this.orderNo,
this.setupID,
this.projectID,
this.clinicID,
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.orderNo,
this.setupID,
this.projectID,
this.clinicID,
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});
RequestPatientLabSpecialResult.fromJson(Map<String, dynamic> json) {
invoiceNo = json['InvoiceNo'];

@ -27,30 +27,30 @@ class RequestSendLabReportEmail {
RequestSendLabReportEmail(
{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.to,
this.dateofBirth,
this.patientIditificationNum,
this.patientMobileNumber,
this.patientName,
this.setupID,
this.projectName,
this.clinicName,
this.doctorName,
this.projectID,
this.invoiceNo,
this.orderDate});
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.to,
this.dateofBirth,
this.patientIditificationNum,
this.patientMobileNumber,
this.patientName,
this.setupID,
this.projectName,
this.clinicName,
this.doctorName,
this.projectID,
this.invoiceNo,
this.orderDate});
RequestSendLabReportEmail.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];

@ -25,7 +25,7 @@ class AlternativeService {
class AlternativeServicesList with ChangeNotifier {
List<AlternativeService> _alternativeServicesList;
getServicesList(){
getServicesList() {
return _alternativeServicesList;
}
@ -35,7 +35,9 @@ class AlternativeServicesList with ChangeNotifier {
}
setSelected(AlternativeService service, bool isSelected) {
List<AlternativeService> alternativeService = _alternativeServicesList.where((element) => service.serviceID == element.serviceID).toList();
List<AlternativeService> alternativeService = _alternativeServicesList
.where((element) => service.serviceID == element.serviceID)
.toList();
alternativeService[0].isSelected = isSelected;
notifyListeners();

@ -5,7 +5,8 @@ class AddPatientToDoctorListRequestModel {
int doctorId;
bool isOutKsa;
AddPatientToDoctorListRequestModel({this.vCID, this.tokenID, this.generalid, this.doctorId, this.isOutKsa});
AddPatientToDoctorListRequestModel(
{this.vCID, this.tokenID, this.generalid, this.doctorId, this.isOutKsa});
AddPatientToDoctorListRequestModel.fromJson(Map<String, dynamic> json) {
vCID = json['VC_ID'];

@ -5,7 +5,12 @@ class LiveCareUserLoginRequestModel {
int isOutKsa;
int isLogin;
LiveCareUserLoginRequestModel({this.tokenID, this.generalid, this.doctorId, this.isOutKsa, this.isLogin});
LiveCareUserLoginRequestModel(
{this.tokenID,
this.generalid,
this.doctorId,
this.isOutKsa,
this.isLogin});
LiveCareUserLoginRequestModel.fromJson(Map<String, dynamic> json) {
tokenID = json['TokenID'];

@ -3,7 +3,8 @@ class MedicalFileRequestModel {
String vidaAuthTokenID;
String iPAdress;
MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID,this.iPAdress});
MedicalFileRequestModel(
{this.patientMRN, this.vidaAuthTokenID, this.iPAdress});
MedicalFileRequestModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];

@ -21,24 +21,24 @@ class CreateNoteModel {
CreateNoteModel(
{this.visitType,
this.admissionNo,
this.projectID,
this.patientTypeID,
this.patientID,
this.clinicID,
this.notes,
this.createdBy,
this.editedBy,
this.nursingRemarks,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA});
this.admissionNo,
this.projectID,
this.patientTypeID,
this.patientID,
this.clinicID,
this.notes,
this.createdBy,
this.editedBy,
this.nursingRemarks,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA});
CreateNoteModel.fromJson(Map<String, dynamic> json) {
visitType = json['VisitType'];

@ -1,5 +1,3 @@
import 'package:doctor_app_flutter/config/config.dart';
class GetNursingProgressNoteRequestModel {
int patientID;
int admissionNo;
@ -8,7 +6,11 @@ class GetNursingProgressNoteRequestModel {
String setupID;
GetNursingProgressNoteRequestModel(
{this.patientID, this.admissionNo, this.patientTypeID = 1, this.patientType = 1, this.setupID });
{this.patientID,
this.admissionNo,
this.patientTypeID = 1,
this.patientType = 1,
this.setupID});
GetNursingProgressNoteRequestModel.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];

@ -22,25 +22,25 @@ class NoteModel {
NoteModel(
{this.setupID,
this.projectID,
this.patientID,
this.patientType,
this.admissionNo,
this.lineItemNo,
this.visitType,
this.notes,
this.assessmentDate,
this.visitTime,
this.status,
this.nursingRemarks,
this.createdOn,
this.editedOn,
this.createdBy,
this.admissionClinicID,
this.admissionClinicName,
this.doctorClinicName,
this.doctorName,
this.visitTypeDesc});
this.projectID,
this.patientID,
this.patientType,
this.admissionNo,
this.lineItemNo,
this.visitType,
this.notes,
this.assessmentDate,
this.visitTime,
this.status,
this.nursingRemarks,
this.createdOn,
this.editedOn,
this.createdBy,
this.admissionClinicID,
this.admissionClinicName,
this.doctorClinicName,
this.doctorName,
this.visitTypeDesc});
NoteModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];

@ -19,22 +19,22 @@ class UpdateNoteReqModel {
UpdateNoteReqModel(
{this.projectID,
this.createdBy,
this.admissionNo,
this.lineItemNo,
this.notes,
this.verifiedNote,
this.cancelledNote,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA,
this.patientTypeID});
this.createdBy,
this.admissionNo,
this.lineItemNo,
this.notes,
this.verifiedNote,
this.cancelledNote,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA,
this.patientTypeID});
UpdateNoteReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];

@ -42,7 +42,8 @@ class PatientMuseResultsModel {
imageURL = json['ImageURL'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
createdOnDateTime = AppDateUtils.getDateTimeFromServerFormat(json['CreatedOn']);
createdOnDateTime =
AppDateUtils.getDateTimeFromServerFormat(json['CreatedOn']);
}
Map<String, dynamic> toJson() {

@ -3,7 +3,8 @@ class GetOrderedProcedureRequestModel {
int patientMRN;
int appointmentNo;
GetOrderedProcedureRequestModel({this.vidaAuthTokenID, this.patientMRN, this.appointmentNo});
GetOrderedProcedureRequestModel(
{this.vidaAuthTokenID, this.patientMRN, this.appointmentNo});
GetOrderedProcedureRequestModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID'];

@ -104,13 +104,16 @@ class ProcedureTempleteDetailsModel {
return data;
}
}
class ProcedureTempleteDetailsModelList {
List<ProcedureTempleteDetailsModel> procedureTemplate = List();
String templateName;
int templateId;
ProcedureTempleteDetailsModelList(
{this.templateName, this.templateId, ProcedureTempleteDetailsModel template}) {
{this.templateName,
this.templateId,
ProcedureTempleteDetailsModel template}) {
procedureTemplate.add(template);
}
}

@ -85,7 +85,8 @@ class FinalRadiology {
this.reportDataTextdynamic,
this.speciality,
this.isCVI,
this.isRadMedicalReport,this.isLiveCareAppodynamicment});
this.isRadMedicalReport,
this.isLiveCareAppodynamicment});
FinalRadiology.fromJson(Map<dynamic, dynamic> json) {
try {
@ -108,7 +109,7 @@ class FinalRadiology {
admissionNo = json['AdmissionNo'];
isInOutPatient = json['IsInOutPatient'];
actualDoctorRate = json['ActualDoctorRate'];
clinicDescription = json['ClinicDescription']?? json['ClinicName'];
clinicDescription = json['ClinicDescription'] ?? json['ClinicName'];
dIAPACSURL = json['DIA_PACS_URL'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
@ -128,13 +129,11 @@ class FinalRadiology {
isLiveCareAppodynamicment = json['IsLiveCareAppointment'];
reportDataHTML = json['ReportDataHTML'];
reportDataTextdynamic = json['ReportDataTextdynamic'];
// speciality = json['Speciality'].cast<dynamic>();
// speciality = json['Speciality'].cast<dynamic>();
isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport'];
} catch (e) {
print(e);
}
}

@ -22,25 +22,25 @@ class RequestPatientRadOrdersDetails {
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});
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'];

@ -28,31 +28,31 @@ class RequestSendRadReportEmail {
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});
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'];

@ -55,56 +55,56 @@ class DischargeReferralPatient {
DischargeReferralPatient(
{this.rowID,
this.projectID,
this.lineItemNo,
this.doctorID,
this.patientID,
this.doctorName,
this.doctorNameN,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.gender,
this.dateofBirth,
this.mobileNumber,
this.emailAddress,
this.patientIdentificationNo,
this.patientType,
this.admissionNo,
this.admissionDate,
this.roomID,
this.bedID,
this.nursingStationID,
this.description,
this.nationalityName,
this.nationalityNameN,
this.referralDoctor,
this.referringDoctor,
this.referralClinic,
this.referringClinic,
this.referralStatus,
this.referralDate,
this.referringDoctorRemarks,
this.referredDoctorRemarks,
this.referralResponseOn,
this.priority,
this.frequency,
this.mAXResponseTime,
this.dischargeDate,
this.clinicID,
this.age,
this.clinicDescription,
this.frequencyDescription,
this.genderDescription,
this.isDoctorLate,
this.isDoctorResponse,
this.nursingStationName,
this.priorityDescription,
this.referringClinicDescription,
this.referringDoctorName});
this.projectID,
this.lineItemNo,
this.doctorID,
this.patientID,
this.doctorName,
this.doctorNameN,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.gender,
this.dateofBirth,
this.mobileNumber,
this.emailAddress,
this.patientIdentificationNo,
this.patientType,
this.admissionNo,
this.admissionDate,
this.roomID,
this.bedID,
this.nursingStationID,
this.description,
this.nationalityName,
this.nationalityNameN,
this.referralDoctor,
this.referringDoctor,
this.referralClinic,
this.referringClinic,
this.referralStatus,
this.referralDate,
this.referringDoctorRemarks,
this.referredDoctorRemarks,
this.referralResponseOn,
this.priority,
this.frequency,
this.mAXResponseTime,
this.dischargeDate,
this.clinicID,
this.age,
this.clinicDescription,
this.frequencyDescription,
this.genderDescription,
this.isDoctorLate,
this.isDoctorResponse,
this.nursingStationName,
this.priorityDescription,
this.referringClinicDescription,
this.referringDoctorName});
DischargeReferralPatient.fromJson(Map<String, dynamic> json) {
rowID = json['RowID'];

@ -113,27 +113,36 @@ class MyReferralPatientModel {
this.referralResponseOn,
this.priority,
this.frequency,
this.mAXResponseTime,
this.episodeID,
this.appointmentNo,
this.appointmentDate,
this.appointmentType,
this.patientMRN,
this.createdOn,
this.clinicID,
this.nationalityID,
this.age,
this.doctorImageURL,
this.frequencyDescription,
this.genderDescription,
this.isDoctorLate,
this.isDoctorResponse,
this.nationalityFlagURL,
this.nursingStationName,
this.priorityDescription,
this.referringClinicDescription,
this.referringDoctorName,
this.referalStatus, this.sourceSetupID, this.sourceAppointmentNo, this.sourceProjectId, this.targetProjectId, this.targetAppointmentNo, this.targetClinicID, this.targetSetupID, this.targetDoctorID, this.remarksFromSource});
this.mAXResponseTime,
this.episodeID,
this.appointmentNo,
this.appointmentDate,
this.appointmentType,
this.patientMRN,
this.createdOn,
this.clinicID,
this.nationalityID,
this.age,
this.doctorImageURL,
this.frequencyDescription,
this.genderDescription,
this.isDoctorLate,
this.isDoctorResponse,
this.nationalityFlagURL,
this.nursingStationName,
this.priorityDescription,
this.referringClinicDescription,
this.referringDoctorName,
this.referalStatus,
this.sourceSetupID,
this.sourceAppointmentNo,
this.sourceProjectId,
this.targetProjectId,
this.targetAppointmentNo,
this.targetClinicID,
this.targetSetupID,
this.targetDoctorID,
this.remarksFromSource});
MyReferralPatientModel.fromJson(Map<String, dynamic> json) {
rowID = json['RowID'];
@ -219,7 +228,6 @@ class MyReferralPatientModel {
sourceAppointmentNo = json['SourceAppointmentNo'];
targetAppointmentNo = json['TargetAppointmentNo'];
remarksFromSource = json['RemarksFromSource'];
}
Map<String, dynamic> toJson() {

@ -25,28 +25,28 @@ class MyReferralPatientRequestModel {
MyReferralPatientRequestModel(
{this.channel,
this.clinicID,
this.doctorID,
this.editedBy,
this.firstName,
this.from,
this.iPAdress,
this.isLoginForDoctorApp,
this.languageID,
this.lastName,
this.middleName,
this.patientID,
this.patientIdentificationID,
this.patientMobileNumber,
this.patientOutSA,
this.patientTypeID,
this.projectID,
this.sessionID,
this.stamp,
this.to,
this.tokenID,
this.versionID,
this.vidaAuthTokenID});
this.clinicID,
this.doctorID,
this.editedBy,
this.firstName,
this.from,
this.iPAdress,
this.isLoginForDoctorApp,
this.languageID,
this.lastName,
this.middleName,
this.patientID,
this.patientIdentificationID,
this.patientMobileNumber,
this.patientOutSA,
this.patientTypeID,
this.projectID,
this.sessionID,
this.stamp,
this.to,
this.tokenID,
this.versionID,
this.vidaAuthTokenID});
MyReferralPatientRequestModel.fromJson(Map<String, dynamic> json) {
channel = json['Channel'];

@ -26,29 +26,29 @@ class ReferralRequest {
ReferralRequest(
{this.roomID,
this.referralClinic,
this.referralDoctor,
this.createdBy,
this.editedBy,
this.patientID,
this.patientTypeID,
this.referringClinic,
this.referringDoctor,
this.projectID,
this.admissionNo,
this.referringDoctorRemarks,
this.priority,
this.frequency,
this.extension,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA});
this.referralClinic,
this.referralDoctor,
this.createdBy,
this.editedBy,
this.patientID,
this.patientTypeID,
this.referringClinic,
this.referringDoctor,
this.projectID,
this.admissionNo,
this.referringDoctorRemarks,
this.priority,
this.frequency,
this.extension,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA});
ReferralRequest.fromJson(Map<String, dynamic> json) {
roomID = json['RoomID'];

@ -8,6 +8,7 @@ class GetMedicationResponseModel {
dynamic mediSpanGPICode;
bool isNarcotic;
String uom;
GetMedicationResponseModel(
{this.description,
this.genericName,

@ -1,5 +1,6 @@
class SearchDrugRequestModel {
List<String> search;
// String vidaAuthTokenID;
SearchDrugRequestModel({this.search});

@ -6,7 +6,11 @@ class GetSickLeaveDoctorRequestModel {
String vidaRefreshTokenID;
GetSickLeaveDoctorRequestModel(
{this.patientMRN, this.appointmentNo, this.status, this.vidaAuthTokenID, this.vidaRefreshTokenID});
{this.patientMRN,
this.appointmentNo,
this.status,
this.vidaAuthTokenID,
this.vidaRefreshTokenID});
GetSickLeaveDoctorRequestModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];

@ -1,5 +1,3 @@
import 'package:doctor_app_flutter/widgets/shared/StarRating.dart';
class SickLeavePatientModel {
dynamic setupID;
dynamic projectID;
@ -32,6 +30,7 @@ class SickLeavePatientModel {
dynamic patientName;
dynamic projectName;
dynamic qR;
// List<String> speciality;
dynamic strRequestDate;
dynamic startDate;

@ -8,6 +8,7 @@ class RobotProvider {
getData() {
// return data;
}
intStream() {
controller.add({});
}

@ -5,9 +5,11 @@ import 'package:flutter/cupertino.dart';
class AnalyticsService {
final FirebaseAnalytics _analytics = FirebaseAnalytics();
FirebaseAnalyticsObserver getAnalyticsObserver() => FirebaseAnalyticsObserver(analytics: _analytics);
FirebaseAnalyticsObserver getAnalyticsObserver() =>
FirebaseAnalyticsObserver(analytics: _analytics);
Future logEvent({@required String eventCategory, @required String eventAction}) async {
Future logEvent(
{@required String eventCategory, @required String eventAction}) async {
await _analytics.logEvent(name: 'event', parameters: {
"eventCategory": eventCategory,
"eventAction": eventAction,

@ -2,25 +2,28 @@ import 'package:flutter/material.dart';
class NavigationService {
final GlobalKey<NavigatorState> navigatorKey =
new GlobalKey<NavigatorState>();
Future<dynamic> navigateTo(String routeName,{Object arguments}) {
return navigatorKey.currentState.pushNamed(routeName,arguments: arguments);
}
new GlobalKey<NavigatorState>();
Future<dynamic> pushReplacementNamed(String routeName,{Object arguments}) {
return navigatorKey.currentState.pushReplacementNamed(routeName,arguments: arguments);
Future<dynamic> navigateTo(String routeName, {Object arguments}) {
return navigatorKey.currentState.pushNamed(routeName, arguments: arguments);
}
Future<dynamic> pushReplacementNamed(String routeName, {Object arguments}) {
return navigatorKey.currentState
.pushReplacementNamed(routeName, arguments: arguments);
}
Future<dynamic> pushNamedAndRemoveUntil(String routeName) {
return navigatorKey.currentState.pushNamedAndRemoveUntil(routeName,(asd)=>false);
return navigatorKey.currentState
.pushNamedAndRemoveUntil(routeName, (asd) => false);
}
Future<dynamic> pushAndRemoveUntil(Route newRoute) {
return navigatorKey.currentState.pushAndRemoveUntil(newRoute,(asd)=>false);
return navigatorKey.currentState
.pushAndRemoveUntil(newRoute, (asd) => false);
}
pop() {
pop() {
return navigatorKey.currentState.pop();
}
}
}

@ -63,7 +63,7 @@ class PatientRegistrationService extends BaseService {
isDentalAllowedBackend: false,
projectOutSA: 0,
searchType: 1,
versionID: 7.1,
versionID: 7.1,
channel: 3,
nationalID:
model.checkPatientForRegistrationModel.patientIdentificationID,
@ -74,8 +74,9 @@ class PatientRegistrationService extends BaseService {
logInTokenID: logInTokenID);
hasError = false;
await baseAppClient.post(SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient
.post(SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION,
onSuccess: (dynamic response, int statusCode) {
registrationModel =
SendActivationCodeByOTPNotificationTypeForRegistrationModel.fromJson(
response);

@ -22,17 +22,21 @@ class VideoCallService extends BaseService {
LiveCarePatientServices _liveCarePatientServices =
locator<LiveCarePatientServices>();
openVideo(StartCallRes startModel, PatiantInformtion patientModel,
bool isRecording,VoidCallback onCallConnected, VoidCallback onCallDisconnected) async {
openVideo(
StartCallRes startModel,
PatiantInformtion patientModel,
bool isRecording,
VoidCallback onCallConnected,
VoidCallback onCallDisconnected) async {
this.startCallRes = startModel;
this.patient = patientModel;
DoctorProfileModel doctorProfile =
await getDoctorProfile(isGetProfile: true);
await VideoChannel.openVideoCallScreen(
// TODO MOSA TEST
kToken: startCallRes.openTokenID,
kSessionId: startCallRes.openSessionID,
kApiKey:'46209962',
// TODO MOSA TEST
kToken: startCallRes.openTokenID,
kSessionId: startCallRes.openSessionID,
kApiKey: '46209962',
// kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGUyZjgxMjFlYTFkNzU5NjcxNDY2ZTM2ZjM3YTVhNTI2NGY0NTI2NzpzZXNzaW9uX2lkPTJfTVg0ME56STBOemsxTkg1LU1UWXlOVGN5TmpnMk5qZzNOMzQ1YUhCcGRtcDFXbVpDTDFkNE1qbDRkWFY2TTA4cmIySi1mZyZjcmVhdGVfdGltZT0xNjI1NzI2ODg5Jm5vbmNlPTAuNjc2Nzc4OTQxNjA1MTMxNSZyb2xlPXB1Ymxpc2hlciZleHBpcmVfdGltZT0xNjI4MzE4ODg4JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9",
// kSessionId: "2_MX40NzI0Nzk1NH5-MTYyNTcyNjg2Njg3N345aHBpdmp1WmZCL1d4Mjl4dXV6M08rb2J-fg",
// kApiKey:'47247954',
@ -57,7 +61,6 @@ class VideoCallService extends BaseService {
endCall(
patient.vcId,
false,
).then((value) {
GifLoaderDialogUtils.hideDialog(
locator<NavigationService>().navigatorKey.currentContext);

@ -14,26 +14,36 @@ import 'package:doctor_app_flutter/models/doctor/user_model.dart';
class AuthenticationService extends BaseService {
List<GetIMEIDetailsModel> _imeiDetails = [];
List<GetIMEIDetailsModel> get dashboardItemsList => _imeiDetails;
NewLoginInformationModel _loginInfo = NewLoginInformationModel();
NewLoginInformationModel get loginInfo => _loginInfo;
SendActivationCodeForDoctorAppResponseModel _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel();
SendActivationCodeForDoctorAppResponseModel get activationCodeVerificationScreenRes => _activationCodeVerificationScreenRes;
SendActivationCodeForDoctorAppResponseModel _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel();
SendActivationCodeForDoctorAppResponseModel get activationCodeForDoctorAppRes => _activationCodeForDoctorAppRes;
CheckActivationCodeForDoctorAppResponseModel _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel();
CheckActivationCodeForDoctorAppResponseModel get checkActivationCodeForDoctorAppRes => _checkActivationCodeForDoctorAppRes;
NewLoginInformationModel get loginInfo => _loginInfo;
SendActivationCodeForDoctorAppResponseModel
_activationCodeVerificationScreenRes =
SendActivationCodeForDoctorAppResponseModel();
SendActivationCodeForDoctorAppResponseModel
get activationCodeVerificationScreenRes =>
_activationCodeVerificationScreenRes;
SendActivationCodeForDoctorAppResponseModel _activationCodeForDoctorAppRes =
SendActivationCodeForDoctorAppResponseModel();
SendActivationCodeForDoctorAppResponseModel
get activationCodeForDoctorAppRes => _activationCodeForDoctorAppRes;
CheckActivationCodeForDoctorAppResponseModel
_checkActivationCodeForDoctorAppRes =
CheckActivationCodeForDoctorAppResponseModel();
CheckActivationCodeForDoctorAppResponseModel
get checkActivationCodeForDoctorAppRes =>
_checkActivationCodeForDoctorAppRes;
Map<String, dynamic> _insertDeviceImeiRes = {};
List<DoctorProfileModel> _doctorProfilesList = [];
List<DoctorProfileModel> get doctorProfilesList => _doctorProfilesList;
List<DoctorProfileModel> get doctorProfilesList => _doctorProfilesList;
Future selectDeviceImei(imei) async {
try {
@ -68,94 +78,99 @@ class AuthenticationService extends BaseService {
hasError = true;
super.error = error;
}
}
Future sendActivationCodeVerificationScreen(ActivationCodeForVerificationScreenModel activationCodeModel) async {
Future sendActivationCodeVerificationScreen(
ActivationCodeForVerificationScreenModel activationCodeModel) async {
hasError = false;
_activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel();
_activationCodeVerificationScreenRes =
SendActivationCodeForDoctorAppResponseModel();
try {
await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN,
onSuccess: (dynamic response, int statusCode) {
_activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: activationCodeModel.toJson());
_activationCodeVerificationScreenRes =
SendActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: activationCodeModel.toJson());
} catch (error) {
hasError = true;
super.error = error;
}
}
Future sendActivationCodeForDoctorApp(ActivationCodeModel activationCodeModel)async {
Future sendActivationCodeForDoctorApp(
ActivationCodeModel activationCodeModel) async {
hasError = false;
_activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel();
_activationCodeForDoctorAppRes =
SendActivationCodeForDoctorAppResponseModel();
try {
await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_DOCTOR_APP,
onSuccess: (dynamic response, int statusCode) {
_activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: activationCodeModel.toJson());
_activationCodeForDoctorAppRes =
SendActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: activationCodeModel.toJson());
} catch (error) {
hasError = true;
super.error = error;
}
}
Future checkActivationCodeForDoctorApp(CheckActivationCodeRequestModel checkActivationCodeRequestModel)async {
Future checkActivationCodeForDoctorApp(
CheckActivationCodeRequestModel checkActivationCodeRequestModel) async {
hasError = false;
_checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel();
_checkActivationCodeForDoctorAppRes =
CheckActivationCodeForDoctorAppResponseModel();
try {
await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP,
onSuccess: (dynamic response, int statusCode) {
_checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: checkActivationCodeRequestModel.toJson());
_checkActivationCodeForDoctorAppRes =
CheckActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: checkActivationCodeRequestModel.toJson());
} catch (error) {
hasError = true;
super.error = error;
}
}
Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel)async {
Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel) async {
hasError = false;
// insertIMEIDetailsModel.tokenID = "@dm!n";
// insertIMEIDetailsModel.tokenID = "@dm!n";
_insertDeviceImeiRes = {};
try {
await baseAppClient.post(INSERT_DEVICE_IMEI,
onSuccess: (dynamic response, int statusCode) {
_insertDeviceImeiRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: insertIMEIDetailsModel.toJson());
_insertDeviceImeiRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: insertIMEIDetailsModel.toJson());
} catch (error) {
hasError = true;
super.error = error;
}
}
Future getDoctorProfileBasedOnClinic(ProfileReqModel profileReqModel)async {
Future getDoctorProfileBasedOnClinic(ProfileReqModel profileReqModel) async {
hasError = false;
try {
await baseAppClient.post(GET_DOC_PROFILES,
onSuccess: (dynamic response, int statusCode) {
_doctorProfilesList.clear();
response['DoctorProfileList'].forEach((v) {
_doctorProfilesList.add(DoctorProfileModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: profileReqModel.toJson());
_doctorProfilesList.clear();
response['DoctorProfileList'].forEach((v) {
_doctorProfilesList.add(DoctorProfileModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: profileReqModel.toJson());
} catch (error) {
hasError = true;
super.error = error;

@ -13,14 +13,14 @@ class BaseService {
List<PatiantInformtion> patientArrivalList = [];
BaseService(){
BaseService() {
doctorProfile = null;
}
//TODO add the user login model when we need it
Future<DoctorProfileModel> getDoctorProfile({bool isGetProfile = false}) async {
if(isGetProfile)
{
Future<DoctorProfileModel> getDoctorProfile(
{bool isGetProfile = false}) async {
if (isGetProfile) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) {
doctorProfile = DoctorProfileModel.fromJson(profile);
@ -42,6 +42,4 @@ class BaseService {
return doctorProfile;
}
}
}

@ -17,6 +17,7 @@ class LookupService extends BaseService {
List<dynamic> medicationFrequencyList = [];
List<dynamic> medicationDoseTimeList = [];
List<dynamic> medicationIndicationsList = [];
// TODO make the person who create the list dynamic to change it.
List<MasterKeyModel> medicationStrengthListWithModel = [];
List<MasterKeyModel> medicationFrequencyListWithModel = [];
@ -52,7 +53,7 @@ class LookupService extends BaseService {
List<MasterKeyModel> listOfTemperatureMethods = [];
List<MasterKeyModel> listOfSpeciality = [];
List<dynamic> listOfAdmissionType = [];
List<dynamic> listOfDiagnosisSelectionTypes = [];
List<dynamic> listOfDiagnosisSelectionTypes = [];
Future getMasterLookup(MasterKeysService masterKeys) async {
hasError = false;

@ -1,12 +1,11 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_Model.dart';
class DashboardService extends BaseService {
List<DashboardModel> _dashboardItemsList = [];
List<DashboardModel> get dashboardItemsList => _dashboardItemsList;
bool hasVirtualClinic = false;
String sServiceID;
@ -25,14 +24,13 @@ class DashboardService extends BaseService {
hasError = true;
super.error = error;
},
body: {
},
body: {},
);
}
Future checkDoctorHasLiveCare() async {
hasError = false;
await getDoctorProfile(isGetProfile: true);
await getDoctorProfile(isGetProfile: true);
await baseAppClient.post(
DOCTOR_CHECK_HAS_LIVE_CARE,
onSuccess: (dynamic response, int statusCode) {
@ -44,9 +42,8 @@ class DashboardService extends BaseService {
super.error = error;
},
body: {
"DoctorID": doctorProfile?.doctorID// test user 9920
"DoctorID": doctorProfile?.doctorID // test user 9920
},
);
}
}

@ -2,14 +2,13 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart';
import 'package:doctor_app_flutter/models/doctor/replay/request_create_doctor_response.dart';
import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart';
import 'package:doctor_app_flutter/models/doctor/replay/request_doctor_reply.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.dart';
import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
class DoctorReplyService extends BaseService {
List<ListGtMyPatientsQuestions> get listDoctorWorkingHoursTable =>
_listDoctorWorkingHoursTable;
List<ListGtMyPatientsQuestions> get listDoctorNotRepliedQuestions =>
_listDoctorNotRepliedQuestions;
List<ListGtMyPatientsQuestions> _listDoctorWorkingHoursTable = [];
@ -27,20 +26,19 @@ class DoctorReplyService extends BaseService {
GT_MY_PATIENT_QUESTION,
onSuccess: (dynamic response, int statusCode) {
if (clearData) {
if(isGettingNotReply)
if (isGettingNotReply)
_listDoctorNotRepliedQuestions.clear();
else
_listDoctorWorkingHoursTable.clear();
else
_listDoctorWorkingHoursTable.clear();
}
response['List_GtMyPatientsQuestions'].forEach((v) {
if(isGettingNotReply)
_listDoctorNotRepliedQuestions.add(ListGtMyPatientsQuestions.fromJson(v));
if (isGettingNotReply)
_listDoctorNotRepliedQuestions
.add(ListGtMyPatientsQuestions.fromJson(v));
else
_listDoctorWorkingHoursTable
.add(ListGtMyPatientsQuestions.fromJson(v));
_listDoctorWorkingHoursTable
.add(ListGtMyPatientsQuestions.fromJson(v));
});
},
onFailure: (String error, int statusCode) {

@ -7,7 +7,8 @@ class ScanQrService extends BaseService {
List<PatiantInformtion> myInPatientList = List();
List<PatiantInformtion> inPatientList = List();
Future getInPatient(PatientSearchRequestModel requestModel, bool isMyInpatient) async {
Future getInPatient(
PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false;
await getDoctorProfile();

@ -4,16 +4,16 @@ import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table
import 'package:doctor_app_flutter/models/doctor/request_schedule.dart';
class ScheduleService extends BaseService {
List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable => _listDoctorWorkingHoursTable;
List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable =>
_listDoctorWorkingHoursTable;
List<ListDoctorWorkingHoursTable> _listDoctorWorkingHoursTable = [];
RequestSchedule _requestSchedule = RequestSchedule();
Future getDoctorSchedule() async {
await baseAppClient.post(GET_DOCTOR_WORKING_HOURS_TABLE,
onSuccess: (dynamic response, int statusCode) {
_listDoctorWorkingHoursTable.clear();
_listDoctorWorkingHoursTable.clear();
response['List_DoctorWorkingHoursTable'].forEach((v) {
_listDoctorWorkingHoursTable
.add(ListDoctorWorkingHoursTable.fromJson(v));
@ -21,6 +21,6 @@ class ScheduleService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSchedule.toJson(),isFallLanguage: true);
}, body: _requestSchedule.toJson(), isFallLanguage: true);
}
}

@ -4,8 +4,7 @@ import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_m
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class HospitalsService extends BaseService {
List<GetHospitalsResponseModel> hospitals =List();
List<GetHospitalsResponseModel> hospitals = List();
Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async {
hasError = false;

@ -35,7 +35,8 @@ class LiveCarePatientServices extends BaseService {
StartCallRes get startCallRes => _startCallRes;
Future getPendingPatientERForDoctorApp(
PendingPatientERForDoctorAppRequestModel pendingPatientERForDoctorAppRequestModel) async {
PendingPatientERForDoctorAppRequestModel
pendingPatientERForDoctorAppRequestModel) async {
hasError = false;
await baseAppClient.post(
GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP,
@ -48,7 +49,10 @@ class LiveCarePatientServices extends BaseService {
/// add new items.
localPatientList.forEach((element) {
if ((_patientList.singleWhere((it) => it.patientId == element.patientId, orElse: () => null)) == null) {
if ((_patientList.singleWhere(
(it) => it.patientId == element.patientId,
orElse: () => null)) ==
null) {
_patientList.add(element);
}
});
@ -56,7 +60,10 @@ class LiveCarePatientServices extends BaseService {
/// remove items.
List<PatiantInformtion> removedPatientList = [];
_patientList.forEach((element) {
if ((localPatientList.singleWhere((it) => it.patientId == element.patientId, orElse: () => null)) == null) {
if ((localPatientList.singleWhere(
(it) => it.patientId == element.patientId,
orElse: () => null)) ==
null) {
removedPatientList.add(element);
}
});
@ -85,7 +92,8 @@ class LiveCarePatientServices extends BaseService {
Future startCall(StartCallReq startCallReq) async {
hasError = false;
await baseAppClient.post(START_LIVE_CARE_CALL, onSuccess: (response, statusCode) async {
await baseAppClient.post(START_LIVE_CARE_CALL,
onSuccess: (response, statusCode) async {
_startCallRes = StartCallRes.fromJson(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -95,17 +103,23 @@ class LiveCarePatientServices extends BaseService {
Future endCallWithCharge(int vcID, List<int> altServiceList) async {
hasError = false;
await baseAppClient.post(END_CALL_WITH_CHARGE, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(END_CALL_WITH_CHARGE,
onSuccess: (dynamic response, int statusCode) {
endCallResponse = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: {"VC_ID": vcID, "AltServiceList": altServiceList, "generalid": GENERAL_ID}, isLiveCare: _isLive);
}, body: {
"VC_ID": vcID,
"AltServiceList": altServiceList,
"generalid": GENERAL_ID
}, isLiveCare: _isLive);
}
Future transferToAdmin(int vcID, String notes) async {
hasError = false;
await baseAppClient.post(TRANSFERT_TO_ADMIN, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(TRANSFERT_TO_ADMIN,
onSuccess: (dynamic response, int statusCode) {
transferToAdminResponse = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -119,7 +133,8 @@ class LiveCarePatientServices extends BaseService {
Future sendSMSInstruction(int vcID) async {
hasError = false;
await baseAppClient.post(SEND_SMS_INSTRUCTIONS, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(SEND_SMS_INSTRUCTIONS,
onSuccess: (dynamic response, int statusCode) {
transferToAdminResponse = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -127,11 +142,14 @@ class LiveCarePatientServices extends BaseService {
}, body: {"VC_ID": vcID, "generalid": GENERAL_ID}, isLiveCare: _isLive);
}
Future isLogin({LiveCareUserLoginRequestModel isLoginRequestModel, int loginStatus}) async {
Future isLogin(
{LiveCareUserLoginRequestModel isLoginRequestModel,
int loginStatus}) async {
hasError = false;
await getDoctorProfile();
isLoginRequestModel.doctorId = super.doctorProfile.doctorID;
await baseAppClient.post(LIVE_CARE_IS_LOGIN, onSuccess: (response, statusCode) async {
await baseAppClient.post(LIVE_CARE_IS_LOGIN,
onSuccess: (response, statusCode) async {
isLoginResponse = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -143,7 +161,8 @@ class LiveCarePatientServices extends BaseService {
hasError = false;
alternativeServicesList.clear();
await baseAppClient.post(GET_ALTERNATIVE_SERVICE, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_ALTERNATIVE_SERVICE,
onSuccess: (dynamic response, int statusCode) {
response['AlternativeServicesList'].forEach((v) {
alternativeServicesList.add(AlternativeService.fromJson(v));
});
@ -156,14 +175,16 @@ class LiveCarePatientServices extends BaseService {
Future addPatientToDoctorList({int vcID}) async {
hasError = false;
await getDoctorProfile();
AddPatientToDoctorListRequestModel addPatientToDoctorListRequestModel = AddPatientToDoctorListRequestModel();
AddPatientToDoctorListRequestModel addPatientToDoctorListRequestModel =
AddPatientToDoctorListRequestModel();
addPatientToDoctorListRequestModel.doctorId = super.doctorProfile.doctorID;
addPatientToDoctorListRequestModel.vCID = vcID;
addPatientToDoctorListRequestModel.isOutKsa = false;
addPatientToDoctorListRequestModel.generalid = GENERAL_ID;
await baseAppClient.post(ADD_PATIENT_TO_DOCTOR, onSuccess: (response, statusCode) async {
await baseAppClient.post(ADD_PATIENT_TO_DOCTOR,
onSuccess: (response, statusCode) async {
isLoginResponse = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -173,14 +194,16 @@ class LiveCarePatientServices extends BaseService {
Future removePatientFromDoctorList({int vcID}) async {
hasError = false;
AddPatientToDoctorListRequestModel addPatientToDoctorListRequestModel = AddPatientToDoctorListRequestModel();
AddPatientToDoctorListRequestModel addPatientToDoctorListRequestModel =
AddPatientToDoctorListRequestModel();
await getDoctorProfile();
addPatientToDoctorListRequestModel.doctorId = super.doctorProfile.doctorID;
addPatientToDoctorListRequestModel.vCID = vcID;
addPatientToDoctorListRequestModel.isOutKsa = false;
addPatientToDoctorListRequestModel.generalid = GENERAL_ID;
await baseAppClient.post(REMOVE_PATIENT_FROM_DOCTOR, onSuccess: (response, statusCode) async {
await baseAppClient.post(REMOVE_PATIENT_FROM_DOCTOR,
onSuccess: (response, statusCode) async {
isLoginResponse = response;
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -12,19 +12,20 @@ class MyReferralInPatientService extends BaseService {
hasError = false;
await getDoctorProfile();
MyReferralPatientRequestModel myReferralPatientRequestModel = MyReferralPatientRequestModel(
doctorID: doctorProfile.doctorID,
firstName: "0",
middleName: "0",
lastName: "0",
patientMobileNumber: "0",
patientIdentificationID: "0",
patientID: 0,
from: "0",
to: "0",
stamp: DateTime.now().toIso8601String(),
isLoginForDoctorApp: true,
patientTypeID: 1);
MyReferralPatientRequestModel myReferralPatientRequestModel =
MyReferralPatientRequestModel(
doctorID: doctorProfile.doctorID,
firstName: "0",
middleName: "0",
lastName: "0",
patientMobileNumber: "0",
patientIdentificationID: "0",
patientID: 0,
from: "0",
to: "0",
stamp: DateTime.now().toIso8601String(),
isLoginForDoctorApp: true,
patientTypeID: 1);
myReferralPatients.clear();
await baseAppClient.post(
GET_MY_REFERRAL_INPATIENT,
@ -47,19 +48,20 @@ class MyReferralInPatientService extends BaseService {
hasError = false;
await getDoctorProfile();
MyReferralPatientRequestModel myReferralPatientRequestModel = MyReferralPatientRequestModel(
doctorID: doctorProfile.doctorID,
firstName: "0",
middleName: "0",
lastName: "0",
patientMobileNumber: "0",
patientIdentificationID: "0",
patientID: 0,
from: "0",
to: "0",
stamp: DateTime.now().toIso8601String(),
isLoginForDoctorApp: true,
patientTypeID: 1);
MyReferralPatientRequestModel myReferralPatientRequestModel =
MyReferralPatientRequestModel(
doctorID: doctorProfile.doctorID,
firstName: "0",
middleName: "0",
lastName: "0",
patientMobileNumber: "0",
patientIdentificationID: "0",
patientID: 0,
from: "0",
to: "0",
stamp: DateTime.now().toIso8601String(),
isLoginForDoctorApp: true,
patientTypeID: 1);
myReferralPatients.clear();
await baseAppClient.post(
GET_MY_REFERRAL_OUT_PATIENT,
@ -78,14 +80,18 @@ class MyReferralInPatientService extends BaseService {
);
}
Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async {
Future replay(
String referredDoctorRemarks, MyReferralPatientModel referral) async {
hasError = false;
await getDoctorProfile();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks =
RequestAddReferredDoctorRemarks();
_requestAddReferredDoctorRemarks.projectID = referral.projectID;
_requestAddReferredDoctorRemarks.admissionNo = referral.admissionNo.toString();
_requestAddReferredDoctorRemarks.admissionNo =
referral.admissionNo.toString();
_requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks;
_requestAddReferredDoctorRemarks.referredDoctorRemarks =
referredDoctorRemarks;
_requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID;
_requestAddReferredDoctorRemarks.patientID = referral.patientID;
_requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor;
@ -100,20 +106,24 @@ class MyReferralInPatientService extends BaseService {
);
}
Future replayReferred(String referredDoctorRemarks, MyReferralPatientModel referral, int referralStatus) async {
Future replayReferred(String referredDoctorRemarks,
MyReferralPatientModel referral, int referralStatus) async {
hasError = false;
await getDoctorProfile();
AddReferredRemarksRequestModel _requestAddReferredDoctorRemarks = AddReferredRemarksRequestModel(
editedBy: doctorProfile.doctorID,
projectID: doctorProfile.projectID,
referredDoctorRemarks: referredDoctorRemarks,
referalStatus: referralStatus);
AddReferredRemarksRequestModel _requestAddReferredDoctorRemarks =
AddReferredRemarksRequestModel(
editedBy: doctorProfile.doctorID,
projectID: doctorProfile.projectID,
referredDoctorRemarks: referredDoctorRemarks,
referalStatus: referralStatus);
_requestAddReferredDoctorRemarks.projectID = referral.projectID;
//TODO Check this in case out patient
_requestAddReferredDoctorRemarks.admissionNo = int.parse(referral.admissionNo);
_requestAddReferredDoctorRemarks.admissionNo =
int.parse(referral.admissionNo);
_requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks;
_requestAddReferredDoctorRemarks.referredDoctorRemarks =
referredDoctorRemarks;
_requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID;
_requestAddReferredDoctorRemarks.referalStatus = referralStatus;

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
class OutPatientService extends BaseService {
List<PatiantInformtion> _patientList = [];
List<PatiantInformtion> get patientList => _patientList;
Future getOutPatient(

@ -161,7 +161,7 @@ class PatientReferralService extends LookupService {
Future getMyReferredOutPatient() async {
hasError = false;
RequestMyReferralPatientModel _requestMyReferralPatient =
RequestMyReferralPatientModel();
RequestMyReferralPatientModel();
DoctorProfileModel doctorProfile = await getDoctorProfile();
await baseAppClient.post(

@ -27,7 +27,7 @@ class PatientInPatientService extends BaseService {
response['List_MyInPatient'].forEach((v) {
PatiantInformtion patient = PatiantInformtion.fromJson(v);
inPatientList.add(patient);
if(patient.doctorId == doctorProfile.doctorID){
if (patient.doctorId == doctorProfile.doctorID) {
myInPatientList.add(patient);
}
});

@ -37,12 +37,15 @@ class PatientService extends BaseService {
List<LabOrdersResModel> _patientLabResultOrdersList = [];
List<LabOrdersResModel> get patientLabResultOrdersList => _patientLabResultOrdersList;
List<LabOrdersResModel> get patientLabResultOrdersList =>
_patientLabResultOrdersList;
List<PrescriptionResModel> get patientPrescriptionsList => _patientPrescriptionsList;
List<PrescriptionResModel> get patientPrescriptionsList =>
_patientPrescriptionsList;
List<PrescriptionResModel> _patientPrescriptionsList = [];
List<PrescriptionReportForInPatient> get prescriptionReportForInPatientList => _prescriptionReportForInPatientList;
List<PrescriptionReportForInPatient> get prescriptionReportForInPatientList =>
_prescriptionReportForInPatientList;
List<PrescriptionReportForInPatient> _prescriptionReportForInPatientList = [];
List<RadiologyResModel> _patientRadiologyList = [];
@ -63,14 +66,17 @@ class PatientService extends BaseService {
List<GetNursingProgressNoteResposeModel> _patientNursingProgressNoteList = [];
List<GetNursingProgressNoteResposeModel> get patientNursingProgressNoteList => _patientNursingProgressNoteList;
List<GetNursingProgressNoteResposeModel> get patientNursingProgressNoteList =>
_patientNursingProgressNoteList;
List<GetDiagnosisForInPatientResponseModel> _diagnosisForInPatientList = [];
List<GetDiagnosisForInPatientResponseModel> get diagnosisForInPatientList => _diagnosisForInPatientList;
List<GetDiagnosisForInPatientResponseModel> get diagnosisForInPatientList =>
_diagnosisForInPatientList;
List<GetDiabeticChartValuesResponseModel> _diabeticChartValuesList = [];
List<GetDiabeticChartValuesResponseModel> get diabeticChartValuesList => _diabeticChartValuesList;
List<GetDiabeticChartValuesResponseModel> get diabeticChartValuesList =>
_diabeticChartValuesList;
// TODO: replace var with model
var _insuranceApporvalsList = [];
@ -96,9 +102,12 @@ class PatientService extends BaseService {
get referalFrequancyList => _referalFrequancyList;
DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest();
STPReferralFrequencyRequest _referralFrequencyRequest = STPReferralFrequencyRequest();
ClinicByProjectIdRequest _clinicByProjectIdRequest = ClinicByProjectIdRequest();
DoctorsByClinicIdRequest _doctorsByClinicIdRequest =
DoctorsByClinicIdRequest();
STPReferralFrequencyRequest _referralFrequencyRequest =
STPReferralFrequencyRequest();
ClinicByProjectIdRequest _clinicByProjectIdRequest =
ClinicByProjectIdRequest();
ReferToDoctorRequest _referToDoctorRequest;
Future<dynamic> getPatientList(patient, patientType, {isView}) async {
@ -152,7 +161,8 @@ class PatientService extends BaseService {
return Future.value(localRes);
}
Future getInPatient(PatientSearchRequestModel requestModel, bool isMyInpatient) async {
Future getInPatient(
PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false;
await getDoctorProfile();
@ -227,7 +237,8 @@ class PatientService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
_prescriptionReportForInPatientList = [];
response['List_PrescriptionReportForInPatient'].forEach((v) {
prescriptionReportForInPatientList.add(PrescriptionReportForInPatient.fromJson(v));
prescriptionReportForInPatientList
.add(PrescriptionReportForInPatient.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
@ -482,8 +493,9 @@ class PatientService extends BaseService {
);
}
Future getNursingProgressNote(GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel) async {
Future getNursingProgressNote(
GetNursingProgressNoteRequestModel
getNursingProgressNoteRequestModel) async {
hasError = false;
await baseAppClient.post(
@ -491,7 +503,8 @@ class PatientService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
_patientNursingProgressNoteList = [];
response['List_NursingProgressNote'].forEach((v) {
_patientNursingProgressNoteList.add( GetNursingProgressNoteResposeModel.fromJson(v));
_patientNursingProgressNoteList
.add(GetNursingProgressNoteResposeModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
@ -502,7 +515,9 @@ class PatientService extends BaseService {
);
}
Future getDiagnosisForInPatient(GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel) async {
Future getDiagnosisForInPatient(
GetDiagnosisForInPatientRequestModel
getDiagnosisForInPatientRequestModel) async {
hasError = false;
await baseAppClient.post(
@ -510,7 +525,8 @@ class PatientService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
_diagnosisForInPatientList = [];
response['List_DiagnosisForInPatient'].forEach((v) {
_diagnosisForInPatientList.add( GetDiagnosisForInPatientResponseModel.fromJson(v));
_diagnosisForInPatientList
.add(GetDiagnosisForInPatientResponseModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
@ -521,8 +537,9 @@ class PatientService extends BaseService {
);
}
Future getDiabeticChartValues(GetDiabeticChartValuesRequestModel getDiabeticChartValuesRequestModel) async {
Future getDiabeticChartValues(
GetDiabeticChartValuesRequestModel
getDiabeticChartValuesRequestModel) async {
hasError = false;
await baseAppClient.post(
@ -530,7 +547,8 @@ class PatientService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
_diabeticChartValuesList = [];
response['List_DiabeticChartValues'].forEach((v) {
_diabeticChartValuesList.add( GetDiabeticChartValuesResponseModel.fromJson(v));
_diabeticChartValuesList
.add(GetDiabeticChartValuesResponseModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {

@ -2,18 +2,15 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart';
import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart';
import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart';
import 'package:doctor_app_flutter/models/operation_report/get_operation_details_request_modle.dart';
import 'package:doctor_app_flutter/models/operation_report/get_operation_details_response_modle.dart';
import 'package:doctor_app_flutter/models/operation_report/get_reservations_response_model.dart';
import 'package:doctor_app_flutter/models/operation_report/get_reservations_request_model.dart';
class DischargeSummaryService extends BaseService {
List<GetDischargeSummaryResModel> _pendingDischargeSummaryList = [];
List<GetDischargeSummaryResModel> get pendingDischargeSummaryList =>
_pendingDischargeSummaryList;
List<GetDischargeSummaryResModel> _allDischargeSummaryList = [];
List<GetDischargeSummaryResModel> get allDischargeSummaryList =>
_allDischargeSummaryList;

@ -8,10 +8,13 @@ import 'package:doctor_app_flutter/models/operation_report/get_reservations_requ
class OperationReportService extends BaseService {
List<GetReservationsResponseModel> _reservationList = [];
List<GetReservationsResponseModel> get reservationList => _reservationList;
List<GetOperationDetailsResponseModel> _operationDetailsList = [];
List<GetOperationDetailsResponseModel> get operationDetailsList => _operationDetailsList;
List<GetOperationDetailsResponseModel> get operationDetailsList =>
_operationDetailsList;
Future getReservations(
{GetReservationsRequestModel getReservationsRequestModel,
@ -35,10 +38,9 @@ class OperationReportService extends BaseService {
}, body: getReservationsRequestModel.toJson());
}
Future getOperationReportDetails(
{GetOperationDetailsRequestModel getOperationReportRequestModel,
}) async {
Future getOperationReportDetails({
GetOperationDetailsRequestModel getOperationReportRequestModel,
}) async {
hasError = false;
await baseAppClient.post(GET_OPERATION_DETAILS,
onSuccess: (dynamic response, int statusCode) {
@ -46,7 +48,8 @@ class OperationReportService extends BaseService {
_operationDetailsList.clear();
response['List_OperationDetails'].forEach(
(v) {
_operationDetailsList.add(GetOperationDetailsResponseModel.fromJson(v));
_operationDetailsList
.add(GetOperationDetailsResponseModel.fromJson(v));
},
);
}, onFailure: (String error, int statusCode) {

@ -5,44 +5,54 @@ import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patien
import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
class ReferralPatientService extends BaseService {
List<MyReferralPatientModel> _listMyReferralPatientModel = [];
List<MyReferralPatientModel> get listMyReferralPatientModel => _listMyReferralPatientModel;
List<MyReferralPatientModel> get listMyReferralPatientModel =>
_listMyReferralPatientModel;
RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();
RequestMyReferralPatientModel _requestMyReferralPatient =
RequestMyReferralPatientModel();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks =
RequestAddReferredDoctorRemarks();
Future getMyReferralPatient() async {
await baseAppClient.post(GET_MY_REFERRAL_PATIENT,
onSuccess: (dynamic response, int statusCode) {
_listMyReferralPatientModel.clear();
response['List_MyReferralPatient'].forEach((v) {
listMyReferralPatientModel.add(MyReferralPatientModel.fromJson(v));
});
print(response['List_MyReferralPatient']);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestMyReferralPatient .toJson(),);
await baseAppClient.post(
GET_MY_REFERRAL_PATIENT,
onSuccess: (dynamic response, int statusCode) {
_listMyReferralPatientModel.clear();
response['List_MyReferralPatient'].forEach((v) {
listMyReferralPatientModel.add(MyReferralPatientModel.fromJson(v));
});
print(response['List_MyReferralPatient']);
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: _requestMyReferralPatient.toJson(),
);
}
Future replay(
String referredDoctorRemarks, MyReferralPatientModel model) async {
_requestAddReferredDoctorRemarks.admissionNo = model.admissionNo;
_requestAddReferredDoctorRemarks.patientID = model.patientID;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks;
_requestAddReferredDoctorRemarks.referredDoctorRemarks =
referredDoctorRemarks;
_requestAddReferredDoctorRemarks.lineItemNo = model.lineItemNo;
_requestAddReferredDoctorRemarks.referringDoctor = model.referringDoctor;
await baseAppClient.post(GET_MY_REFERRAL_PATIENT,
onSuccess: (dynamic response, int statusCode) {
model.referredDoctorRemarks = referredDoctorRemarks;
listMyReferralPatientModel[
listMyReferralPatientModel.indexOf(model)] = model;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestMyReferralPatient .toJson(),);
await baseAppClient.post(
GET_MY_REFERRAL_PATIENT,
onSuccess: (dynamic response, int statusCode) {
model.referredDoctorRemarks = referredDoctorRemarks;
listMyReferralPatientModel[listMyReferralPatientModel.indexOf(model)] =
model;
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: _requestMyReferralPatient.toJson(),
);
}
}

@ -14,7 +14,6 @@ class AdmissionRequestService extends LookupService {
List<dynamic> dietTypesList = [];
List<dynamic> icdCodes = [];
setSpecialityList() {
specialityList.clear();
listOfSpeciality.forEach((element) {
@ -199,8 +198,8 @@ class AdmissionRequestService extends LookupService {
if (response['ICDCodesList'] != null) {
icdCodes.addAll(response['ICDCodesList']);
// response['ICDCodesList'].forEach((v) {
// diagnosisTypesList.add(MasterKeyModel.fromJson(v));
// icdCodes.add(v);
// diagnosisTypesList.add(MasterKeyModel.fromJson(v));
// icdCodes.add(v);
// });
}
},
@ -212,7 +211,7 @@ class AdmissionRequestService extends LookupService {
);
}
Future makeAdmissionRequest(AdmissionRequest admissionRequest) async{
Future makeAdmissionRequest(AdmissionRequest admissionRequest) async {
hasError = false;
Map<String, dynamic> body = Map();
@ -230,5 +229,4 @@ class AdmissionRequestService extends LookupService {
body: body,
);
}
}

@ -17,9 +17,11 @@ class InsuranceCardService extends BaseService {
InsuranceApprovalInPatientRequestModel();
List<InsuranceApprovalModel> _insuranceApproval = List();
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
List<InsuranceApprovalInPatientModel> _insuranceApprovalInPatient = List();
List<InsuranceApprovalInPatientModel> get insuranceApprovalInPatient =>
_insuranceApprovalInPatient;

@ -15,11 +15,14 @@ import '../../base/base_service.dart';
class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List();
List<AllSpecialLabResultModel> _allSpecialLab = List();
List<AllSpecialLabResultModel> get allSpecialLab => _allSpecialLab;
AllSpecialLabResultRequestModel _allSpecialLabResultRequestModel = AllSpecialLabResultRequestModel();
AllSpecialLabResultRequestModel _allSpecialLabResultRequestModel =
AllSpecialLabResultRequestModel();
Future getPatientLabOrdersList(PatiantInformtion patient, bool isInpatient) async {
Future getPatientLabOrdersList(
PatiantInformtion patient, bool isInpatient) async {
hasError = false;
Map<String, dynamic> body = Map();
String url = "";
@ -33,7 +36,8 @@ class LabsService extends BaseService {
}
patientLabOrdersList = [];
patientLabOrdersList.clear();
await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList = [];
if (!isInpatient) {
response['ListPLO'].forEach((hospital) {
@ -51,7 +55,8 @@ class LabsService extends BaseService {
}, body: body);
}
RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult();
RequestPatientLabSpecialResult _requestPatientLabSpecialResult =
RequestPatientLabSpecialResult();
List<PatientLabSpecialResult> patientLabSpecialResult = List();
List<LabResult> labResultList = List();
@ -74,8 +79,8 @@ class LabsService extends BaseService {
_requestPatientLabSpecialResult.orderNo = orderNo;
body = _requestPatientLabSpecialResult.toJson();
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT,
patient: patient, onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
response['ListPLSR'].forEach((hospital) {
@ -87,7 +92,10 @@ class LabsService extends BaseService {
}, body: body);
}
Future getPatientLabResult({PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async {
Future getPatientLabResult(
{PatientLabOrders patientLabOrder,
PatiantInformtion patient,
bool isInpatient}) async {
hasError = false;
String url = "";
@ -105,7 +113,8 @@ class LabsService extends BaseService {
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID ?? 0;
await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult = [];
labResultList = [];
@ -114,7 +123,8 @@ class LabsService extends BaseService {
labResultList.add(LabResult.fromJson(hospital));
});
response['List_GetLabSpecial'].forEach((hospital) {
patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital));
patientLabSpecialResult
.add(PatientLabSpecialResult.fromJson(hospital));
});
} else {
response['ListPLR'].forEach((lab) {
@ -128,7 +138,9 @@ class LabsService extends BaseService {
}
Future getPatientLabOrdersResults(
{PatientLabOrders patientLabOrder, String procedure, PatiantInformtion patient}) async {
{PatientLabOrders patientLabOrder,
String procedure,
PatiantInformtion patient}) async {
hasError = false;
Map<String, dynamic> body = Map();
if (patientLabOrder != null) {
@ -140,8 +152,8 @@ class LabsService extends BaseService {
}
body['isDentalAllowedBackend'] = false;
body['Procedure'] = procedure;
await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT,
patient: patient, onSuccess: (dynamic response, int statusCode) {
labOrdersResultsList.clear();
response['ListPLR'].forEach((lab) {
labOrdersResultsList.add(LabOrderResult.fromJson(lab));
@ -152,7 +164,8 @@ class LabsService extends BaseService {
}, body: body);
}
RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail();
RequestSendLabReportEmail _requestSendLabReportEmail =
RequestSendLabReportEmail();
Future sendLabReportEmail({PatientLabOrders patientLabOrder}) async {
// _requestSendLabReportEmail.projectID = patientLabOrder.projectID;
@ -179,7 +192,9 @@ class LabsService extends BaseService {
}
Future getPatientLabOrdersResultHistoryByDescription(
{PatientLabOrders patientLabOrder, String procedureDescription, PatiantInformtion patient}) async {
{PatientLabOrders patientLabOrder,
String procedureDescription,
PatiantInformtion patient}) async {
hasError = false;
Map<String, dynamic> body = Map();
if (patientLabOrder != null) {
@ -189,8 +204,9 @@ class LabsService extends BaseService {
}
body['isDentalAllowedBackend'] = false;
body['ProcedureDescription'] = procedureDescription;
await baseAppClient.postPatient(GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(
GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION,
patient: patient, onSuccess: (dynamic response, int statusCode) {
labOrdersResultHistoryList.clear();
response['ListGeneralResultHistory'].forEach((lab) {
labOrdersResultHistoryList.add(LabResultHistory.fromJson(lab));
@ -209,10 +225,12 @@ class LabsService extends BaseService {
);
hasError = false;
_allSpecialLab.clear();
await baseAppClient.post(ALL_SPECIAL_LAB_RESULT, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(ALL_SPECIAL_LAB_RESULT,
onSuccess: (dynamic response, int statusCode) {
response['ListPLSRALL'].forEach((lab) {
var labs = AllSpecialLabResultModel.fromJson(lab);
if (labs.invoiceNo != "0") _allSpecialLab.add(AllSpecialLabResultModel.fromJson(lab));
if (labs.invoiceNo != "0")
_allSpecialLab.add(AllSpecialLabResultModel.fromJson(lab));
});
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -16,7 +16,8 @@ class PatientMedicalReportService extends BaseService {
body['SetupID'] = doctorProfile.setupID;
body['ProjectID'] = doctorProfile.projectID;
medicalReportList = [];
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST,
onSuccess: (dynamic response, int statusCode) {
if (response['DAPP_ListMedicalReportList'] != null) {
response['DAPP_ListMedicalReportList'].forEach((v) {
medicalReportList.add(MedicalReportModel.fromJson(v));
@ -36,7 +37,8 @@ class PatientMedicalReportService extends BaseService {
body['SetupID'] = "91877";
body['TemplateID'] = 43;
await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE,
onSuccess: (dynamic response, int statusCode) {
medicalReportTemplate.clear();
if (response['DAPP_GetTemplateByIDList'] != null) {
response['DAPP_GetTemplateByIDList'].forEach((v) {
@ -57,14 +59,16 @@ class PatientMedicalReportService extends BaseService {
body['AdmissionNo'] = patient.admissionNo;
body['MedicalReportHTML'] = htmlText;
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_INSERT, onSuccess: (dynamic response, int statusCode) {},
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_INSERT,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error.toString();
}, body: body, patient: patient);
}
Future verifyMedicalReport(PatiantInformtion patient, MedicalReportModel medicalReport) async {
Future verifyMedicalReport(
PatiantInformtion patient, MedicalReportModel medicalReport) async {
hasError = false;
Map<String, dynamic> body = Map();
body['TokenID'] = "@dm!n";
@ -77,7 +81,8 @@ class PatientMedicalReportService extends BaseService {
}
if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID;
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_VERIFIED, onSuccess: (dynamic response, int statusCode) {},
await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_VERIFIED,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error.toString();
@ -100,14 +105,16 @@ class PatientMedicalReportService extends BaseService {
}
if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID;
await baseAppClient.postPatient(INSERT_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {},
await baseAppClient.postPatient(INSERT_MEDICAL_REPORT,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error.toString();
}, body: body, patient: patient);
}
Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async {
Future updateMedicalReport(PatiantInformtion patient, String htmlText,
int limitNumber, String invoiceNumber) async {
hasError = false;
Map<String, dynamic> body = Map();
// body['TokenID'] = "@dm!n";
@ -127,7 +134,8 @@ class PatientMedicalReportService extends BaseService {
}
if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID;
await baseAppClient.postPatient(UPDATE_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {},
await baseAppClient.postPatient(UPDATE_MEDICAL_REPORT,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error.toString();

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class MedicalFileService extends BaseService {
List<MedicalFileModel> _medicalFileList = List();
List<MedicalFileModel> get medicalFileList => _medicalFileList;
MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel(

@ -7,9 +7,11 @@ import 'package:doctor_app_flutter/models/pharmacies/pharmacies_items_request_mo
class MedicineService extends BaseService {
var _pharmacyItemsList = [];
var _pharmaciesList = [];
get pharmacyItemsList => _pharmacyItemsList;
get pharmaciesList => _pharmaciesList;
String searchText='';
String searchText = '';
List<GetAssessmentResModel> patientAssessmentList = [];
PharmaciesItemsRequestModel _itemsRequestModel =
@ -18,7 +20,7 @@ class MedicineService extends BaseService {
Future getMedicineItem(String itemName) async {
_itemsRequestModel.pHRItemName = itemName;
searchText =itemName;
searchText = itemName;
await baseAppClient.post(
PHARMACY_ITEMS_URL,
onSuccess: (dynamic response, int statusCode) {

@ -17,13 +17,16 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
class PrescriptionService extends LookupService {
List<PrescriptionModel> _prescriptionList = List();
List<PrescriptionModel> get prescriptionList => _prescriptionList;
List<SearchDrugModel> _drugsList = List();
List<SearchDrugModel> get drugsList => _drugsList;
List<dynamic> doctorsList = [];
List<GetMedicationResponseModel> allMedicationList = [];
List<dynamic> specialityList = [];
List<dynamic> drugToDrug = [];
List<dynamic> get drugToDrugList => drugToDrug;
List<dynamic> itemMedicineList = [];
List<dynamic> itemMedicineListRoute = [];

@ -22,7 +22,8 @@ class PrescriptionsService extends BaseService {
List<PrescriptionsOrder> prescriptionsOrderList = List();
List<PrescriotionInPatient> prescriptionInPatientList = List();
InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel();
InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel =
InPatientPrescriptionRequestModel();
GetMedicationForInPatientRequestModel _getMedicationForInPatientRequestModel =
GetMedicationForInPatientRequestModel();
@ -34,10 +35,12 @@ class PrescriptionsService extends BaseService {
hasError = false;
prescriptionInPatientList.clear();
await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT,
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['List_PrescriptionReportForInPatient'].forEach((prescriptions) {
prescriptionInPatientList.add(PrescriotionInPatient.fromJson(prescriptions));
prescriptionInPatientList
.add(PrescriotionInPatient.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -49,7 +52,8 @@ class PrescriptionsService extends BaseService {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient,
onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) {
prescriptionsList.add(Prescriptions.fromJson(prescriptions));
@ -61,10 +65,13 @@ class PrescriptionsService extends BaseService {
}
RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false);
RequestPrescriptionReport(
appointmentNo: 0, isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport({Prescriptions prescriptions, @required PatiantInformtion patient}) async {
Future getPrescriptionReport(
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
hasError = false;
_requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
_requestPrescriptionReport.projectID = prescriptions.projectID;
@ -74,18 +81,23 @@ class PrescriptionsService extends BaseService {
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.postPatient(
prescriptions.isInOutPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
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));
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportList
.add(PrescriptionReport.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) {
@ -94,7 +106,8 @@ class PrescriptionsService extends BaseService {
}, body: _requestPrescriptionReport.toJson());
}
RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions
requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions(
latitude: 0,
longitude: 0,
@ -102,13 +115,16 @@ class PrescriptionsService extends BaseService {
);
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List();
Future getListPharmacyForPrescriptions({int itemId, @required PatiantInformtion patient}) async {
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) {
await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient,
onSuccess: (dynamic response, int statusCode) {
pharmacyPrescriptionsList.clear();
response['PharmList'].forEach((prescriptions) {
pharmacyPrescriptionsList.add(PharmacyPrescriptions.fromJson(prescriptions));
pharmacyPrescriptionsList
.add(PharmacyPrescriptions.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -116,13 +132,16 @@ class PrescriptionsService extends BaseService {
}, body: requestGetListPharmacyForPrescriptions.toJson());
}
RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh(
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
RequestPrescriptionReportEnh(
isDentalAllowedBackend: false,
);
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder, @required PatiantInformtion patient}) async {
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) {
@ -137,7 +156,8 @@ class PrescriptionsService extends BaseService {
isInPatient = element.isInOutPatient;
}
} else {
if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) {
if (int.parse(prescriptionsOrder.appointmentNo) ==
element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
@ -153,17 +173,20 @@ class PrescriptionsService extends BaseService {
hasError = false;
await baseAppClient.postPatient(isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW,
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));
prescriptionReportEnhList
.add(PrescriptionReportEnh.fromJson(prescriptions));
});
} else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions);
PrescriptionReportEnh reportEnh =
PrescriptionReportEnh.fromJson(prescriptions);
reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh);
});
@ -177,10 +200,13 @@ class PrescriptionsService extends BaseService {
Future getPrescriptionsOrders() async {
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS,
onSuccess: (dynamic response, int statusCode) {
prescriptionsOrderList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((prescriptionsOrder) {
prescriptionsOrderList.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
response['PatientER_GetPatientAllPresOrdersList']
.forEach((prescriptionsOrder) {
prescriptionsOrderList
.add(PrescriptionsOrder.fromJson(prescriptionsOrder));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -190,17 +216,19 @@ class PrescriptionsService extends BaseService {
Future getMedicationForInPatient(PatiantInformtion patient) async {
hasError = false;
_getMedicationForInPatientRequestModel = GetMedicationForInPatientRequestModel(
_getMedicationForInPatientRequestModel =
GetMedicationForInPatientRequestModel(
isDentalAllowedBackend: false,
admissionNo: int.parse(patient.admissionNo),
tokenID: "@dm!n",
projectID: patient.projectId,
);
await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT,
patient: patient, onSuccess: (dynamic response, int statusCode) {
medicationForInPatient.clear();
response['List_GetMedicationForInpatient'].forEach((prescriptions) {
medicationForInPatient.add(GetMedicationForInPatientModel.fromJson(prescriptions));
medicationForInPatient
.add(GetMedicationForInPatientModel.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) {
hasError = true;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save