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: [ children: [
Image.asset( Image.asset(
'assets/images/update_rocket_image.png', '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'), Image.asset('assets/images/HMG_logo.png'),
SizedBox(height: 8,), SizedBox(
height: 8,
),
AppText( AppText(
TranslationBase.of(context).updateTheApp.toUpperCase(),fontSize: 17, TranslationBase.of(context).updateTheApp.toUpperCase(),
fontSize: 17,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), 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; var asd2;
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(Uri.parse(url), 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; final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) { if (statusCode < 200 || statusCode >= 400) {
onFailure(Helpers.generateContactAdminMsg(), statusCode); onFailure(Helpers.generateContactAdminMsg(), statusCode);
@ -234,7 +238,8 @@ class BaseAppClient {
var asd = json.encode(body); var asd = json.encode(body);
var asd2; var asd2;
if (await Helpers.checkConnection()) { 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; final int statusCode = response.statusCode;
print("statusCode :$statusCode"); print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {

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

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

@ -1,4 +1,4 @@
enum PatientType{ enum PatientType {
IN_PATIENT, IN_PATIENT,
OUT_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 { extension SelectedAuthMethodTypesService on AuthMethodTypes {
// ignore: missing_return // ignore: missing_return
int getTypeIdService() { int getTypeIdService() {
@ -18,12 +19,11 @@ extension SelectedAuthMethodTypesService on AuthMethodTypes {
case AuthMethodTypes.MoreOptions: case AuthMethodTypes.MoreOptions:
return 5; return 5;
break; break;
} }
} }
// ignore: missing_return // ignore: missing_return
static getMethodsTypeService( int typeId) { static getMethodsTypeService(int typeId) {
switch (typeId) { switch (typeId) {
case 1: case 1:
return AuthMethodTypes.SMS; return AuthMethodTypes.SMS;
@ -40,7 +40,6 @@ extension SelectedAuthMethodTypesService on AuthMethodTypes {
case 5: case 5:
return AuthMethodTypes.MoreOptions; return AuthMethodTypes.MoreOptions;
break; break;
} }
} }
} }

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

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

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

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

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

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

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

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

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

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

@ -26,29 +26,29 @@ class PharmacyPrescriptions {
PharmacyPrescriptions( PharmacyPrescriptions(
{this.expiryDate, {this.expiryDate,
this.sellingPrice, this.sellingPrice,
this.quantity, this.quantity,
this.itemID, this.itemID,
this.locationID, this.locationID,
this.projectID, this.projectID,
this.setupID, this.setupID,
this.locationDescription, this.locationDescription,
this.locationDescriptionN, this.locationDescriptionN,
this.itemDescription, this.itemDescription,
this.itemDescriptionN, this.itemDescriptionN,
this.alias, this.alias,
this.locationTypeID, this.locationTypeID,
this.barcode, this.barcode,
this.companybarcode, this.companybarcode,
this.cityID, this.cityID,
this.cityName, this.cityName,
this.distanceInKilometers, this.distanceInKilometers,
this.latitude, this.latitude,
this.locationType, this.locationType,
this.longitude, this.longitude,
this.phoneNumber, this.phoneNumber,
this.projectImageURL, this.projectImageURL,
this.sortOrder}); this.sortOrder});
PharmacyPrescriptions.fromJson(Map<String, dynamic> json) { PharmacyPrescriptions.fromJson(Map<String, dynamic> json) {
expiryDate = json['ExpiryDate']; expiryDate = json['ExpiryDate'];

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

@ -35,38 +35,38 @@ class PrescriptionReportEnh {
PrescriptionReportEnh( PrescriptionReportEnh(
{this.address, {this.address,
this.appodynamicmentNo, this.appodynamicmentNo,
this.clinic, this.clinic,
this.companyName, this.companyName,
this.days, this.days,
this.doctorName, this.doctorName,
this.doseDailyQuantity, this.doseDailyQuantity,
this.frequency, this.frequency,
this.frequencyNumber, this.frequencyNumber,
this.image, this.image,
this.imageExtension, this.imageExtension,
this.imageSRCUrl, this.imageSRCUrl,
this.imageString, this.imageString,
this.imageThumbUrl, this.imageThumbUrl,
this.isCovered, this.isCovered,
this.itemDescription, this.itemDescription,
this.itemID, this.itemID,
this.orderDate, this.orderDate,
this.patientID, this.patientID,
this.patientName, this.patientName,
this.phoneOffice1, this.phoneOffice1,
this.prescriptionQR, this.prescriptionQR,
this.prescriptionTimes, this.prescriptionTimes,
this.productImage, this.productImage,
this.productImageBase64, this.productImageBase64,
this.productImageString, this.productImageString,
this.projectID, this.projectID,
this.projectName, this.projectName,
this.remarks, this.remarks,
this.route, this.route,
this.sKU, this.sKU,
this.scaleOffset, this.scaleOffset,
this.startDate}); this.startDate});
PrescriptionReportEnh.fromJson(Map<String, dynamic> json) { PrescriptionReportEnh.fromJson(Map<String, dynamic> json) {
address = json['Address']; address = json['Address'];

@ -34,35 +34,35 @@ class PrescriptionsOrder {
PrescriptionsOrder( PrescriptionsOrder(
{this.iD, {this.iD,
this.patientID, this.patientID,
this.patientOutSA, this.patientOutSA,
this.isOutPatient, this.isOutPatient,
this.projectID, this.projectID,
this.nearestProjectID, this.nearestProjectID,
this.longitude, this.longitude,
this.latitude, this.latitude,
this.appointmentNo, this.appointmentNo,
this.dischargeID, this.dischargeID,
this.lineItemNo, this.lineItemNo,
this.status, this.status,
this.description, this.description,
this.descriptionN, this.descriptionN,
this.createdOn, this.createdOn,
this.serviceID, this.serviceID,
this.createdBy, this.createdBy,
this.editedOn, this.editedOn,
this.editedBy, this.editedBy,
this.channel, this.channel,
this.clientRequestID, this.clientRequestID,
this.returnedToQueue, this.returnedToQueue,
this.pickupDateTime, this.pickupDateTime,
this.pickupLocationName, this.pickupLocationName,
this.dropoffLocationName, this.dropoffLocationName,
this.realRRTHaveTransactions, this.realRRTHaveTransactions,
this.nearestProjectDescription, this.nearestProjectDescription,
this.nearestProjectDescriptionN, this.nearestProjectDescriptionN,
this.projectDescription, this.projectDescription,
this.projectDescriptionN}); this.projectDescriptionN});
PrescriptionsOrder.fromJson(Map<String, dynamic> json) { PrescriptionsOrder.fromJson(Map<String, dynamic> json) {
iD = json['ID']; iD = json['ID'];

@ -14,17 +14,17 @@ class RequestGetListPharmacyForPrescriptions {
RequestGetListPharmacyForPrescriptions( RequestGetListPharmacyForPrescriptions(
{this.latitude, {this.latitude,
this.longitude, this.longitude,
this.versionID, this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.itemID}); this.itemID});
RequestGetListPharmacyForPrescriptions.fromJson(Map<String, dynamic> json) { RequestGetListPharmacyForPrescriptions.fromJson(Map<String, dynamic> json) {
latitude = json['Latitude']; latitude = json['Latitude'];

@ -21,24 +21,24 @@ class RequestPrescriptionReport {
RequestPrescriptionReport( RequestPrescriptionReport(
{this.versionID, {this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.patientID, this.patientID,
this.tokenID, this.tokenID,
this.patientTypeID, this.patientTypeID,
this.patientType, this.patientType,
this.appointmentNo, this.appointmentNo,
this.setupID, this.setupID,
this.episodeID, this.episodeID,
this.clinicID, this.clinicID,
this.projectID, this.projectID,
this.dischargeNo}); this.dischargeNo});
RequestPrescriptionReport.fromJson(Map<String, dynamic> json) { RequestPrescriptionReport.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID']; versionID = json['VersionID'];

@ -21,23 +21,24 @@ class RequestPrescriptionReportEnh {
RequestPrescriptionReportEnh( RequestPrescriptionReportEnh(
{this.versionID, {this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.patientID, this.patientID,
this.tokenID, this.tokenID,
this.patientTypeID, this.patientTypeID,
this.patientType, this.patientType,
this.appointmentNo, this.appointmentNo,
this.setupID, this.setupID,
this.episodeID, this.episodeID,
this.clinicID, this.clinicID,
this.projectID,this.dischargeNo}); this.projectID,
this.dischargeNo});
RequestPrescriptionReportEnh.fromJson(Map<String, dynamic> json) { RequestPrescriptionReportEnh.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID']; versionID = json['VersionID'];

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -20,23 +20,23 @@ class RequestPatientLabSpecialResult {
RequestPatientLabSpecialResult( RequestPatientLabSpecialResult(
{this.invoiceNo, {this.invoiceNo,
this.orderNo, this.orderNo,
this.setupID, this.setupID,
this.projectID, this.projectID,
this.clinicID, this.clinicID,
this.versionID, this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.patientID, this.patientID,
this.tokenID, this.tokenID,
this.patientTypeID, this.patientTypeID,
this.patientType}); this.patientType});
RequestPatientLabSpecialResult.fromJson(Map<String, dynamic> json) { RequestPatientLabSpecialResult.fromJson(Map<String, dynamic> json) {
invoiceNo = json['InvoiceNo']; invoiceNo = json['InvoiceNo'];

@ -27,30 +27,30 @@ class RequestSendLabReportEmail {
RequestSendLabReportEmail( RequestSendLabReportEmail(
{this.versionID, {this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.patientID, this.patientID,
this.tokenID, this.tokenID,
this.patientTypeID, this.patientTypeID,
this.patientType, this.patientType,
this.to, this.to,
this.dateofBirth, this.dateofBirth,
this.patientIditificationNum, this.patientIditificationNum,
this.patientMobileNumber, this.patientMobileNumber,
this.patientName, this.patientName,
this.setupID, this.setupID,
this.projectName, this.projectName,
this.clinicName, this.clinicName,
this.doctorName, this.doctorName,
this.projectID, this.projectID,
this.invoiceNo, this.invoiceNo,
this.orderDate}); this.orderDate});
RequestSendLabReportEmail.fromJson(Map<String, dynamic> json) { RequestSendLabReportEmail.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID']; versionID = json['VersionID'];

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

@ -5,7 +5,8 @@ class AddPatientToDoctorListRequestModel {
int doctorId; int doctorId;
bool isOutKsa; 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) { AddPatientToDoctorListRequestModel.fromJson(Map<String, dynamic> json) {
vCID = json['VC_ID']; vCID = json['VC_ID'];

@ -5,7 +5,12 @@ class LiveCareUserLoginRequestModel {
int isOutKsa; int isOutKsa;
int isLogin; 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) { LiveCareUserLoginRequestModel.fromJson(Map<String, dynamic> json) {
tokenID = json['TokenID']; tokenID = json['TokenID'];

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

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

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

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

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

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

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

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

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

@ -22,25 +22,25 @@ class RequestPatientRadOrdersDetails {
RequestPatientRadOrdersDetails( RequestPatientRadOrdersDetails(
{this.projectID, {this.projectID,
this.orderNo, this.orderNo,
this.invoiceNo, this.invoiceNo,
this.setupID, this.setupID,
this.procedureID, this.procedureID,
this.isMedicalReport, this.isMedicalReport,
this.isCVI, this.isCVI,
this.versionID, this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.patientOutSA, this.patientOutSA,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.patientID, this.patientID,
this.tokenID, this.tokenID,
this.patientTypeID, this.patientTypeID,
this.patientType}); this.patientType});
RequestPatientRadOrdersDetails.fromJson(Map<String, dynamic> json) { RequestPatientRadOrdersDetails.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];

@ -28,31 +28,31 @@ class RequestSendRadReportEmail {
RequestSendRadReportEmail( RequestSendRadReportEmail(
{this.channel, {this.channel,
this.clinicName, this.clinicName,
this.dateofBirth, this.dateofBirth,
this.deviceTypeID, this.deviceTypeID,
this.doctorName, this.doctorName,
this.generalid, this.generalid,
this.invoiceNo, this.invoiceNo,
this.iPAdress, this.iPAdress,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.languageID, this.languageID,
this.orderDate, this.orderDate,
this.patientID, this.patientID,
this.patientIditificationNum, this.patientIditificationNum,
this.patientMobileNumber, this.patientMobileNumber,
this.patientName, this.patientName,
this.patientOutSA, this.patientOutSA,
this.patientType, this.patientType,
this.patientTypeID, this.patientTypeID,
this.projectID, this.projectID,
this.projectName, this.projectName,
this.radResult, this.radResult,
this.sessionID, this.sessionID,
this.setupID, this.setupID,
this.to, this.to,
this.tokenID, this.tokenID,
this.versionID}); this.versionID});
RequestSendRadReportEmail.fromJson(Map<String, dynamic> json) { RequestSendRadReportEmail.fromJson(Map<String, dynamic> json) {
channel = json['Channel']; channel = json['Channel'];

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

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

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

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

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

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

@ -6,7 +6,11 @@ class GetSickLeaveDoctorRequestModel {
String vidaRefreshTokenID; String vidaRefreshTokenID;
GetSickLeaveDoctorRequestModel( 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) { GetSickLeaveDoctorRequestModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];

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

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

@ -5,9 +5,11 @@ import 'package:flutter/cupertino.dart';
class AnalyticsService { class AnalyticsService {
final FirebaseAnalytics _analytics = FirebaseAnalytics(); 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: { await _analytics.logEvent(name: 'event', parameters: {
"eventCategory": eventCategory, "eventCategory": eventCategory,
"eventAction": eventAction, "eventAction": eventAction,

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

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

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

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

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

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

@ -1,12 +1,11 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.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/dashboard_model.dart';
import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_Model.dart';
class DashboardService extends BaseService { class DashboardService extends BaseService {
List<DashboardModel> _dashboardItemsList = []; List<DashboardModel> _dashboardItemsList = [];
List<DashboardModel> get dashboardItemsList => _dashboardItemsList;
List<DashboardModel> get dashboardItemsList => _dashboardItemsList;
bool hasVirtualClinic = false; bool hasVirtualClinic = false;
String sServiceID; String sServiceID;
@ -25,14 +24,13 @@ class DashboardService extends BaseService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, },
body: { body: {},
},
); );
} }
Future checkDoctorHasLiveCare() async { Future checkDoctorHasLiveCare() async {
hasError = false; hasError = false;
await getDoctorProfile(isGetProfile: true); await getDoctorProfile(isGetProfile: true);
await baseAppClient.post( await baseAppClient.post(
DOCTOR_CHECK_HAS_LIVE_CARE, DOCTOR_CHECK_HAS_LIVE_CARE,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
@ -44,9 +42,8 @@ class DashboardService extends BaseService {
super.error = error; super.error = error;
}, },
body: { 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/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/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/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/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/my_referral/my_referral_patient_model.dart';
import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
class DoctorReplyService extends BaseService { class DoctorReplyService extends BaseService {
List<ListGtMyPatientsQuestions> get listDoctorWorkingHoursTable => List<ListGtMyPatientsQuestions> get listDoctorWorkingHoursTable =>
_listDoctorWorkingHoursTable; _listDoctorWorkingHoursTable;
List<ListGtMyPatientsQuestions> get listDoctorNotRepliedQuestions => List<ListGtMyPatientsQuestions> get listDoctorNotRepliedQuestions =>
_listDoctorNotRepliedQuestions; _listDoctorNotRepliedQuestions;
List<ListGtMyPatientsQuestions> _listDoctorWorkingHoursTable = []; List<ListGtMyPatientsQuestions> _listDoctorWorkingHoursTable = [];
@ -27,20 +26,19 @@ class DoctorReplyService extends BaseService {
GT_MY_PATIENT_QUESTION, GT_MY_PATIENT_QUESTION,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
if (clearData) { if (clearData) {
if(isGettingNotReply) if (isGettingNotReply)
_listDoctorNotRepliedQuestions.clear(); _listDoctorNotRepliedQuestions.clear();
else else
_listDoctorWorkingHoursTable.clear(); _listDoctorWorkingHoursTable.clear();
} }
response['List_GtMyPatientsQuestions'].forEach((v) { response['List_GtMyPatientsQuestions'].forEach((v) {
if (isGettingNotReply)
if(isGettingNotReply) _listDoctorNotRepliedQuestions
_listDoctorNotRepliedQuestions.add(ListGtMyPatientsQuestions.fromJson(v)); .add(ListGtMyPatientsQuestions.fromJson(v));
else else
_listDoctorWorkingHoursTable _listDoctorWorkingHoursTable
.add(ListGtMyPatientsQuestions.fromJson(v)); .add(ListGtMyPatientsQuestions.fromJson(v));
}); });
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {

@ -7,7 +7,8 @@ class ScanQrService extends BaseService {
List<PatiantInformtion> myInPatientList = List(); List<PatiantInformtion> myInPatientList = List();
List<PatiantInformtion> inPatientList = List(); List<PatiantInformtion> inPatientList = List();
Future getInPatient(PatientSearchRequestModel requestModel, bool isMyInpatient) async { Future getInPatient(
PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false; hasError = false;
await getDoctorProfile(); 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'; import 'package:doctor_app_flutter/models/doctor/request_schedule.dart';
class ScheduleService extends BaseService { class ScheduleService extends BaseService {
List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable =>
List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable => _listDoctorWorkingHoursTable; _listDoctorWorkingHoursTable;
List<ListDoctorWorkingHoursTable> _listDoctorWorkingHoursTable = []; List<ListDoctorWorkingHoursTable> _listDoctorWorkingHoursTable = [];
RequestSchedule _requestSchedule = RequestSchedule(); RequestSchedule _requestSchedule = RequestSchedule();
Future getDoctorSchedule() async { Future getDoctorSchedule() async {
await baseAppClient.post(GET_DOCTOR_WORKING_HOURS_TABLE, await baseAppClient.post(GET_DOCTOR_WORKING_HOURS_TABLE,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_listDoctorWorkingHoursTable.clear(); _listDoctorWorkingHoursTable.clear();
response['List_DoctorWorkingHoursTable'].forEach((v) { response['List_DoctorWorkingHoursTable'].forEach((v) {
_listDoctorWorkingHoursTable _listDoctorWorkingHoursTable
.add(ListDoctorWorkingHoursTable.fromJson(v)); .add(ListDoctorWorkingHoursTable.fromJson(v));
@ -21,6 +21,6 @@ class ScheduleService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; 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'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class HospitalsService extends BaseService { class HospitalsService extends BaseService {
List<GetHospitalsResponseModel> hospitals = List();
List<GetHospitalsResponseModel> hospitals =List();
Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async { Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async {
hasError = false; hasError = false;

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

@ -12,19 +12,20 @@ class MyReferralInPatientService extends BaseService {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
MyReferralPatientRequestModel myReferralPatientRequestModel = MyReferralPatientRequestModel( MyReferralPatientRequestModel myReferralPatientRequestModel =
doctorID: doctorProfile.doctorID, MyReferralPatientRequestModel(
firstName: "0", doctorID: doctorProfile.doctorID,
middleName: "0", firstName: "0",
lastName: "0", middleName: "0",
patientMobileNumber: "0", lastName: "0",
patientIdentificationID: "0", patientMobileNumber: "0",
patientID: 0, patientIdentificationID: "0",
from: "0", patientID: 0,
to: "0", from: "0",
stamp: DateTime.now().toIso8601String(), to: "0",
isLoginForDoctorApp: true, stamp: DateTime.now().toIso8601String(),
patientTypeID: 1); isLoginForDoctorApp: true,
patientTypeID: 1);
myReferralPatients.clear(); myReferralPatients.clear();
await baseAppClient.post( await baseAppClient.post(
GET_MY_REFERRAL_INPATIENT, GET_MY_REFERRAL_INPATIENT,
@ -47,19 +48,20 @@ class MyReferralInPatientService extends BaseService {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
MyReferralPatientRequestModel myReferralPatientRequestModel = MyReferralPatientRequestModel( MyReferralPatientRequestModel myReferralPatientRequestModel =
doctorID: doctorProfile.doctorID, MyReferralPatientRequestModel(
firstName: "0", doctorID: doctorProfile.doctorID,
middleName: "0", firstName: "0",
lastName: "0", middleName: "0",
patientMobileNumber: "0", lastName: "0",
patientIdentificationID: "0", patientMobileNumber: "0",
patientID: 0, patientIdentificationID: "0",
from: "0", patientID: 0,
to: "0", from: "0",
stamp: DateTime.now().toIso8601String(), to: "0",
isLoginForDoctorApp: true, stamp: DateTime.now().toIso8601String(),
patientTypeID: 1); isLoginForDoctorApp: true,
patientTypeID: 1);
myReferralPatients.clear(); myReferralPatients.clear();
await baseAppClient.post( await baseAppClient.post(
GET_MY_REFERRAL_OUT_PATIENT, 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; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks(); RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks =
RequestAddReferredDoctorRemarks();
_requestAddReferredDoctorRemarks.projectID = referral.projectID; _requestAddReferredDoctorRemarks.projectID = referral.projectID;
_requestAddReferredDoctorRemarks.admissionNo = referral.admissionNo.toString(); _requestAddReferredDoctorRemarks.admissionNo =
referral.admissionNo.toString();
_requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo; _requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks; _requestAddReferredDoctorRemarks.referredDoctorRemarks =
referredDoctorRemarks;
_requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID; _requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID;
_requestAddReferredDoctorRemarks.patientID = referral.patientID; _requestAddReferredDoctorRemarks.patientID = referral.patientID;
_requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor; _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; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
AddReferredRemarksRequestModel _requestAddReferredDoctorRemarks = AddReferredRemarksRequestModel( AddReferredRemarksRequestModel _requestAddReferredDoctorRemarks =
editedBy: doctorProfile.doctorID, AddReferredRemarksRequestModel(
projectID: doctorProfile.projectID, editedBy: doctorProfile.doctorID,
referredDoctorRemarks: referredDoctorRemarks, projectID: doctorProfile.projectID,
referalStatus: referralStatus); referredDoctorRemarks: referredDoctorRemarks,
referalStatus: referralStatus);
_requestAddReferredDoctorRemarks.projectID = referral.projectID; _requestAddReferredDoctorRemarks.projectID = referral.projectID;
//TODO Check this in case out patient //TODO Check this in case out patient
_requestAddReferredDoctorRemarks.admissionNo = int.parse(referral.admissionNo); _requestAddReferredDoctorRemarks.admissionNo =
int.parse(referral.admissionNo);
_requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo; _requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks; _requestAddReferredDoctorRemarks.referredDoctorRemarks =
referredDoctorRemarks;
_requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID; _requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID;
_requestAddReferredDoctorRemarks.referalStatus = referralStatus; _requestAddReferredDoctorRemarks.referalStatus = referralStatus;

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

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

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

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

@ -8,10 +8,13 @@ import 'package:doctor_app_flutter/models/operation_report/get_reservations_requ
class OperationReportService extends BaseService { class OperationReportService extends BaseService {
List<GetReservationsResponseModel> _reservationList = []; List<GetReservationsResponseModel> _reservationList = [];
List<GetReservationsResponseModel> get reservationList => _reservationList; List<GetReservationsResponseModel> get reservationList => _reservationList;
List<GetOperationDetailsResponseModel> _operationDetailsList = []; List<GetOperationDetailsResponseModel> _operationDetailsList = [];
List<GetOperationDetailsResponseModel> get operationDetailsList => _operationDetailsList;
List<GetOperationDetailsResponseModel> get operationDetailsList =>
_operationDetailsList;
Future getReservations( Future getReservations(
{GetReservationsRequestModel getReservationsRequestModel, {GetReservationsRequestModel getReservationsRequestModel,
@ -35,10 +38,9 @@ class OperationReportService extends BaseService {
}, body: getReservationsRequestModel.toJson()); }, body: getReservationsRequestModel.toJson());
} }
Future getOperationReportDetails( Future getOperationReportDetails({
{GetOperationDetailsRequestModel getOperationReportRequestModel, GetOperationDetailsRequestModel getOperationReportRequestModel,
}) async { }) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_OPERATION_DETAILS, await baseAppClient.post(GET_OPERATION_DETAILS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
@ -46,7 +48,8 @@ class OperationReportService extends BaseService {
_operationDetailsList.clear(); _operationDetailsList.clear();
response['List_OperationDetails'].forEach( response['List_OperationDetails'].forEach(
(v) { (v) {
_operationDetailsList.add(GetOperationDetailsResponseModel.fromJson(v)); _operationDetailsList
.add(GetOperationDetailsResponseModel.fromJson(v));
}, },
); );
}, onFailure: (String error, int statusCode) { }, 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'; import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart';
class ReferralPatientService extends BaseService { class ReferralPatientService extends BaseService {
List<MyReferralPatientModel> _listMyReferralPatientModel = []; List<MyReferralPatientModel> _listMyReferralPatientModel = [];
List<MyReferralPatientModel> get listMyReferralPatientModel => _listMyReferralPatientModel;
List<MyReferralPatientModel> get listMyReferralPatientModel =>
_listMyReferralPatientModel;
RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel(); RequestMyReferralPatientModel _requestMyReferralPatient =
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks(); RequestMyReferralPatientModel();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks =
RequestAddReferredDoctorRemarks();
Future getMyReferralPatient() async { Future getMyReferralPatient() async {
await baseAppClient.post(GET_MY_REFERRAL_PATIENT, await baseAppClient.post(
onSuccess: (dynamic response, int statusCode) { GET_MY_REFERRAL_PATIENT,
_listMyReferralPatientModel.clear(); onSuccess: (dynamic response, int statusCode) {
response['List_MyReferralPatient'].forEach((v) { _listMyReferralPatientModel.clear();
listMyReferralPatientModel.add(MyReferralPatientModel.fromJson(v)); response['List_MyReferralPatient'].forEach((v) {
}); listMyReferralPatientModel.add(MyReferralPatientModel.fromJson(v));
print(response['List_MyReferralPatient']); });
}, onFailure: (String error, int statusCode) { print(response['List_MyReferralPatient']);
hasError = true; },
super.error = error; onFailure: (String error, int statusCode) {
}, body: _requestMyReferralPatient .toJson(),); hasError = true;
super.error = error;
},
body: _requestMyReferralPatient.toJson(),
);
} }
Future replay( Future replay(
String referredDoctorRemarks, MyReferralPatientModel model) async { String referredDoctorRemarks, MyReferralPatientModel model) async {
_requestAddReferredDoctorRemarks.admissionNo = model.admissionNo; _requestAddReferredDoctorRemarks.admissionNo = model.admissionNo;
_requestAddReferredDoctorRemarks.patientID = model.patientID; _requestAddReferredDoctorRemarks.patientID = model.patientID;
_requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks; _requestAddReferredDoctorRemarks.referredDoctorRemarks =
referredDoctorRemarks;
_requestAddReferredDoctorRemarks.lineItemNo = model.lineItemNo; _requestAddReferredDoctorRemarks.lineItemNo = model.lineItemNo;
_requestAddReferredDoctorRemarks.referringDoctor = model.referringDoctor; _requestAddReferredDoctorRemarks.referringDoctor = model.referringDoctor;
await baseAppClient.post(GET_MY_REFERRAL_PATIENT, await baseAppClient.post(
onSuccess: (dynamic response, int statusCode) { GET_MY_REFERRAL_PATIENT,
model.referredDoctorRemarks = referredDoctorRemarks; onSuccess: (dynamic response, int statusCode) {
listMyReferralPatientModel[ model.referredDoctorRemarks = referredDoctorRemarks;
listMyReferralPatientModel.indexOf(model)] = model; listMyReferralPatientModel[listMyReferralPatientModel.indexOf(model)] =
}, onFailure: (String error, int statusCode) { model;
hasError = true; },
super.error = error; onFailure: (String error, int statusCode) {
}, body: _requestMyReferralPatient .toJson(),); hasError = true;
super.error = error;
},
body: _requestMyReferralPatient.toJson(),
);
} }
} }

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save