Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into in_patient_services

 Conflicts:
	lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart
merge-requests/540/head
hussam al-habibeh 5 years ago
commit e3102b3f5e

@ -252,6 +252,8 @@ const SEND_PRESCRIPTION_EMAIL =
const GET_PRESCRIPTION_REPORT_ENH = const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh'; 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient";
const CREATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient";
const GET_PRESCRIPTION_IN_PATIENT = const GET_PRESCRIPTION_IN_PATIENT =
'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient'; 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient';

@ -47,10 +47,10 @@ class LabResult {
lineItemNo = json['LineItemNo']; lineItemNo = json['LineItemNo'];
maleInterpretativeData = json['MaleInterpretativeData']; maleInterpretativeData = json['MaleInterpretativeData'];
notes = json['Notes']; notes = json['Notes'];
packageID = json['PackageID']; packageID = json['PackageID'].toString();
patientID = json['PatientID']; patientID = json['PatientID'];
projectID = json['ProjectID']; projectID = json['ProjectID'].toString();
referanceRange = json['ReferanceRange']; referanceRange = json['ReferenceRange'] ?? json['ReferanceRange'];
resultValue = json['ResultValue']; resultValue = json['ResultValue'];
sampleCollectedOn = json['SampleCollectedOn']; sampleCollectedOn = json['SampleCollectedOn'];
sampleReceivedOn = json['SampleReceivedOn']; sampleReceivedOn = json['SampleReceivedOn'];

@ -85,7 +85,7 @@ class PatientLabOrders {
doctorTitle = json['DoctorTitle']; doctorTitle = json['DoctorTitle'];
gender = json['Gender']; gender = json['Gender'];
genderDescription = json['GenderDescription']; genderDescription = json['GenderDescription'];
invoiceNo = json['InvoiceNo']; invoiceNo = json['InvoiceNo'].toString();
isActiveDoctorProfile = json['IsActiveDoctorProfile']; isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor']; isExecludeDoctor = json['IsExecludeDoctor'];
@ -96,9 +96,9 @@ class PatientLabOrders {
nationalityFlagURL = json['NationalityFlagURL']; nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate']; noOfPatientsRate = json['NoOfPatientsRate'];
orderDate = DateUtils.convertStringToDate(json['OrderDate']); orderDate = DateUtils.convertStringToDate(json['OrderDate']);
orderNo = json['OrderNo']; orderNo = json['OrderNo'].toString();
patientID = json['PatientID']; patientID = json['PatientID'].toString();
projectID = json['ProjectID']; projectID = json['ProjectID'].toString();
projectName = json['ProjectName']; projectName = json['ProjectName'];
projectNameN = json['ProjectNameN']; projectNameN = json['ProjectNameN'];
qR = json['QR']; qR = json['QR'];

@ -65,7 +65,7 @@ class RequestPatientLabSpecialResult {
data['OrderNo'] = this.orderNo; data['OrderNo'] = this.orderNo;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID ?? 0;
data['VersionID'] = this.versionID; data['VersionID'] = this.versionID;
data['Channel'] = this.channel; data['Channel'] = this.channel;
data['LanguageID'] = this.languageID; data['LanguageID'] = this.languageID;

@ -0,0 +1,88 @@
class CreateNoteModel {
int visitType;
int admissionNo;
int projectID;
int patientTypeID;
int patientID;
int clinicID;
String notes;
int createdBy;
int editedBy;
String nursingRemarks;
int languageID;
String stamp;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
CreateNoteModel(
{this.visitType,
this.admissionNo,
this.projectID,
this.patientTypeID,
this.patientID,
this.clinicID,
this.notes,
this.createdBy,
this.editedBy,
this.nursingRemarks,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA});
CreateNoteModel.fromJson(Map<String, dynamic> json) {
visitType = json['VisitType'];
admissionNo = json['AdmissionNo'];
projectID = json['ProjectID'];
patientTypeID = json['PatientTypeID'];
patientID = json['PatientID'];
clinicID = json['ClinicID'];
notes = json['Notes'];
createdBy = json['CreatedBy'];
editedBy = json['EditedBy'];
nursingRemarks = json['NursingRemarks'];
languageID = json['LanguageID'];
stamp = json['stamp'];
iPAdress = json['IPAdress'];
versionID = json['VersionID'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VisitType'] = this.visitType;
data['AdmissionNo'] = this.admissionNo;
data['ProjectID'] = this.projectID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientID'] = this.patientID;
data['ClinicID'] = this.clinicID;
data['Notes'] = this.notes;
data['CreatedBy'] = this.createdBy;
data['EditedBy'] = this.editedBy;
data['NursingRemarks'] = this.nursingRemarks;
data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
return data;
}
}

@ -0,0 +1,92 @@
class NoteModel {
String setupID;
int projectID;
int patientID;
int patientType;
String admissionNo;
int lineItemNo;
int visitType;
String notes;
String assessmentDate;
String visitTime;
int status;
String nursingRemarks;
String createdOn;
String editedOn;
int createdBy;
int admissionClinicID;
String admissionClinicName;
Null doctorClinicName;
String doctorName;
String visitTypeDesc;
NoteModel(
{this.setupID,
this.projectID,
this.patientID,
this.patientType,
this.admissionNo,
this.lineItemNo,
this.visitType,
this.notes,
this.assessmentDate,
this.visitTime,
this.status,
this.nursingRemarks,
this.createdOn,
this.editedOn,
this.createdBy,
this.admissionClinicID,
this.admissionClinicName,
this.doctorClinicName,
this.doctorName,
this.visitTypeDesc});
NoteModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
patientType = json['PatientType'];
admissionNo = json['AdmissionNo'];
lineItemNo = json['LineItemNo'];
visitType = json['VisitType'];
notes = json['Notes'];
assessmentDate = json['AssessmentDate'];
visitTime = json['VisitTime'];
status = json['Status'];
nursingRemarks = json['NursingRemarks'];
createdOn = json['CreatedOn'];
editedOn = json['EditedOn'];
createdBy = json['CreatedBy'];
admissionClinicID = json['AdmissionClinicID'];
admissionClinicName = json['AdmissionClinicName'];
doctorClinicName = json['DoctorClinicName'];
doctorName = json['DoctorName'];
visitTypeDesc = json['VisitTypeDesc'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['PatientType'] = this.patientType;
data['AdmissionNo'] = this.admissionNo;
data['LineItemNo'] = this.lineItemNo;
data['VisitType'] = this.visitType;
data['Notes'] = this.notes;
data['AssessmentDate'] = this.assessmentDate;
data['VisitTime'] = this.visitTime;
data['Status'] = this.status;
data['NursingRemarks'] = this.nursingRemarks;
data['CreatedOn'] = this.createdOn;
data['EditedOn'] = this.editedOn;
data['CreatedBy'] = this.createdBy;
data['AdmissionClinicID'] = this.admissionClinicID;
data['AdmissionClinicName'] = this.admissionClinicName;
data['DoctorClinicName'] = this.doctorClinicName;
data['DoctorName'] = this.doctorName;
data['VisitTypeDesc'] = this.visitTypeDesc;
return data;
}
}

@ -0,0 +1,80 @@
class UpdateNoteReqModel {
int projectID;
int createdBy;
int admissionNo;
int lineItemNo;
String notes;
bool verifiedNote;
bool cancelledNote;
int languageID;
String stamp;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
int patientTypeID;
UpdateNoteReqModel(
{this.projectID,
this.createdBy,
this.admissionNo,
this.lineItemNo,
this.notes,
this.verifiedNote,
this.cancelledNote,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA,
this.patientTypeID});
UpdateNoteReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
createdBy = json['CreatedBy'];
admissionNo = json['AdmissionNo'];
lineItemNo = json['LineItemNo'];
notes = json['Notes'];
verifiedNote = json['VerifiedNote'];
cancelledNote = json['CancelledNote'];
languageID = json['LanguageID'];
stamp = json['stamp'];
iPAdress = json['IPAdress'];
versionID = json['VersionID'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['CreatedBy'] = this.createdBy;
data['AdmissionNo'] = this.admissionNo;
data['LineItemNo'] = this.lineItemNo;
data['Notes'] = this.notes;
data['VerifiedNote'] = this.verifiedNote;
data['CancelledNote'] = this.cancelledNote;
data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID;
return data;
}
}

@ -12,16 +12,30 @@ import 'base/base_service.dart';
class LabsService extends BaseService { class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List(); List<PatientLabOrders> patientLabOrdersList = List();
Future getPatientLabOrdersList(PatiantInformtion patient) async { Future getPatientLabOrdersList(
PatiantInformtion patient, bool isArrived) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; String url = "";
await baseAppClient.postPatient(GET_Patient_LAB_ORDERS, patient: patient, if (isArrived) {
body['isDentalAllowedBackend'] = false;
url = GET_Patient_LAB_ORDERS;
} else {
url = GET_PATIENT_LAB_OREDERS;
}
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList.clear(); patientLabOrdersList.clear();
response['ListPLO'].forEach((hospital) { if (isArrived) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); response['ListPLO'].forEach((hospital) {
}); patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
});
} else {
response['List_GetLabOreders'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
});
}
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -40,42 +54,65 @@ class LabsService extends BaseService {
int clinicID, int clinicID,
String invoiceNo, String invoiceNo,
String orderNo, String orderNo,
PatiantInformtion patient}) async { PatiantInformtion patient,
bool isInpatient = false}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map();
_requestPatientLabSpecialResult.projectID = projectID; _requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID; _requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = invoiceNo; _requestPatientLabSpecialResult.invoiceNo = invoiceNo;
_requestPatientLabSpecialResult.orderNo = orderNo; _requestPatientLabSpecialResult.orderNo = orderNo;
body = _requestPatientLabSpecialResult.toJson();
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, patient: patient,
patient: patient, onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear(); patientLabSpecialResult.clear();
response['ListPLSR'].forEach((hospital) { response['ListPLSR'].forEach((hospital) {
patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital)); patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestPatientLabSpecialResult.toJson()); }, body: body);
} }
Future getPatientLabResult( Future getPatientLabResult(
{PatientLabOrders patientLabOrder, PatiantInformtion patient}) async { {PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async {
hasError = false; hasError = false;
String url = "";
if (isInpatient) {
url = GET_PATIENT_LAB_RESULTS;
} else {
url = GET_Patient_LAB_RESULT;
}
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo; body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo; body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID; body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID; body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID; body['ClinicID'] = patientLabOrder.clinicID ?? 0;
await baseAppClient.postPatient(GET_Patient_LAB_RESULT, patient: patient,
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear(); patientLabSpecialResult.clear();
labResultList.clear(); labResultList.clear();
response['ListPLR'].forEach((lab) {
labResultList.add(LabResult.fromJson(lab)); if(isInpatient){
}); response['List_GetLabNormal'].forEach((hospital) {
labResultList.add(LabResult.fromJson(hospital));
});
}else {
response['ListPLR'].forEach((lab) {
labResultList.add(LabResult.fromJson(lab));
});
}
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -1,6 +1,9 @@
import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.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/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/doctor/request_schedule.dart'; import 'package:doctor_app_flutter/models/doctor/request_schedule.dart';
@ -51,9 +54,9 @@ class PatientService extends BaseService {
List<LabResult> get labResultList => _labResultList; List<LabResult> get labResultList => _labResultList;
// TODO: replace var with model // TODO: replace var with model
var _patientProgressNoteList = []; List<NoteModel> _patientProgressNoteList = [];
get patientProgressNoteList => _patientProgressNoteList; List<NoteModel> get patientProgressNoteList => _patientProgressNoteList;
// TODO: replace var with model // TODO: replace var with model
var _insuranceApporvalsList = []; var _insuranceApporvalsList = [];
@ -277,7 +280,10 @@ class PatientService extends BaseService {
PATIENT_PROGRESS_NOTE_URL, PATIENT_PROGRESS_NOTE_URL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_patientProgressNoteList = []; _patientProgressNoteList = [];
_patientProgressNoteList = response['List_GetPregressNoteForInPatient']; // _patientProgressNoteList =
response['List_GetPregressNoteForInPatient'].forEach((v) {
_patientProgressNoteList.add(new NoteModel.fromJson(v));
});
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -287,6 +293,39 @@ class PatientService extends BaseService {
); );
} }
Future updatePatientProgressNote(UpdateNoteReqModel req) async {
hasError = false;
await baseAppClient.post(
UPDATE_PROGRESS_NOTE_FOR_INPATIENT,
onSuccess: (dynamic response, int statusCode) {
print("ok");
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: req.toJson(),
);
}
Future createPatientProgressNote(CreateNoteModel req) async {
hasError = false;
await baseAppClient.post(
CREATE_PROGRESS_NOTE_FOR_INPATIENT,
onSuccess: (dynamic response, int statusCode) {
print("ok");
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: req.toJson(),
);
}
Future getClinicsList() async { Future getClinicsList() async {
hasError = false; hasError = false;

@ -28,7 +28,7 @@ class LabsViewModel extends BaseViewModel {
void getLabs(PatiantInformtion patient) async { void getLabs(PatiantInformtion patient) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabOrdersList(patient); await _labsService.getPatientLabOrdersList(patient, true);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -89,7 +89,6 @@ class LabsViewModel extends BaseViewModel {
List<LabResultList> labResultLists = List(); List<LabResultList> labResultLists = List();
List<LabResultList> get labResultListsCoustom { List<LabResultList> get labResultListsCoustom {
return labResultLists; return labResultLists;
} }
@ -98,14 +97,16 @@ class LabsViewModel extends BaseViewModel {
int clinicID, int clinicID,
String invoiceNo, String invoiceNo,
String orderNo, String orderNo,
PatiantInformtion patient}) async { PatiantInformtion patient,
bool isInpatient}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getLaboratoryResult( await _labsService.getLaboratoryResult(
invoiceNo: invoiceNo, invoiceNo: invoiceNo,
orderNo: orderNo, orderNo: orderNo,
projectID: projectID, projectID: projectID,
clinicID: clinicID, clinicID: clinicID,
patient: patient); patient: patient,
isInpatient: isInpatient);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -114,9 +115,11 @@ class LabsViewModel extends BaseViewModel {
} }
} }
getPatientLabResult({PatientLabOrders patientLabOrder,PatiantInformtion patient}) async { getPatientLabResult(
{PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder,patient: patient); await _labsService.getPatientLabResult(
patientLabOrder: patientLabOrder, patient: patient, isInpatient: isInpatient);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -149,10 +152,14 @@ class LabsViewModel extends BaseViewModel {
} }
getPatientLabOrdersResults( getPatientLabOrdersResults(
{PatientLabOrders patientLabOrder, String procedure,PatiantInformtion patient}) async { {PatientLabOrders patientLabOrder,
String procedure,
PatiantInformtion patient}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabOrdersResults( await _labsService.getPatientLabOrdersResults(
patientLabOrder: patientLabOrder, procedure: procedure,patient: patient); patientLabOrder: patientLabOrder,
procedure: procedure,
patient: patient);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -1,4 +1,7 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/service/patient_service.dart'; import 'package:doctor_app_flutter/core/service/patient_service.dart';
import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart'; import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart';
import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart'; import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart';
@ -39,7 +42,7 @@ class PatientViewModel extends BaseViewModel {
get insuranceApporvalsList => _patientService.insuranceApporvalsList; get insuranceApporvalsList => _patientService.insuranceApporvalsList;
get patientProgressNoteList => _patientService.patientProgressNoteList; List<NoteModel> get patientProgressNoteList => _patientService.patientProgressNoteList;
List<dynamic> get clinicsList => _patientService.clinicsList; List<dynamic> get clinicsList => _patientService.clinicsList;
@ -146,6 +149,26 @@ class PatientViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future updatePatientProgressNote(UpdateNoteReqModel req) async {
setState(ViewState.BusyLocal);
await _patientService.updatePatientProgressNote(req);
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future createPatientProgressNote(CreateNoteModel req) async {
setState(ViewState.BusyLocal);
await _patientService.createPatientProgressNote(req);
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future getClinicsList() async { Future getClinicsList() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _patientService.getClinicsList(); await _patientService.getClinicsList();

@ -228,7 +228,7 @@ class ProcedureViewModel extends BaseViewModel {
void getLabs(PatiantInformtion patient,{bool isArrived}) async { void getLabs(PatiantInformtion patient,{bool isArrived}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabOrdersList(patient); await _labsService.getPatientLabOrdersList(patient, isArrived);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
if(isArrived) if(isArrived)

@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/screens/patients/insurance_approval_screen_pa
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/progress_note_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/note/progress_note_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart';
@ -17,7 +17,7 @@ import './screens/auth/login_screen.dart';
import './screens/auth/verification_methods_screen.dart'; import './screens/auth/verification_methods_screen.dart';
import './screens/patients/patients_screen.dart'; import './screens/patients/patients_screen.dart';
import './screens/patients/profile/patient_profile_screen.dart'; import './screens/patients/profile/patient_profile_screen.dart';
import './screens/patients/profile/progress_note_screen.dart'; import 'screens/patients/profile/note/progress_note_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart'; import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart';
import 'landing_page.dart'; import 'landing_page.dart';
import 'screens/patients/profile/admission-request/admission-request-first-screen.dart'; import 'screens/patients/profile/admission-request/admission-request-first-screen.dart';
@ -36,6 +36,8 @@ const String PATIENTS_PROFILE = 'patients/patients-profile';
const String LAB_RESULT = 'patients/lab_result'; const String LAB_RESULT = 'patients/lab_result';
const String MEDICAL_FILE = 'patients/radiology'; const String MEDICAL_FILE = 'patients/radiology';
const String PROGRESS_NOTE = 'patients/progress-note'; const String PROGRESS_NOTE = 'patients/progress-note';
const String ORDER_NOTE = 'patients/order-note';
const String MY_REFERRAL_DETAIL = 'my_referral_detail'; const String MY_REFERRAL_DETAIL = 'my_referral_detail';
const String REFER_PATIENT_TO_DOCTOR = 'patients/refer-to-doctor'; const String REFER_PATIENT_TO_DOCTOR = 'patients/refer-to-doctor';
const String PATIENT_INSURANCE_APPROVALS_NEW = const String PATIENT_INSURANCE_APPROVALS_NEW =
@ -65,7 +67,8 @@ var routes = {
PATIENTS_PROFILE: (_) => PatientProfileScreen(), PATIENTS_PROFILE: (_) => PatientProfileScreen(),
LAB_RESULT: (_) => LabsHomePage(), LAB_RESULT: (_) => LabsHomePage(),
MEDICAL_FILE: (_) => MedicalFilePage(), MEDICAL_FILE: (_) => MedicalFilePage(),
PROGRESS_NOTE: (_) => ProgressNoteScreen(), PROGRESS_NOTE: (_) => ProgressNoteScreen(visitType: 5,),
ORDER_NOTE: (_) => ProgressNoteScreen(visitType: 3,),
REFER_PATIENT_TO_DOCTOR: (_) => PatientMakeReferralScreen(), REFER_PATIENT_TO_DOCTOR: (_) => PatientMakeReferralScreen(),
PATIENT_INSURANCE_APPROVALS_NEW: (_) => InsuranceApprovalScreenNew(), PATIENT_INSURANCE_APPROVALS_NEW: (_) => InsuranceApprovalScreenNew(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(), VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),

@ -93,7 +93,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
}); });
Navigator.of(context).pushNamed(PATIENTS, arguments: { Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues, "patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType, "selectedType": isView == false ? '0' : _selectedType,
"isSearch": true, "isSearch": true,
"isView": isView "isView": isView
}); });

@ -21,6 +21,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
@ -394,20 +395,51 @@ class _PatientsScreenState extends State<PatientsScreen> {
children: [ children: [
Column(children: <Widget>[ Column(children: <Widget>[
SizedBox(height: 18.5), SizedBox(height: 18.5),
Container( Container(
width: SizeConfig.screenWidth * 0.9, decoration: BoxDecoration(
height: SizeConfig.screenHeight * 0.08, borderRadius:
child: TextField( BorderRadius.all(Radius.circular(6.0)),
controller: _controller, border: Border.all(
onChanged: (String str) { width: 1.0,
this.searchData(str); color: HexColor("#CCCCCC"),
}, ),
decoration: buildInputDecoration( color: Colors.white),
context, child: Column(
TranslationBase.of(context) crossAxisAlignment:
.searchPatientName), CrossAxisAlignment.start,
), children: [
), Padding(
padding: EdgeInsets.only(
left: 10, top: 10),
child: AppText(
TranslationBase.of(context)
.selectYourProject,
fontWeight: FontWeight.w600,
)),
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white,
suffixIcon: Icons.arrow_drop_down,
onTap: () {},
)
])),
// Container(
// width: SizeConfig.screenWidth * 0.9,
// height: SizeConfig.screenHeight * 0.08,
// child: TextField(
// controller: _controller,
// onChanged: (String str) {
// this.searchData(str);
// },
// decoration: buildInputDecoration(
// context,
// TranslationBase.of(context)
// .searchPatientName),
// ),
// ),
SizedBox( SizedBox(
height: 10.0, height: 10.0,
), ),
@ -484,21 +516,65 @@ class _PatientsScreenState extends State<PatientsScreen> {
: Column( : Column(
children: <Widget>[ children: <Widget>[
SizedBox(height: 18.5), SizedBox(height: 18.5),
Container( Container(
width: SizeConfig.screenWidth * 0.9, width: SizeConfig.screenWidth * 0.9,
height: height: 75,
SizeConfig.screenHeight * 0.08, decoration: BoxDecoration(
child: TextField( borderRadius: BorderRadius.all(
controller: _controller, Radius.circular(6.0)),
onChanged: (String str) { border: Border.all(
this.searchData(str); width: 1.0,
}, color: HexColor("#CCCCCC"),
decoration: buildInputDecoration( ),
context, color: Colors.white),
TranslationBase.of(context) child: Column(
.searchPatientName), crossAxisAlignment:
), CrossAxisAlignment.start,
), children: [
Padding(
padding: EdgeInsets.only(
left: 10, top: 10),
child: AppText(
TranslationBase.of(
context)
.searchPatientName,
fontWeight:
FontWeight.bold,
)),
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
DoctorApp.filter_1,
color: Colors.black,
),
iconSize: 20,
padding:
EdgeInsets.only(
bottom: 30),
),
onChanged: (String str) {
this.searchData(str);
}),
])),
// Container(
// width: SizeConfig.screenWidth * 0.9,
// height:
// SizeConfig.screenHeight * 0.08,
// child: TextField(
// controller: _controller,
// onChanged: (String str) {
// this.searchData(str);
// },
// decoration: buildInputDecoration(
// context,
// TranslationBase.of(context)
// .searchPatientName),
// ),
// ),
SizedBox( SizedBox(
height: 10.0, height: 10.0,
), ),
@ -696,28 +772,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
}); });
} }
InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration(
suffixIcon: IconButton(
icon: Icon(DoctorApp.search_patient),
color: Colors.grey,
onPressed: () {},
iconSize: 30,
),
filled: true,
fillColor: Colors.white,
hintText: hint,
hintStyle: TextStyle(fontSize: 1.66 * SizeConfig.textMultiplier),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: HexColor('#CCCCCC')),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.grey), //),
));
}
Widget _locationBar(BuildContext _context, model) { Widget _locationBar(BuildContext _context, model) {
return Container( return Container(
height: MediaQuery.of(context).size.height * 0.0619, height: MediaQuery.of(context).size.height * 0.0619,

@ -11,15 +11,23 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class LabResultWidget extends StatelessWidget { class LabResultWidget extends StatelessWidget {
final String filterName; final String filterName;
final List<LabResult> patientLabResultList; final List<LabResult> patientLabResultList;
final PatientLabOrders patientLabOrder; final PatientLabOrders patientLabOrder;
final PatiantInformtion patient; final PatiantInformtion patient;
LabResultWidget({Key key, this.filterName, this.patientLabResultList, this.patientLabOrder, this.patient}) : super(key: key); final bool isInpatient;
LabResultWidget(
{Key key,
this.filterName,
this.patientLabResultList,
this.patientLabOrder,
this.patient,
this.isInpatient})
: super(key: key);
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
@ -29,31 +37,32 @@ class LabResultWidget extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row( if (!isInpatient)
mainAxisAlignment: MainAxisAlignment.spaceBetween, Row(
children: [ mainAxisAlignment: MainAxisAlignment.spaceBetween,
AppText(filterName), children: [
InkWell( AppText(filterName),
onTap: () { InkWell(
Navigator.push( onTap: () {
context, Navigator.push(
FadePage( context,
page: FlowChartPage( FadePage(
filterName: filterName, page: FlowChartPage(
patientLabOrder: patientLabOrder, filterName: filterName,
patient: patient, patientLabOrder: patientLabOrder,
patient: patient,
),
), ),
), );
); },
}, child: AppText(
child: AppText( TranslationBase.of(context).showMoreBtn,
TranslationBase.of(context).showMoreBtn, textDecoration: TextDecoration.underline,
textDecoration: TextDecoration.underline, color: Colors.blue,
color: Colors.blue, ),
), ),
), ],
], ),
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -61,7 +70,8 @@ class LabResultWidget extends StatelessWidget {
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).description, TranslationBase.of(context).description,
color: Colors.black,bold: true, color: Colors.black,
bold: true,
), ),
), ),
), ),
@ -69,68 +79,87 @@ class LabResultWidget extends StatelessWidget {
Expanded( Expanded(
child: Container( child: Container(
child: Center( child: Center(
child: AppText(TranslationBase.of(context).value, color: Colors.black,bold: true,), child: AppText(
TranslationBase.of(context).value,
color: Colors.black,
bold: true,
),
), ),
), ),
), ),
Expanded( Expanded(
child: Container( child: Container(
child: Center( child: Center(
child: AppText(TranslationBase.of(context).range, color: Colors.black,bold: true,), child: AppText(
TranslationBase.of(context).range,
color: Colors.black,
bold: true,
),
), ),
), ),
) )
], ],
), ),
SizedBox(height: 7,), SizedBox(
Divider(color: Colors.black,thickness: 1,), height: 7,
SizedBox(height: 12,), ),
...List.generate(patientLabResultList.length, (index) => Column( Divider(
children: [ color: Colors.black,
Row( thickness: 1,
children: [ ),
Expanded( SizedBox(
child: Container( height: 12,
padding: EdgeInsets.all(10), ),
color: Colors.white, ...List.generate(
child: Center( patientLabResultList.length,
child: AppText( (index) => Column(
'${patientLabResultList[index].testCode}\n'+ children: [
patientLabResultList[index].description, Row(
textAlign: TextAlign.center, children: [
), Expanded(
), child: Container(
), padding: EdgeInsets.all(10),
), color: Colors.white,
Expanded( child: Center(
child: Container( child: AppText(
padding: EdgeInsets.all(10), '${patientLabResultList[index].testCode}\n' +
color: Colors.white, patientLabResultList[index].description,
child: Center( textAlign: TextAlign.center,
child: AppText( ),
patientLabResultList[index].resultValue+" "+patientLabResultList[index].uOM, ),
textAlign: TextAlign.center, ),
), ),
), Expanded(
), child: Container(
), padding: EdgeInsets.all(10),
Expanded( color: Colors.white,
child: Container( child: Center(
padding: EdgeInsets.all(10), child: AppText(
color: Colors.white, patientLabResultList[index].resultValue +
child: Center( " " +
child: AppText( "${patientLabResultList[index].uOM ?? ""}",
patientLabResultList[index].referanceRange, textAlign: TextAlign.center,
textAlign: TextAlign.center, ),
), ),
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: AppText(
patientLabResultList[index].referanceRange,
textAlign: TextAlign.center,
),
),
),
),
],
), ),
), Divider(),
), ],
], ))
),
Divider(),
],
))
// Table( // Table(
// border: TableBorder.symmetric( // border: TableBorder.symmetric(
// inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid), // inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid),
@ -141,7 +170,8 @@ class LabResultWidget extends StatelessWidget {
), ),
); );
} }
List<TableRow> fullData(List<LabResult> labResultList,context) {
List<TableRow> fullData(List<LabResult> labResultList, context) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add( tableRow.add(
TableRow( TableRow(
@ -150,18 +180,27 @@ class LabResultWidget extends StatelessWidget {
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).description, TranslationBase.of(context).description,
color: Colors.black,bold: true, color: Colors.black,
bold: true,
), ),
), ),
), ),
Container( Container(
child: Center( child: Center(
child: AppText(TranslationBase.of(context).value, color: Colors.black,bold: true,), child: AppText(
TranslationBase.of(context).value,
color: Colors.black,
bold: true,
),
), ),
), ),
Container( Container(
child: Center( child: Center(
child: AppText(TranslationBase.of(context).range, color: Colors.black,bold: true,), child: AppText(
TranslationBase.of(context).range,
color: Colors.black,
bold: true,
),
), ),
), ),
], ],
@ -189,7 +228,7 @@ class LabResultWidget extends StatelessWidget {
color: Colors.white, color: Colors.white,
child: Center( child: Center(
child: AppText( child: AppText(
lab.resultValue+" "+lab.uOM, lab.resultValue + " " + lab.uOM,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
@ -213,7 +252,4 @@ class LabResultWidget extends StatelessWidget {
}); });
return tableRow; return tableRow;
} }
} }

@ -18,7 +18,13 @@ class LaboratoryResultPage extends StatefulWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
LaboratoryResultPage({Key key, this.patientLabOrders, this.patient, this.patientType, this.arrivalType});
LaboratoryResultPage(
{Key key,
this.patientLabOrders,
this.patient,
this.patientType,
this.arrivalType});
@override @override
_LaboratoryResultPageState createState() => _LaboratoryResultPageState(); _LaboratoryResultPageState createState() => _LaboratoryResultPageState();
@ -33,15 +39,16 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
clinicID: widget.patientLabOrders.clinicID, clinicID: widget.patientLabOrders.clinicID,
projectID: widget.patientLabOrders.projectID, projectID: widget.patientLabOrders.projectID,
orderNo: widget.patientLabOrders.orderNo, orderNo: widget.patientLabOrders.orderNo,
patient: widget.patient), patient: widget.patient,
isInpatient: widget.patientType == "1"),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileHeaderWhitAppointmentAppBar( appBar: PatientProfileHeaderWhitAppointmentAppBar(
patient: widget.patient, patient: widget.patient,
patientType: widget.patientType??"0", patientType: widget.patientType ?? "0",
arrivalType: widget.arrivalType??"0", arrivalType: widget.arrivalType ?? "0",
orderNo: widget.patientLabOrders.orderNo, orderNo: widget.patientLabOrders.orderNo,
appointmentDate:widget.patientLabOrders.orderDate, appointmentDate: widget.patientLabOrders.orderDate,
doctorName: widget.patientLabOrders.doctorName, doctorName: widget.patientLabOrders.doctorName,
branch: widget.patientLabOrders.projectName, branch: widget.patientLabOrders.projectName,
clinic: widget.patientLabOrders.clinicDescription, clinic: widget.patientLabOrders.clinicDescription,
@ -53,17 +60,18 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
...List.generate(model.patientLabSpecialResult.length, (index) => LaboratoryResultWidget( ...List.generate(
onTap: () async { model.patientLabSpecialResult.length,
(index) => LaboratoryResultWidget(
}, onTap: () async {},
billNo: widget.patientLabOrders.invoiceNo, billNo: widget.patientLabOrders.invoiceNo,
details: model.patientLabSpecialResult[index].resultDataHTML, details: model
orderNo: widget.patientLabOrders.orderNo, .patientLabSpecialResult[index].resultDataHTML,
patientLabOrder: widget.patientLabOrders, orderNo: widget.patientLabOrders.orderNo,
patient: widget.patient, patientLabOrder: widget.patientLabOrders,
)), patient: widget.patient,
isInpatient: widget.patientType == "1",
)),
], ],
), ),
), ),

@ -20,13 +20,17 @@ class LaboratoryResultWidget extends StatefulWidget {
final String orderNo; final String orderNo;
final PatientLabOrders patientLabOrder; final PatientLabOrders patientLabOrder;
final PatiantInformtion patient; final PatiantInformtion patient;
final bool isInpatient;
const LaboratoryResultWidget( const LaboratoryResultWidget(
{Key key, {Key key,
this.onTap, this.onTap,
this.billNo, this.billNo,
this.details, this.details,
this.orderNo, this.orderNo,
this.patientLabOrder, this.patient}) this.patientLabOrder,
this.patient,
this.isInpatient})
: super(key: key); : super(key: key);
@override @override
@ -41,7 +45,10 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>( return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResult(patientLabOrder: widget.patientLabOrder,patient: widget.patient), onModelReady: (model) => model.getPatientLabResult(
patientLabOrder: widget.patientLabOrder,
patient: widget.patient,
isInpatient: widget.isInpatient),
builder: (_, model, w) => NetworkBaseView( builder: (_, model, w) => NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: Container( child: Container(
@ -77,9 +84,15 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
)), )),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded(child: Container( Expanded(
margin: EdgeInsets.only(left: 10, right: 10), child: Container(
child: AppText(TranslationBase.of(context).generalResult,bold: true,))), margin: EdgeInsets.only(
left: 10, right: 10),
child: AppText(
TranslationBase.of(context)
.generalResult,
bold: true,
))),
Container( Container(
width: 25, width: 25,
height: 25, height: 25,
@ -115,14 +128,15 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
children: <Widget>[ children: <Widget>[
...List.generate( ...List.generate(
model.labResultLists.length, model.labResultLists.length,
(index) => LabResultWidget( (index) => LabResultWidget(
patientLabOrder: widget.patientLabOrder, patientLabOrder: widget.patientLabOrder,
filterName: model filterName: model
.labResultLists[index].filterName, .labResultLists[index].filterName,
patientLabResultList: model patientLabResultList: model
.labResultLists[index] .labResultLists[index]
.patientLabResultList, .patientLabResultList,
patient:widget.patient, patient: widget.patient,
isInpatient: widget.isInpatient,
), ),
) )
], ],
@ -135,7 +149,6 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
], ],
), ),
], ],

@ -13,14 +13,11 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-head
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LabsHomePage extends StatelessWidget { class LabsHomePage extends StatelessWidget {
String patientType; String patientType;

@ -0,0 +1,278 @@
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/note/update_note.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../../config/shared_pref_kay.dart';
import '../../../../config/size_config.dart';
import '../../../../models/patient/patiant_info_model.dart';
import '../../../../util/dr_app_shared_pref.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/app_texts_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class ProgressNoteScreen extends StatefulWidget {
final int visitType;
const ProgressNoteScreen({Key key, this.visitType}) : super(key: key);
@override
_ProgressNoteState createState() => _ProgressNoteState();
}
class _ProgressNoteState extends State<ProgressNoteScreen> {
List<NoteModel> notesList;
var filteredNotesList;
final _controller = TextEditingController();
var _isInit = true;
getProgressNoteList(BuildContext context, PatientViewModel model) async {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String token = await sharedPref.getString(TOKEN);
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
print(type);
ProgressNoteRequest progressNoteRequest = ProgressNoteRequest(
visitType: widget.visitType,
// if equal 5 then this will return progress note
admissionNo: int.parse(patient.admissionNo),
projectID: patient.projectId,
tokenID: token,
patientTypeID: patient.patientType,
languageID: 2);
model.getPatientProgressNote(progressNoteRequest.toJson()).then((c) {
notesList = model.patientProgressNoteList;
});
}
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String arrivalType = routeArgs['arrivalType'];
return BaseView<PatientViewModel>(
onModelReady: (model) => getProgressNoteList(context, model),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
// appBarTitle: TranslationBase.of(context).progressNote,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', arrivalType),
body: notesList == null || notesList.length == 0
? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoProgressNote)
: Container(
color: Colors.grey[200],
child: Column(
children: <Widget>[
AddNewOrder( onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => UpdateNoteOrder(
patientModel: model,
patient: patient,
visitType: widget.visitType,
isUpdate: false,
)),
);
},label: 'Add a New Order',),
Expanded(
child: Container(
child: ListView.builder(
itemCount: notesList.length,
itemBuilder: (BuildContext ctxt, int index) {
return Column(
children: [
Container(
margin: EdgeInsets.only(
left: 10,
right: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
),
padding: EdgeInsets.all(15),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
width: MediaQuery.of(context).size.width * 0.65,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: AppText('Created By: ',
fontSize: 12,
),
margin: EdgeInsets.only(top: 3),
),
Expanded(
child: AppText(
notesList[index].doctorName??'',fontWeight: FontWeight.w600),
),
],
),
),
Column(
children: [
AppText(
notesList[index]
.createdOn !=
null
? DateUtils
.getDayMonthYearDateFormatted(
DateUtils.getDateTimeFromServerFormat(notesList[index].createdOn))
: DateUtils
.getDayMonthYearDateFormatted(
DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
),
AppText(
notesList[index]
.createdOn !=
null
? DateUtils
.getHour(
DateUtils.getDateTimeFromServerFormat(notesList[index].createdOn ))
: DateUtils
.getHour(
DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
),
],
)
],
),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
child: AppText(
notesList[index].notes,
fontSize: 10,
),
),
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => UpdateNoteOrder(
note: notesList[index],
patientModel: model,
patient: patient,
visitType: widget.visitType,
isUpdate: true,
)),
);
},
child: Icon(
DoctorApp.edit,
size: 18,
))
],
),
],
),
),
SizedBox(
height: 20,
),
],
);
}),
),
),
],
),
),
),
);
}
InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration(
prefixIcon: Icon(Icons.search, color: Colors.black),
filled: true,
fillColor: Colors.white,
hintText: hint,
hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: HexColor('#CCCCCC')),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.grey), //),
));
}
// searchData(String str, PatientViewModel model) {
// var strExist = str.length > 0 ? true : false;
//
// if (strExist) {
// filteredNotesList = null;
// filteredNotesList = model.patientProgressNoteList
// .where((note) =>
// note["DoctorName"].toString().contains(str.toUpperCase()))
// .toList();
// setState(() {
// notesList = filteredNotesList;
// });
// } else {
// setState(() {
// notesList = model.patientProgressNoteList;
// });
// }
// }
convertDateFormat(String str) {
const start = "/Date(";
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString();
}
}

@ -0,0 +1,174 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart';
class UpdateNoteOrder extends StatefulWidget {
final NoteModel note;
final PatientViewModel patientModel;
final PatiantInformtion patient;
final int visitType;
final bool isUpdate;
const UpdateNoteOrder(
{Key key, this.note, this.patientModel, this.patient, this.visitType, this.isUpdate})
: super(key: key);
@override
_UpdateNoteOrderState createState() =>
_UpdateNoteOrderState();
}
class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
int selectedType;
TextEditingController progressNoteController = TextEditingController();
setSelectedType(int val) {
setState(() {
selectedType = val;
});
}
@override
Widget build(BuildContext context) {
if (widget.note != null) {
progressNoteController.text = widget.note.notes;
}
return BaseView<PatientViewModel>(
builder: (BuildContext context, PatientViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: false,
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Container(
height: MediaQuery
.of(context)
.size
.height * 1.0,
child: Padding(
padding: EdgeInsets.all(0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
BottomSheetTitle(title: 'Add Progress Note',),
SizedBox(
height: 10.0,
),
Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
AppTextFieldCustom(
hintText: TranslationBase.of(context).addProgressNote,
controller: progressNoteController,
maxLines: 25,
minLines: 7,
hasBorder: true,
// validationError:complaintsController.text.isEmpty ,
),
],
),
),
),
],
),
),
),
),
bottomSheet: Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'Add Progress Note',
color: Color(0xff359846),
// disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700,
onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
if (widget.isUpdate) {
UpdateNoteReqModel reqModel = UpdateNoteReqModel(
admissionNo: int.parse(widget.patient.admissionNo),
cancelledNote: false,
lineItemNo: 30,
createdBy: widget.note.createdBy,
notes: progressNoteController.text
,
verifiedNote: false,
patientTypeID: widget.patient.patientType,
patientOutSA: false,
);
await model.updatePatientProgressNote(reqModel);
} else {
CreateNoteModel reqModel = CreateNoteModel(
admissionNo: int.parse(widget.patient.admissionNo),
createdBy: doctorProfile.doctorID,
visitType: widget.visitType,
patientID: widget.patient.patientId,
nursingRemarks: ' ',
patientTypeID: widget.patient.patientType,
patientOutSA: false,
notes: progressNoteController.text
);
await model.createPatientProgressNote(reqModel);
}
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast("Error");
} else {
ProgressNoteRequest progressNoteRequest =
ProgressNoteRequest(
visitType: widget.visitType,
// if equal 5 then this will return progress note
admissionNo: int.parse(widget.patient.admissionNo),
projectID: widget.patient.projectId,
patientTypeID: widget.patient.patientType,
languageID: 2);
await widget.patientModel.getPatientProgressNote(
progressNoteRequest.toJson());
}
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pop();
},
),
],
),
),
),
);
}
}

@ -1,217 +0,0 @@
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../config/shared_pref_kay.dart';
import '../../../config/size_config.dart';
import '../../../models/patient/patiant_info_model.dart';
import '../../../util/dr_app_shared_pref.dart';
import '../../../widgets/shared/app_scaffold_widget.dart';
import '../../../widgets/shared/app_texts_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
/*
*@author: ibrahim albitar
*@Date:15/5/2020
*@param: '
*@return:
*@desc:
*/
class ProgressNoteScreen extends StatefulWidget {
@override
_ProgressNoteState createState() => _ProgressNoteState();
}
class _ProgressNoteState extends State<ProgressNoteScreen> {
var notesList;
var filteredNotesList;
final _controller = TextEditingController();
var _isInit = true;
/*
*@author: ibrahim al bitar
*@Date:16/5/2020
*@param:
*@return:
*@desc:
*/
getProgressNoteList(BuildContext context, PatientViewModel model) async {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String token = await sharedPref.getString(TOKEN);
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
print(type);
ProgressNoteRequest progressNoteRequest = ProgressNoteRequest(
visitType: 5,
// if equal 5 then this will return progress note
admissionNo: int.parse(patient.admissionNo),
projectID: patient.projectId,
tokenID: token,
patientTypeID: patient.patientType,
languageID: 2);
model.getPatientProgressNote(progressNoteRequest.toJson()).then((c) {
notesList = model.patientProgressNoteList;
});
}
@override
Widget build(BuildContext context) {
return BaseView<PatientViewModel>(
onModelReady: (model) => getProgressNoteList(context, model),
builder: (_, model, w) =>
AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase
.of(context)
.progressNote,
body: notesList == null || notesList.length == 0
? DrAppEmbeddedError(
error: TranslationBase
.of(context)
.errorNoProgressNote)
: Column(
children: <Widget>[
Container(
margin: EdgeInsets.all(10),
width: SizeConfig.screenWidth * 0.80,
child: TextField(
controller: _controller,
onChanged: (String str) {
this.searchData(str, model);
},
textInputAction: TextInputAction.done,
decoration: buildInputDecoration(context,
TranslationBase.of(context).searchNote),
),
),
Expanded(
child: Container(
margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05,
0,
SizeConfig.realScreenWidth * 0.05,
0),
child: ListView.builder(
itemCount: notesList.length,
itemBuilder: (BuildContext ctxt, int index) {
return RoundedContainer(
backgroundColor: Colors.white,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
ExpansionTile(
title: Container(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
notesList[index]
["DoctorName"],
marginTop: 10,
marginLeft: 10,
marginBottom: 5,
fontWeight: FontWeight.bold,
),
AppText(
convertDateFormat(
notesList[index]
["AssessmentDate"]),
marginLeft: 10,
color: Colors.grey[600],
),
],
),
),
children: <Widget>[
Divider(
color: Colors.black,
height: 20,
thickness: 1,
indent: 0,
endIndent: 0,
),
Row(mainAxisAlignment: MainAxisAlignment.start,
children: [
AppText(
notesList[index]["Notes"],
margin: 5,
),
],
)
],
),
],
));
}),
),
),
],
),
),);
}
InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration(
prefixIcon: Icon(Icons.search, color: Colors.black),
filled: true,
fillColor: Colors.white,
hintText: hint,
hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: HexColor('#CCCCCC')),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.grey), //),
));
}
searchData(String str, PatientViewModel model) {
var strExist = str.length > 0 ? true : false;
if (strExist) {
filteredNotesList = null;
filteredNotesList = model.patientProgressNoteList
.where((note) =>
note["DoctorName"].toString().contains(str.toUpperCase()))
.toList();
setState(() {
notesList = filteredNotesList;
});
} else {
setState(() {
notesList = model.patientProgressNoteList;
});
}
}
convertDateFormat(String str) {
const start = "/Date(";
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString();
}
}

@ -213,8 +213,8 @@ class PatientCard extends StatelessWidget {
), ),
), ),
), ),
if (SERVICES_PATIANT2[int.parse(patientType)] == if (SERVICES_PATIANT2[int.parse(patientType)] !=
"List_MyOutPatient") "List_MyInPatient")
Container( Container(
child: RichText( child: RichText(
text: new TextSpan( text: new TextSpan(
@ -298,51 +298,52 @@ class PatientCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Expanded( AppText(
child: AppText( TranslationBase.of(context)
TranslationBase.of(context) .appointmentDate +
.appointmentDate + " : ",
" : ", fontSize: 14,
fontSize: 14,
),
), ),
// Container(
// child:
patientInfo.appointmentDate != null
? AppText(
DateUtils
.convertDateFromServerFormat(
patientInfo.appointmentDate
.toString(),
'yyyy-MM-dd'),
fontSize: 12,
fontWeight: FontWeight.bold,
)
: SizedBox(),
//),
patientInfo.startTimes != null patientInfo.startTimes != null
? Container( ?
height: 15, //
width: 60, // Container(
decoration: BoxDecoration( // // height: 15,
borderRadius: // // width: 60,
BorderRadius.circular(25), // padding: EdgeInsets.all(5),
color: HexColor("#20A169"), // decoration: BoxDecoration(
), // borderRadius:
child: AppText( // BorderRadius.circular(25),
patientInfo.startTimes, // color: HexColor("#20A169"),
color: Colors.white, // ),
fontSize: 1.5 * // child:
SizeConfig.textMultiplier,
textAlign: TextAlign.center, AppText(
fontWeight: FontWeight.bold, ' ' + patientInfo.startTimes,
), fontSize: 11,
fontWeight: FontWeight.bold,
) )
//)
: SizedBox(), : SizedBox(),
SizedBox( SizedBox(
width: 3.5, width: 3.5,
), ),
Container( //,
child: patientInfo.appointmentDate != null
? AppText(
DateUtils
.convertDateFromServerFormat(
patientInfo
.appointmentDate
.toString(),
'yyyy-MM-dd'),
fontSize: 1.5 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
)
: SizedBox(),
),
SizedBox( SizedBox(
height: 0.5, height: 0.5,
) )

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:url_launcher/url_launcher.dart';
class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { class PatientProfileHeaderNewDesignInPatient extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
@ -77,7 +78,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget {
margin: EdgeInsets.symmetric(horizontal: 4), margin: EdgeInsets.symmetric(horizontal: 4),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
// should call patient or show mobile number : patient.mobileNumber launch("tel://" + patient.mobileNumber);
}, },
child: Icon( child: Icon(
Icons.phone, Icons.phone,

@ -175,6 +175,16 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress, nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note, nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'), icon: 'patient/Progress_notes.png'),
if (patientType == "1")
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
nameLine1: 'Order',//TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),
], ],
), ),
); );

@ -82,20 +82,20 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'), icon: 'patient/order_prescription.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: PROGRESS_NOTE, route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress, nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note, nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'), icon: 'patient/Progress_notes.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: null, route: ORDER_NOTE,
nameLine1: "Text", nameLine1: "Text",
nameLine2: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).orders,
icon: 'patient/Progress_notes.png'), icon: 'patient/Progress_notes.png'),
@ -124,7 +124,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: null, route: MEDICAL_FILE,
nameLine1: "Health", nameLine1: "Health",
//TranslationBase.of(context).medicalReport, //TranslationBase.of(context).medicalReport,
nameLine2: "Summery", nameLine2: "Summery",
@ -135,7 +135,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: null, route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase.of(context).referral, nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'), icon: 'patient/refer_patient.png'),
@ -149,14 +149,15 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
nameLine2: TranslationBase.of(context).approvals, nameLine2: TranslationBase.of(context).approvals,
icon: 'patient/vital_signs.png'), icon: 'patient/vital_signs.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
route: null, isDisable: true,
nameLine1: "Discharge", route: null,
nameLine2: "Summery", nameLine1: "Discharge",
icon: 'patient/patient_sick_leave.png'), nameLine2: "Summery",
icon: 'patient/patient_sick_leave.png'),
], ],
), ),
); );

@ -138,6 +138,17 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
nameLine2: TranslationBase.of(context).note, nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'), icon: 'patient/Progress_notes.png'),
if (patientType == "1")
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
nameLine1: 'Order',//TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'),
if (patientType == "1") if (patientType == "1")
PatientProfileButton( PatientProfileButton(
key: key, key: key,

@ -49,7 +49,7 @@ class _AppButtonState extends State<AppButton> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return IgnorePointer( return IgnorePointer(
ignoring: widget.loading, ignoring: widget.loading ||widget.disabled,
child: RawMaterialButton( child: RawMaterialButton(
fillColor: widget.color != null ? widget.color : HexColor("#B8382C"), fillColor: widget.color != null ? widget.color : HexColor("#B8382C"),
splashColor: widget.color, splashColor: widget.color,

Loading…
Cancel
Save