Merge branch 'development' into video_stream_fix_bugs

merge-requests/750/head
mosazaid 5 years ago
commit 8d5f86e4f2

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -9,6 +9,7 @@ class PatientSearchRequestModel {
String from;
String to;
int searchType;
int projectID;
String mobileNo;
String identificationNo;
int nursingStationID;
@ -28,7 +29,7 @@ class PatientSearchRequestModel {
this.from = "0",
this.to = "0",
this.clinicID,
this.nursingStationID = 0});
this.nursingStationID = 0,this.projectID=0});
PatientSearchRequestModel.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID'];
@ -45,11 +46,12 @@ class PatientSearchRequestModel {
identificationNo = json['IdentificationNo'];
nursingStationID = json['NursingStationID'];
clinicID = json['ClinicID'];
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DoctorID'] = this.doctorID;
data['DoctorID'] = 0;
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
@ -63,7 +65,7 @@ class PatientSearchRequestModel {
data['IdentificationNo'] = this.identificationNo;
data['NursingStationID'] = this.nursingStationID;
data['ClinicID'] = this.clinicID;
data['ProjectID'] = 0;
data['ProjectID'] =this.projectID;
return data;
}
}

@ -13,7 +13,7 @@ class ScanQrViewModel extends BaseViewModel {
await getDoctorProfile();
setState(ViewState.Busy);
await _scanQrService.getInPatient(requestModel, true);
await _scanQrService.getInPatient(requestModel, isMyInpatient);
if (_scanQrService.hasError) {
error = _scanQrService.error;

@ -76,9 +76,6 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
}
_scanQrAndGetPatient(BuildContext context, ScanQrViewModel model) async {
/// When give qr we will change this method to get data
/// var result = await BarcodeScanner.scan();
/// int patientID = get from qr result
var result = await BarcodeScanner.scan();
if (result != "") {
List<String> listOfParams = result.split(',');
@ -86,9 +83,10 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
if (listOfParams[1].length != 0) patientID = int.parse(listOfParams[1]);
PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel(
patientID: patientID,
projectID: int.parse(listOfParams[0])
);
await model.getInPatientList(patientSearchRequestModel, isMyInpatient: true).then((d) {
await model.getInPatientList(patientSearchRequestModel, isMyInpatient: false).then((d) {
if (model.state != ViewState.ErrorLocal) {
if (model.inPatientList.isEmpty)
DrAppToastMsg.showErrorToast('No patient');

Loading…
Cancel
Save