Procedure template service

merge-requests/674/head
hussam al-habibeh 5 years ago
parent b0923779b7
commit 6b6243232c

@ -283,6 +283,9 @@ const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave";
const GET_MY_OUT_PATIENT =
"Services/DoctorApplication.svc/REST/GetMyOutPatient";
const GET_PROCEDURE_TEMPLETE =
'Services/Doctors.svc/REST/DAPP_ProcedureTemplateGet';
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************
@ -337,7 +340,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 6.0;
const VERSION_ID = 6.1;
const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -0,0 +1,120 @@
class ProcedureTempleteRequestModel {
int doctorID;
String firstName;
String middleName;
String lastName;
String patientMobileNumber;
String patientIdentificationID;
int patientID;
String from;
String to;
int searchType;
String mobileNo;
String identificationNo;
int editedBy;
int projectID;
int clinicID;
String tokenID;
int languageID;
String stamp;
String iPAdress;
double versionID;
int channel;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
String vidaAuthTokenID;
String vidaRefreshTokenID;
int deviceTypeID;
ProcedureTempleteRequestModel(
{this.doctorID,
this.firstName,
this.middleName,
this.lastName,
this.patientMobileNumber,
this.patientIdentificationID,
this.patientID,
this.from,
this.to,
this.searchType,
this.mobileNo,
this.identificationNo,
this.editedBy,
this.projectID,
this.clinicID,
this.tokenID,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA,
this.vidaAuthTokenID,
this.vidaRefreshTokenID,
this.deviceTypeID});
ProcedureTempleteRequestModel.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID'];
firstName = json['FirstName'];
middleName = json['MiddleName'];
lastName = json['LastName'];
patientMobileNumber = json['PatientMobileNumber'];
patientIdentificationID = json['PatientIdentificationID'];
patientID = json['PatientID'];
from = json['From'];
to = json['To'];
searchType = json['SearchType'];
mobileNo = json['MobileNo'];
identificationNo = json['IdentificationNo'];
editedBy = json['EditedBy'];
projectID = json['ProjectID'];
clinicID = json['ClinicID'];
tokenID = json['TokenID'];
languageID = json['LanguageID'];
stamp = json['stamp'];
iPAdress = json['IPAdress'];
versionID = json['VersionID'];
channel = json['Channel'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
vidaAuthTokenID = json['VidaAuthTokenID'];
vidaRefreshTokenID = json['VidaRefreshTokenID'];
deviceTypeID = json['DeviceTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DoctorID'] = this.doctorID;
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
data['PatientMobileNumber'] = this.patientMobileNumber;
data['PatientIdentificationID'] = this.patientIdentificationID;
data['PatientID'] = this.patientID;
data['From'] = this.from;
data['To'] = this.to;
data['SearchType'] = this.searchType;
data['MobileNo'] = this.mobileNo;
data['IdentificationNo'] = this.identificationNo;
data['EditedBy'] = this.editedBy;
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['TokenID'] = this.tokenID;
data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['VidaRefreshTokenID'] = this.vidaRefreshTokenID;
data['DeviceTypeID'] = this.deviceTypeID;
return data;
}
}

@ -0,0 +1,56 @@
class ProcedureTempleteModel {
String setupID;
int projectID;
int clinicID;
int doctorID;
int templateID;
String templateName;
bool isActive;
int createdBy;
String createdOn;
dynamic editedBy;
dynamic editedOn;
ProcedureTempleteModel(
{this.setupID,
this.projectID,
this.clinicID,
this.doctorID,
this.templateID,
this.templateName,
this.isActive,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn});
ProcedureTempleteModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
clinicID = json['ClinicID'];
doctorID = json['DoctorID'];
templateID = json['TemplateID'];
templateName = json['TemplateName'];
isActive = json['IsActive'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID;
data['TemplateID'] = this.templateID;
data['TemplateName'] = this.templateName;
data['IsActive'] = this.isActive;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedOn'] = this.editedOn;
return data;
}
}

@ -1,9 +1,11 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/procedure/Procedure_template_request_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_request_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/procedure_templateModel.dart';
import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_request_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/update_procedure_request_model.dart';
@ -19,9 +21,15 @@ class ProcedureService extends BaseService {
List<Procedures> procedureslist = List();
List<dynamic> categoryList = [];
List<ProcedureTempleteModel> _templateList = List();
List<ProcedureTempleteModel> get templateList => _templateList;
GetOrderedProcedureRequestModel _getOrderedProcedureRequestModel =
GetOrderedProcedureRequestModel();
ProcedureTempleteRequestModel _procedureTempleteRequestModel =
ProcedureTempleteRequestModel();
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
// clinicId: 17,
// pageSize: 10,
@ -46,6 +54,24 @@ class ProcedureService extends BaseService {
//search: ["DENTAL"],
);
Future getProcedureTemplate(
{int doctorId, int projectId, int clinicId}) async {
_procedureTempleteRequestModel = ProcedureTempleteRequestModel();
hasError = false;
//insuranceApprovalInPatient.clear();
await baseAppClient.post(GET_PROCEDURE_TEMPLETE,
onSuccess: (dynamic response, int statusCode) {
//prescriptionsList.clear();
response['HIS_ProcedureTemplateList'].forEach((template) {
_templateList.add(ProcedureTempleteModel.fromJson(template));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}
Future getProcedure({int mrn}) async {
_getOrderedProcedureRequestModel =
GetOrderedProcedureRequestModel(patientMRN: mrn);

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.da
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/procedure_templateModel.dart';
import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_request_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/update_procedure_request_model.dart';
@ -48,6 +49,8 @@ class ProcedureViewModel extends BaseViewModel {
List<LabOrderResult> get labOrdersResultsList =>
_labsService.labOrdersResultsList;
List<ProcedureTempleteModel> get ProcedureTemplate =>
_procedureService.templateList;
List<PatientLabOrdersList> _patientLabOrdersListClinic = List();
List<PatientLabOrdersList> _patientLabOrdersListHospital = List();
@ -92,6 +95,18 @@ class ProcedureViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getProcedureTemplate() async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _procedureService.getProcedureTemplate();
if (_procedureService.hasError) {
error = _procedureService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future postProcedure(
PostProcedureReqModel postProcedureReqModel, int mrn) async {
hasError = false;

@ -573,7 +573,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
version: "0.6.3-nullsafety.1"
json_annotation:
dependency: transitive
description:
@ -615,7 +615,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.4"
mime:
dependency: transitive
description:
@ -907,7 +907,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
sticky_headers:
dependency: "direct main"
description:
@ -1098,5 +1098,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0 <2.11.0"
dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save