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

 Conflicts:
	lib/config/config.dart
merge-requests/816/head
Elham Rababh 3 years ago
commit 46698a4382

@ -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";
@ -125,7 +125,8 @@ const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLab
const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail';
const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION = 'Services/Patients.svc/REST/GetPatientLabOrdersResultsHistoryByDescription';
const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION =
'Services/Patients.svc/REST/GetPatientLabOrdersResultsHistoryByDescription';
// SOAP
@ -303,7 +304,6 @@ const GENERAL_ID = 'Cs2020@2016\$2958';
const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 1;
const Color IN_PROGRESS_COLOR = Color(0xFFCC9B14);
/// Timer Info

File diff suppressed because it is too large Load Diff

@ -0,0 +1,216 @@
class AllSpecialLabResultModel {
int actualDoctorRate;
dynamic admissionDate;
dynamic admissionNumber;
dynamic appointmentDate;
dynamic appointmentNo;
dynamic appointmentTime;
String clinicDescription;
String clinicDescriptionEnglish;
dynamic clinicDescriptionN;
dynamic clinicID;
dynamic createdOn;
double decimalDoctorRate;
dynamic doctorID;
String doctorImageURL;
String doctorName;
String doctorNameEnglish;
dynamic doctorNameN;
dynamic doctorRate;
dynamic doctorStarsRate;
String doctorTitle;
dynamic gender;
String genderDescription;
bool inOutPatient;
String invoiceNo;
bool isActiveDoctorProfile;
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
bool isInOutPatient;
dynamic isInOutPatientDescription;
dynamic isInOutPatientDescriptionN;
bool isLiveCareAppointment;
bool isRead;
bool isSendEmail;
String moduleID;
String nationalityFlagURL;
dynamic noOfPatientsRate;
dynamic orderDate;
String orderNo;
dynamic patientID;
String projectID;
String projectName;
dynamic projectNameN;
String qR;
String resultData;
String resultDataHTML;
dynamic resultDataTxt;
String setupID;
//List<String> speciality;
dynamic status;
dynamic statusDesc;
String strOrderDate;
AllSpecialLabResultModel(
{this.actualDoctorRate,
this.admissionDate,
this.admissionNumber,
this.appointmentDate,
this.appointmentNo,
this.appointmentTime,
this.clinicDescription,
this.clinicDescriptionEnglish,
this.clinicDescriptionN,
this.clinicID,
this.createdOn,
this.decimalDoctorRate,
this.doctorID,
this.doctorImageURL,
this.doctorName,
this.doctorNameEnglish,
this.doctorNameN,
this.doctorRate,
this.doctorStarsRate,
this.doctorTitle,
this.gender,
this.genderDescription,
this.inOutPatient,
this.invoiceNo,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isInOutPatient,
this.isInOutPatientDescription,
this.isInOutPatientDescriptionN,
this.isLiveCareAppointment,
this.isRead,
this.isSendEmail,
this.moduleID,
this.nationalityFlagURL,
this.noOfPatientsRate,
this.orderDate,
this.orderNo,
this.patientID,
this.projectID,
this.projectName,
this.projectNameN,
this.qR,
this.resultData,
this.resultDataHTML,
this.resultDataTxt,
this.setupID,
//this.speciality,
this.status,
this.statusDesc,
this.strOrderDate});
AllSpecialLabResultModel.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate'];
admissionDate = json['AdmissionDate'];
admissionNumber = json['AdmissionNumber'];
appointmentDate = json['AppointmentDate'];
appointmentNo = json['AppointmentNo'];
appointmentTime = json['AppointmentTime'];
clinicDescription = json['ClinicDescription'];
clinicDescriptionEnglish = json['ClinicDescriptionEnglish'];
clinicDescriptionN = json['ClinicDescriptionN'];
clinicID = json['ClinicID'];
createdOn = json['CreatedOn'];
decimalDoctorRate = json['DecimalDoctorRate'];
doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
doctorNameEnglish = json['DoctorNameEnglish'];
doctorNameN = json['DoctorNameN'];
doctorRate = json['DoctorRate'];
doctorStarsRate = json['DoctorStarsRate'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
inOutPatient = json['InOutPatient'];
invoiceNo = json['InvoiceNo'];
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
isInOutPatient = json['IsInOutPatient'];
isInOutPatientDescription = json['IsInOutPatientDescription'];
isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
isRead = json['IsRead'];
isSendEmail = json['IsSendEmail'];
moduleID = json['ModuleID'];
nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate'];
orderDate = json['OrderDate'];
orderNo = json['OrderNo'];
patientID = json['PatientID'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
projectNameN = json['ProjectNameN'];
qR = json['QR'];
resultData = json['ResultData'];
resultDataHTML = json['ResultDataHTML'];
resultDataTxt = json['ResultDataTxt'];
setupID = json['SetupID'];
//speciality = json['Speciality'].cast<String>();
status = json['Status'];
statusDesc = json['StatusDesc'];
strOrderDate = json['StrOrderDate'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ActualDoctorRate'] = this.actualDoctorRate;
data['AdmissionDate'] = this.admissionDate;
data['AdmissionNumber'] = this.admissionNumber;
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentTime'] = this.appointmentTime;
data['ClinicDescription'] = this.clinicDescription;
data['ClinicDescriptionEnglish'] = this.clinicDescriptionEnglish;
data['ClinicDescriptionN'] = this.clinicDescriptionN;
data['ClinicID'] = this.clinicID;
data['CreatedOn'] = this.createdOn;
data['DecimalDoctorRate'] = this.decimalDoctorRate;
data['DoctorID'] = this.doctorID;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorName'] = this.doctorName;
data['DoctorNameEnglish'] = this.doctorNameEnglish;
data['DoctorNameN'] = this.doctorNameN;
data['DoctorRate'] = this.doctorRate;
data['DoctorStarsRate'] = this.doctorStarsRate;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['InOutPatient'] = this.inOutPatient;
data['InvoiceNo'] = this.invoiceNo;
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['IsExecludeDoctor'] = this.isExecludeDoctor;
data['IsInOutPatient'] = this.isInOutPatient;
data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['IsRead'] = this.isRead;
data['IsSendEmail'] = this.isSendEmail;
data['ModuleID'] = this.moduleID;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['OrderDate'] = this.orderDate;
data['OrderNo'] = this.orderNo;
data['PatientID'] = this.patientID;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['ProjectNameN'] = this.projectNameN;
data['QR'] = this.qR;
data['ResultData'] = this.resultData;
data['ResultDataHTML'] = this.resultDataHTML;
data['ResultDataTxt'] = this.resultDataTxt;
data['SetupID'] = this.setupID;
//data['Speciality'] = this.speciality;
data['Status'] = this.status;
data['StatusDesc'] = this.statusDesc;
data['StrOrderDate'] = this.strOrderDate;
return data;
}
}

@ -0,0 +1,68 @@
class AllSpecialLabResultRequestModel {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
String tokenID;
int patientTypeID;
int patientType;
int patientID;
int projectID;
AllSpecialLabResultRequestModel(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.patientID,
this.projectID});
AllSpecialLabResultRequestModel.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
patientID = json['PatientID'];
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['PatientID'] = this.patientID;
data['ProjectID'] = this.projectID;
return data;
}
}

@ -14,7 +14,11 @@ class BaseService {
List<PatiantInformtion> patientArrivalList = [];
//TODO add the user login model when we need it
BaseService(){
doctorProfile = null;
}
//TODO add the user login model when we need it
Future<DoctorProfileModel> getDoctorProfile({bool isGetProfile = false}) async {
if(isGetProfile)
{

@ -10,7 +10,7 @@ class PatientInPatientService extends BaseService {
Future getInPatientList(
PatientSearchRequestModel requestModel, bool isMyInpatient) async {
hasError = false;
await getDoctorProfile();
await getDoctorProfile(isGetProfile: true);
if (isMyInpatient) {
requestModel.doctorID = doctorProfile.doctorID;

@ -1,6 +1,8 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/core/model/labs/LabResultHistory.dart';
import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_model.dart';
import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_request.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart';
@ -12,9 +14,12 @@ import '../../base/base_service.dart';
class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List();
List<AllSpecialLabResultModel> _allSpecialLab = List();
List<AllSpecialLabResultModel> get allSpecialLab => _allSpecialLab;
Future getPatientLabOrdersList(
PatiantInformtion patient, bool isInpatient) async {
AllSpecialLabResultRequestModel _allSpecialLabResultRequestModel = AllSpecialLabResultRequestModel();
Future getPatientLabOrdersList(PatiantInformtion patient, bool isInpatient) async {
hasError = false;
Map<String, dynamic> body = Map();
String url = "";
@ -28,8 +33,7 @@ class LabsService extends BaseService {
}
patientLabOrdersList = [];
patientLabOrdersList.clear();
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList = [];
if (!isInpatient) {
response['ListPLO'].forEach((hospital) {
@ -47,8 +51,7 @@ class LabsService extends BaseService {
}, body: body);
}
RequestPatientLabSpecialResult _requestPatientLabSpecialResult =
RequestPatientLabSpecialResult();
RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult();
List<PatientLabSpecialResult> patientLabSpecialResult = List();
List<LabResult> labResultList = List();
@ -71,8 +74,8 @@ class LabsService extends BaseService {
_requestPatientLabSpecialResult.orderNo = orderNo;
body = _requestPatientLabSpecialResult.toJson();
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT,
patient: patient, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, patient: patient,
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
response['ListPLSR'].forEach((hospital) {
@ -84,10 +87,7 @@ class LabsService extends BaseService {
}, body: body);
}
Future getPatientLabResult(
{PatientLabOrders patientLabOrder,
PatiantInformtion patient,
bool isInpatient}) async {
Future getPatientLabResult({PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async {
hasError = false;
String url = "";
@ -105,8 +105,7 @@ class LabsService extends BaseService {
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID ?? 0;
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult = [];
labResultList = [];
@ -115,8 +114,7 @@ class LabsService extends BaseService {
labResultList.add(LabResult.fromJson(hospital));
});
response['List_GetLabSpecial'].forEach((hospital) {
patientLabSpecialResult
.add(PatientLabSpecialResult.fromJson(hospital));
patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital));
});
} else {
response['ListPLR'].forEach((lab) {
@ -130,9 +128,7 @@ class LabsService extends BaseService {
}
Future getPatientLabOrdersResults(
{PatientLabOrders patientLabOrder,
String procedure,
PatiantInformtion patient}) async {
{PatientLabOrders patientLabOrder, String procedure, PatiantInformtion patient}) async {
hasError = false;
Map<String, dynamic> body = Map();
if (patientLabOrder != null) {
@ -144,8 +140,8 @@ class LabsService extends BaseService {
}
body['isDentalAllowedBackend'] = false;
body['Procedure'] = procedure;
await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT,
patient: patient, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT, patient: patient,
onSuccess: (dynamic response, int statusCode) {
labOrdersResultsList.clear();
response['ListPLR'].forEach((lab) {
labOrdersResultsList.add(LabOrderResult.fromJson(lab));
@ -156,8 +152,7 @@ class LabsService extends BaseService {
}, body: body);
}
RequestSendLabReportEmail _requestSendLabReportEmail =
RequestSendLabReportEmail();
RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail();
Future sendLabReportEmail({PatientLabOrders patientLabOrder}) async {
// _requestSendLabReportEmail.projectID = patientLabOrder.projectID;
@ -184,9 +179,7 @@ class LabsService extends BaseService {
}
Future getPatientLabOrdersResultHistoryByDescription(
{PatientLabOrders patientLabOrder,
String procedureDescription,
PatiantInformtion patient}) async {
{PatientLabOrders patientLabOrder, String procedureDescription, PatiantInformtion patient}) async {
hasError = false;
Map<String, dynamic> body = Map();
if (patientLabOrder != null) {
@ -196,9 +189,8 @@ class LabsService extends BaseService {
}
body['isDentalAllowedBackend'] = false;
body['ProcedureDescription'] = procedureDescription;
await baseAppClient.postPatient(
GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION,
patient: patient, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION, patient: patient,
onSuccess: (dynamic response, int statusCode) {
labOrdersResultHistoryList.clear();
response['ListGeneralResultHistory'].forEach((lab) {
labOrdersResultHistoryList.add(LabResultHistory.fromJson(lab));
@ -208,4 +200,22 @@ class LabsService extends BaseService {
super.error = error;
}, body: body);
}
Future getAllSpecialLabResult({int mrn}) async {
_allSpecialLabResultRequestModel = AllSpecialLabResultRequestModel(
patientID: mrn,
patientType: 1,
patientTypeID: 1,
);
hasError = false;
_allSpecialLab.clear();
await baseAppClient.post(ALL_SPECIAL_LAB_RESULT, onSuccess: (dynamic response, int statusCode) {
response['ListPLSRALL'].forEach((lab) {
_allSpecialLab.add(AllSpecialLabResultModel.fromJson(lab));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _allSpecialLabResultRequestModel.toJson());
}
}

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/core/model/labs/LabResultHistory.dart';
import 'package:doctor_app_flutter/core/model/labs/all_special_lab_result_model.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart';
@ -16,18 +17,16 @@ class LabsViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
LabsService _labsService = locator<LabsService>();
List<LabOrderResult> get labOrdersResultsList =>
_labsService.labOrdersResultsList;
List<LabOrderResult> get labOrdersResultsList => _labsService.labOrdersResultsList;
List<AllSpecialLabResultModel> get allSpecialLabList => _labsService.allSpecialLab;
List<PatientLabOrdersList> _patientLabOrdersListClinic = List();
List<PatientLabOrdersList> _patientLabOrdersListHospital = List();
List<PatientLabOrdersList> get patientLabOrdersList =>
filterType == FilterType.Clinic
? _patientLabOrdersListClinic
: _patientLabOrdersListHospital;
filterType == FilterType.Clinic ? _patientLabOrdersListClinic : _patientLabOrdersListHospital;
List<LabResultHistory> get labOrdersResultHistoryList => _labsService.labOrdersResultHistoryList;
List<LabResultHistory> get labOrdersResultHistoryList => _labsService.labOrdersResultHistoryList;
void getLabs(PatiantInformtion patient) async {
setState(ViewState.Busy);
@ -37,41 +36,33 @@ class LabsViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
_labsService.patientLabOrdersList.forEach((element) {
List<PatientLabOrdersList> patientLabOrdersClinic =
_patientLabOrdersListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
List<PatientLabOrdersList> patientLabOrdersClinic = _patientLabOrdersListClinic
.where((elementClinic) => elementClinic.filterName == element.clinicDescription)
.toList();
if (patientLabOrdersClinic.length != 0) {
_patientLabOrdersListClinic[_patientLabOrdersListClinic
.indexOf(patientLabOrdersClinic[0])]
_patientLabOrdersListClinic[_patientLabOrdersListClinic.indexOf(patientLabOrdersClinic[0])]
.patientLabOrdersList
.add(element);
} else {
_patientLabOrdersListClinic.add(PatientLabOrdersList(
filterName: element.clinicDescription,
patientDoctorAppointment: element));
_patientLabOrdersListClinic
.add(PatientLabOrdersList(filterName: element.clinicDescription, patientDoctorAppointment: element));
}
// doctor list sort via project
List<PatientLabOrdersList> patientLabOrdersHospital =
_patientLabOrdersListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
List<PatientLabOrdersList> patientLabOrdersHospital = _patientLabOrdersListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (patientLabOrdersHospital.length != 0) {
_patientLabOrdersListHospital[_patientLabOrdersListHospital
.indexOf(patientLabOrdersHospital[0])]
_patientLabOrdersListHospital[_patientLabOrdersListHospital.indexOf(patientLabOrdersHospital[0])]
.patientLabOrdersList
.add(element);
} else {
_patientLabOrdersListHospital.add(PatientLabOrdersList(
filterName: element.projectName,
patientDoctorAppointment: element));
_patientLabOrdersListHospital
.add(PatientLabOrdersList(filterName: element.projectName, patientDoctorAppointment: element));
}
});
@ -84,8 +75,7 @@ class LabsViewModel extends BaseViewModel {
notifyListeners();
}
List<PatientLabSpecialResult> get patientLabSpecialResult =>
_labsService.patientLabSpecialResult;
List<PatientLabSpecialResult> get patientLabSpecialResult => _labsService.patientLabSpecialResult;
List<LabResult> get labResultList => _labsService.labResultList;
@ -118,15 +108,10 @@ class LabsViewModel extends BaseViewModel {
}
}
getPatientLabResult(
{PatientLabOrders patientLabOrder,
PatiantInformtion patient,
bool isInpatient}) async {
getPatientLabResult({PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabResult(
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient);
patientLabOrder: patientLabOrder, patient: patient, isInpatient: isInpatient);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
@ -137,31 +122,21 @@ class LabsViewModel extends BaseViewModel {
void setLabResultDependOnFilterName() {
_labsService.labResultList.forEach((element) {
List<LabResultList> patientLabOrdersClinic = labResultLists
.where(
(elementClinic) => elementClinic.filterName == element.testCode)
.toList();
List<LabResultList> patientLabOrdersClinic =
labResultLists.where((elementClinic) => elementClinic.filterName == element.testCode).toList();
if (patientLabOrdersClinic.length != 0) {
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
.patientLabResultList
.add(element);
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList.add(element);
} else {
labResultLists
.add(LabResultList(filterName: element.testCode, lab: element));
labResultLists.add(LabResultList(filterName: element.testCode, lab: element));
}
});
}
getPatientLabOrdersResults(
{PatientLabOrders patientLabOrder,
String procedure,
PatiantInformtion patient}) async {
getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure, PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabOrdersResults(
patientLabOrder: patientLabOrder,
procedure: procedure,
patient: patient);
patientLabOrder: patientLabOrder, procedure: procedure, patient: patient);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
@ -169,9 +144,8 @@ class LabsViewModel extends BaseViewModel {
bool isShouldClear = false;
if (_labsService.labOrdersResultsList.length == 1) {
labOrdersResultsList.forEach((element) {
if (element.resultValue.contains('/') ||
element.resultValue.contains('*') ||
element.resultValue.isEmpty) isShouldClear = true;
if (element.resultValue.contains('/') || element.resultValue.contains('*') || element.resultValue.isEmpty)
isShouldClear = true;
});
}
if (isShouldClear) _labsService.labOrdersResultsList.clear();
@ -180,14 +154,10 @@ class LabsViewModel extends BaseViewModel {
}
getPatientLabResultHistoryByDescription(
{PatientLabOrders patientLabOrder,
String procedureDescription,
PatiantInformtion patient}) async {
{PatientLabOrders patientLabOrder, String procedureDescription, PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabOrdersResultHistoryByDescription(
patientLabOrder: patientLabOrder,
procedureDescription: procedureDescription,
patient: patient);
patientLabOrder: patientLabOrder, procedureDescription: procedureDescription, patient: patient);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
@ -203,4 +173,14 @@ class LabsViewModel extends BaseViewModel {
} else
DrAppToastMsg.showSuccesToast(mes);
}
Future getAllSpecialLabResult({int patientId}) async {
setState(ViewState.Busy);
await _labsService.getAllSpecialLabResult(mrn: patientId);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -1,7 +1,5 @@
import 'package:doctor_app_flutter/util/date-utils.dart';
class ListGtMyPatientsQuestions {
Null rowID;
String setupID;
int projectID;
int transactionNo;
@ -9,7 +7,7 @@ class ListGtMyPatientsQuestions {
int patientID;
int doctorID;
int requestType;
DateTime requestDate;
String requestDate;
String requestTime;
String remarks;
int status;
@ -26,12 +24,18 @@ class ListGtMyPatientsQuestions {
int infoStatus;
String infoDesc;
String doctorResponse;
dynamic responseDate;
int memberID;
String memberName;
String memberNameN;
String age;
String genderDescription;
bool isVidaCall;
String requestTypeDescription;
ListGtMyPatientsQuestions(
{this.setupID,
{this.rowID,
this.setupID,
this.projectID,
this.transactionNo,
this.patientType,
@ -55,11 +59,17 @@ class ListGtMyPatientsQuestions {
this.infoStatus,
this.infoDesc,
this.doctorResponse,
this.responseDate,
this.memberID,
this.memberName,
this.memberNameN,
this.age,
this.genderDescription,
this.isVidaCall});
this.isVidaCall,
this.requestTypeDescription});
ListGtMyPatientsQuestions.fromJson(Map<String, dynamic> json) {
rowID = json['RowID'];
setupID = json['SetupID'];
projectID = json['ProjectID'];
transactionNo = json['TransactionNo'];
@ -67,7 +77,7 @@ class ListGtMyPatientsQuestions {
patientID = json['PatientID'];
doctorID = json['DoctorID'];
requestType = json['RequestType'];
requestDate = AppDateUtils.convertStringToDate(json['RequestDate']) ;
requestDate = json['RequestDate'];
requestTime = json['RequestTime'];
remarks = json['Remarks'];
status = json['Status'];
@ -84,13 +94,19 @@ class ListGtMyPatientsQuestions {
infoStatus = json['InfoStatus'];
infoDesc = json['InfoDesc'];
doctorResponse = json['DoctorResponse'];
responseDate = json['ResponseDate'];
memberID = json['MemberID'];
memberName = json['MemberName'];
memberNameN = json['MemberNameN'];
age = json['Age'];
genderDescription = json['GenderDescription'];
isVidaCall = json['IsVidaCall'];
requestTypeDescription = json['RequestTypeDescription'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['RowID'] = this.rowID;
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['TransactionNo'] = this.transactionNo;
@ -115,11 +131,14 @@ class ListGtMyPatientsQuestions {
data['InfoStatus'] = this.infoStatus;
data['InfoDesc'] = this.infoDesc;
data['DoctorResponse'] = this.doctorResponse;
data['ResponseDate'] = this.responseDate;
data['MemberID'] = this.memberID;
data['MemberName'] = this.memberName;
data['MemberNameN'] = this.memberNameN;
data['Age'] = this.age;
data['GenderDescription'] = this.genderDescription;
data['IsVidaCall'] = this.isVidaCall;
data['RequestTypeDescription'] = this.requestTypeDescription;
return data;
}
}

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/screens/patients/ECGPage.dart';
import 'package:doctor_app_flutter/screens/patients/insurance_approval_screen_patient.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/lab_result/all_lab_special_result_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart';
import 'package:doctor_app_flutter/screens/patients/profile/medical_report/MedicalReportDetailPage.dart';
@ -48,8 +49,7 @@ const String ORDER_NOTE = 'patients/order-note';
const String MY_REFERRAL_DETAIL = 'my_referral_detail';
const String REFER_PATIENT_TO_DOCTOR = 'patients/refer-to-doctor';
const String REFER_IN_PATIENT_TO_DOCTOR = 'patients/refer-in-patient-to-doctor';
const String PATIENT_INSURANCE_APPROVALS_NEW =
'patients/patient_insurance_approvals_new';
const String PATIENT_INSURANCE_APPROVALS_NEW = 'patients/patient_insurance_approvals_new';
const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details';
const String CREATE_EPISODE = 'patients/create-episode';
const String UPDATE_EPISODE = 'patients/update-episode';
@ -68,6 +68,8 @@ const String ORDER_PROCEDURE = 'procedure/procedure';
const String ADD_SICKLEAVE = 'add-sickleave';
const String SHOW_SICKLEAVE = 'show-sickleave';
const String RADIOLOGY_PATIENT = 'radiology-patient';
const String ALL_SPECIAL_LAB_RESULT = 'all-special_lab';
//todo: change the routing way.
var routes = {
ROOT: (_) => RootPage(),
@ -77,8 +79,12 @@ var routes = {
PATIENTS_PROFILE: (_) => PatientProfileScreen(),
LAB_RESULT: (_) => LabsHomePage(),
HEALTH_SUMMARY: (_) => HealthSummaryPage(),
PROGRESS_NOTE: (_) => ProgressNoteScreen(visitType: 5,),
ORDER_NOTE: (_) => ProgressNoteScreen(visitType: 3,),
PROGRESS_NOTE: (_) => ProgressNoteScreen(
visitType: 5,
),
ORDER_NOTE: (_) => ProgressNoteScreen(
visitType: 3,
),
REFER_PATIENT_TO_DOCTOR: (_) => PatientMakeReferralScreen(),
REFER_IN_PATIENT_TO_DOCTOR: (_) => PatientMakeInPatientReferralScreen(),
PATIENT_INSURANCE_APPROVALS_NEW: (_) => InsuranceApprovalScreenNew(),
@ -106,4 +112,5 @@ var routes = {
PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(),
PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(),
PATIENT_ECG: (_) => ECGPage(),
ALL_SPECIAL_LAB_RESULT: (_) => AllLabSpecialResult(),
};

@ -295,14 +295,14 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
AppText(
widget.reply.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(widget.reply.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
widget.reply.responseDate !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(widget.reply.responseDate)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.w500,
color: Color(0xFF2B353E),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
),
AppText(
widget.reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(widget.reply.createdOn)):AppDateUtils.getHour(DateTime.now()),
widget.reply.responseDate !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(widget.reply.responseDate)):AppDateUtils.getHour(DateTime.now()),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
fontFamily: 'Poppins',
color: Color(0xFF2B353E),

@ -127,6 +127,9 @@ class _InPatientPageState extends State<InPatientPage> {
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
"isMyPatient":widget.patientSearchViewModel.filteredInPatientItems[index]
.doctorId ==
widget.patientSearchViewModel.doctorProfile.doctorID,
});
},
);

@ -69,9 +69,10 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen>
await model.getSpecialClinicalCareMappingList(widget.specialClinic.clinicID);
requestModel.nursingStationID =
model.specialClinicalCareMappingList[0].nursingStationID;
requestModel.clinicID = 0;
}
model.getInPatientList(requestModel);
requestModel.clinicID = 0;
await model.getInPatientList(requestModel);
},
builder: (_, model, w) =>
AppScaffold(

@ -10,6 +10,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'lab_result_history_chart_and_detials.dart';
import 'lab_result_chart_and_detials.dart';
class FlowChartPage extends StatelessWidget {
@ -18,48 +19,57 @@ class FlowChartPage extends StatelessWidget {
final PatiantInformtion patient;
final bool isInpatient;
FlowChartPage({this.patientLabOrder, this.filterName, this.patient, this.isInpatient});
FlowChartPage(
{this.patientLabOrder, this.filterName, this.patient, this.isInpatient});
@override
Widget build(BuildContext context) {
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabOrdersResults(
onModelReady: (model) => model.getPatientLabResultHistoryByDescription(
patientLabOrder: patientLabOrder,
procedure: filterName,
procedureDescription: filterName,
patient: patient),
// onModelReady: (model) => model.getPatientLabOrdersResults(
// patientLabOrder: patientLabOrder,
// procedure: filterName,
// patient: patient),
builder: (context, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: filterName,
baseViewModel: model,
body: model.labOrdersResultsList.isNotEmpty
body: model.labOrdersResultHistoryList.isNotEmpty
? SingleChildScrollView(
child: Container(
child: LabResultChartAndDetails(
child: LabResultHistoryChartAndDetails(
name: filterName,
labResult: model.labOrdersResultsList,
labResultHistory: model.labOrdersResultHistoryList,
),
// child: LabResultChartAndDetails(
// name: filterName,
// labResult: model.labOrdersResultsList,
// ),
),
)
: Container(
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
TranslationBase.of(context).noDataAvailable,
fontWeight: FontWeight.normal,
color: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.5,
),
)
],
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
TranslationBase.of(context).noDataAvailable,
fontWeight: FontWeight.normal,
color: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.5,
),
)
],
),
),
),
),
),
);
}

@ -15,7 +15,7 @@ class LabResultHistoryPage extends StatelessWidget {
final PatiantInformtion patient;
LabResultHistoryPage({this.patientLabOrder, this.filterName, this.patient});
// TODO mosa UI changes
@override
Widget build(BuildContext context) {
return BaseView<LabsViewModel>(
@ -34,6 +34,7 @@ class LabResultHistoryPage extends StatelessWidget {
...List.generate(model.labOrdersResultHistoryList.length,
(index) {
return Container(
margin: EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
child: Column(
children: [
Row(
@ -116,6 +117,14 @@ class LabResultHistoryPage extends StatelessWidget {
),
],
),
Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
SizedBox(
height: 10,
),
],
),
);

@ -47,26 +47,26 @@ class LabResultWidget extends StatelessWidget {
AppText(filterName),
],
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName: filterName,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
),
);
},
child: AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
),
),
// InkWell(
// onTap: () {
// Navigator.push(
// context,
// FadePage(
// page: FlowChartPage(
// filterName: filterName,
// patientLabOrder: patientLabOrder,
// patient: patient,
// isInpatient: isInpatient,
// ),
// ),
// );
// },
// // child: AppText(
// // TranslationBase.of(context).showMoreBtn,
// // textDecoration: TextDecoration.underline,
// // color: Colors.blue,
// // ),
// ),
],
),
Row(
@ -119,25 +119,43 @@ class LabResultWidget extends StatelessWidget {
...List.generate(
patientLabResultList.length,
(index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InkWell(
onTap: (){
onTap: () {
Navigator.push(
context,
FadePage(
page: LabResultHistoryPage(
filterName: patientLabResultList[index].description,
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
child: AppText(
" (show details)",
color: Colors.blue,
fontSize: 12,
// child: AppText(
// " (show details)",
// color: Colors.blue,
// fontSize: 12,
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
fontSize: 12,
),
],
),
),
Row(

@ -0,0 +1,116 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.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/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/core/model/labs/LabResultHistory.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LabResultHistoryDetailsWidget extends StatefulWidget {
final List<LabResultHistory> labResultHistory;
LabResultHistoryDetailsWidget({
this.labResultHistory,
});
@override
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
}
class _VitalSignDetailsWidgetState extends State<LabResultHistoryDetailsWidget> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
/* decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
border: Border.all(color: Colors.grey, width: 1),
),*/
margin: EdgeInsets.all(0),
child: Container(
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Expanded(
child: Container(
child: Container(
padding: EdgeInsets.all(8),
child: AppText(
TranslationBase.of(context).date,
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.bold,
),
),
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(8),
child: Container(
child: AppText(
TranslationBase.of(context).labResult,
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.bold,
),
// height: 60
),
),
)
],
),
const Divider(
height: 1,
thickness: 1,
color: Colors.black,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
),
children: fullData(projectViewModel),
),
],
),
),
);
}
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
widget.labResultHistory.forEach((vital) {
var date = AppDateUtils.convertStringToDate(vital.verifiedOnDateTime);
tableRow.add(TableRow(children: [
Container(
child: Container(
padding: EdgeInsets.all(8),
color: Colors.white,
child: AppText(
'${projectViewModel.isArabic ? AppDateUtils.getWeekDayArabic(date.weekday) : AppDateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic ? AppDateUtils.getMonthArabic(date.month) : AppDateUtils.getMonth(date.month)} ${date.year}',
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600,
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(8),
color: Colors.white,
child: AppText(
'${vital.resultValue}',
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600,
),
),
),
]));
});
return tableRow;
}
}

@ -0,0 +1,231 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/core/model/labs/LabResultHistory.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
class LineChartCurvedLabHistory extends StatefulWidget {
final String title;
final List<LabResultHistory> labResultHistory;
LineChartCurvedLabHistory({this.title, this.labResultHistory});
@override
State<StatefulWidget> createState() => LineChartCurvedLabHistoryState();
}
class LineChartCurvedLabHistoryState extends State<LineChartCurvedLabHistory> {
bool isShowingMainData;
List<int> xAxixs = List();
int indexes = 0;
@override
void initState() {
super.initState();
getXaxix();
isShowingMainData = true;
}
getXaxix() {
indexes = widget.labResultHistory.length ~/ 3.5;
for (int index = 0; index < widget.labResultHistory.length; index++) {
int mIndex = indexes * index;
if (mIndex < widget.labResultHistory.length) {
xAxixs.add(mIndex);
}
}
}
@override
Widget build(BuildContext context) {
return AspectRatio(
aspectRatio: 1.23,
child: Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white,
),
child: Stack(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
const SizedBox(
height: 4,
),
AppText(
widget.title,
fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
textAlign: TextAlign.center,
),
const SizedBox(
height: 12,
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 16.0, left: 8.0),
child: LineChart(
sampleData1(),
swapAnimationDuration: const Duration(milliseconds: 250),
),
),
),
const SizedBox(
height: 10,
),
],
),
],
),
),
);
}
LineChartData sampleData1() {
return LineChartData(
lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.white,
),
touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true,
),
gridData: FlGridData(
show: true, drawVerticalLine: true, drawHorizontalLine: true),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontSize: 11,
),
margin: 28,
rotateAngle: -65,
getTitles: (value) {
print(value);
DateTime date = AppDateUtils.convertStringToDate(
widget.labResultHistory[value.toInt()].verifiedOnDateTime);
if (widget.labResultHistory.length < 8) {
if (widget.labResultHistory.length > value.toInt()) {
return '${date.day}/ ${date.year}';
} else
return '';
} else {
if (value.toInt() == 0) return '${date.day}/ ${date.year}';
if (value.toInt() == widget.labResultHistory.length - 1)
return '${date.day}/ ${date.year}';
if (xAxixs.contains(value.toInt())) {
return '${date.day}/ ${date.year}';
}
}
return '';
},
),
leftTitles: SideTitles(
showTitles: true,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 10,
),
getTitles: (value) {
return '${value.toInt()}';
},
margin: 8,
//reservedSize: 30,
),
),
borderData: FlBorderData(
show: true,
border: const Border(
bottom: BorderSide(
color: Colors.black,
width: 0.5,
),
left: BorderSide(
color: Colors.black,
),
right: BorderSide(
color: Colors.black,
),
top: BorderSide(
color: Colors.transparent,
),
),
),
minX: 0,
maxX: (widget.labResultHistory.length - 1).toDouble(),
maxY: getMaxY() + 2,
minY: getMinY(),
lineBarsData: getData(),
);
}
double getMaxY() {
double max = 0;
widget.labResultHistory.forEach((element) {
try {
double resultValueDouble = double.parse(element.resultValue);
if (resultValueDouble > max) max = resultValueDouble;
} catch (e) {
print(e);
}
});
return max.roundToDouble();
}
double getMinY() {
double min = 0;
try {
min = double.parse(widget.labResultHistory[0].resultValue);
widget.labResultHistory.forEach((element) {
double resultValueDouble = double.parse(element.resultValue);
if (resultValueDouble < min) min = resultValueDouble;
});
} catch (e) {
print(e);
}
int value = min.toInt();
return value.toDouble();
}
List<LineChartBarData> getData() {
List<FlSpot> spots = List();
for (int index = 0; index < widget.labResultHistory.length; index++) {
try {
var resultValueDouble =
double.parse(widget.labResultHistory[index].resultValue);
spots.add(FlSpot(index.toDouble(), resultValueDouble));
} catch (e) {
print(e);
spots.add(FlSpot(index.toDouble(), 0.0));
}
}
final LineChartBarData lineChartBarData1 = LineChartBarData(
spots: spots,
isCurved: true,
colors: [Colors.red],
barWidth: 3,
isStrokeCapRound: true,
curveSmoothness: 0.12,
dotData: FlDotData(
show: false,
),
belowBarData: BarAreaData(
show: false,
),
);
return [
lineChartBarData1,
];
}
}

@ -0,0 +1,177 @@
import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/special_lab_result_details_page.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.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/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class AllLabSpecialResult extends StatefulWidget {
const AllLabSpecialResult({Key key}) : super(key: key);
@override
_AllLabSpecialResultState createState() => _AllLabSpecialResultState();
}
class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
String patientType;
String arrivalType;
PatiantInformtion patient;
bool isInpatient;
bool isFromLiveCare;
@override
void didChangeDependencies() {
super.didChangeDependencies();
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
patientType = routeArgs['patientType'];
arrivalType = routeArgs['arrivalType'];
isInpatient = routeArgs['isInpatient'];
isFromLiveCare = routeArgs['isFromLiveCare'];
print(arrivalType);
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getAllSpecialLabResult(patientId: patient.patientMRN),
builder: (context, LabsViewModel model, widget) => AppScaffold(
baseViewModel: model,
backgroundColor: Colors.grey[100],
isShowAppBar: true,
appBar: PatientProfileAppBar(
patient,
isInpatient: isInpatient,
),
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FractionallySizedBox(
widthFactor: 1.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).special + " " + TranslationBase.of(context).lab,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).result,
bold: true,
fontSize: 22,
),
],
),
),
...List.generate(
model.allSpecialLabList.length,
(index) => Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Colors.white,
),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
color: Colors.white),
child: Row(
children: [
Container(
width: 20,
height: 160,
decoration: BoxDecoration(
color: model.allSpecialLabList[index].isLiveCareAppointment
? Colors.red[900]
: !model.allSpecialLabList[index].isInOutPatient
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.allSpecialLabList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !model.allSpecialLabList[index].isInOutPatient
? TranslationBase.of(context).inPatientLabel.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
),
Expanded(
child: DoctorCard(
isNoMargin: true,
onTap: () => Navigator.push(
context,
FadePage(
page: SpecialLabResultDetailsPage(
resultData: model.allSpecialLabList[index].resultDataHTML,
patient: patient,
),
),
),
doctorName: model.allSpecialLabList[index].doctorName,
invoiceNO: ' ${model.allSpecialLabList[index].invoiceNo}',
profileUrl: model.allSpecialLabList[index].doctorImageURL,
branch: model.allSpecialLabList[index].projectName,
clinic: model.allSpecialLabList[index].clinicDescription,
appointmentDate: model.allSpecialLabList[index].orderDate,
orderNo: model.allSpecialLabList[index].orderNo,
isShowTime: false,
),
),
],
),
),
),
if (model.allSpecialLabList.isEmpty && patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText('No Lab Result Found'),
)
],
),
)
],
),
),
),
),
);
}
}

@ -5,8 +5,8 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'Lab_Result_details_wideget.dart';
import 'LineChartCurved.dart';
import 'Lab_Result_details_wideget.dart';
class LabResultChartAndDetails extends StatelessWidget {

@ -0,0 +1,62 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/LabResultHistory.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'Lab_Result_history_details_wideget.dart';
import 'LineChartCurvedLabHistory.dart';
class LabResultHistoryChartAndDetails extends StatelessWidget {
LabResultHistoryChartAndDetails({
Key key,
@required this.labResultHistory,
@required this.name,
}) : super(key: key);
final List<LabResultHistory> labResultHistory;
final String name;
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(12)),
child: LineChartCurvedLabHistory(
title: name,
labResultHistory: labResultHistory,
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(12)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).graphDetails,
fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 8,
),
LabResultHistoryDetailsWidget(
labResultHistory: labResultHistory.reversed.toList(),
),
],
),
),
],
),
);
}
}

@ -49,20 +49,16 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
body: AppScaffold(
isShowAppBar: false,
body: SingleChildScrollView(
child: Column(
children: [
LaboratoryResultWidget(
onTap: () async {},
billNo: widget.patientLabOrders.invoiceNo,
details: model.patientLabSpecialResult.length > 0
? model.patientLabSpecialResult[0].resultDataHTML
: null,
orderNo: widget.patientLabOrders.orderNo,
patientLabOrder: widget.patientLabOrders,
patient: widget.patient,
isInpatient: widget.patientType == "1",
),
],
child: LaboratoryResultWidget(
onTap: () async {},
billNo: widget.patientLabOrders.invoiceNo,
details: model.patientLabSpecialResult.length > 0
? model.patientLabSpecialResult[0].resultDataHTML
: null,
orderNo: widget.patientLabOrders.orderNo,
patientLabOrder: widget.patientLabOrders,
patient: widget.patient,
isInpatient: widget.patientType == "1",
),
),
),

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/lab_result/LabResult
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_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -88,16 +89,20 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
children: <Widget>[
Expanded(
child: Container(
margin: EdgeInsets.only(left: 10, right: 10),
margin: EdgeInsets.only(
left: 10, right: 10),
child: AppText(
TranslationBase.of(context).generalResult,
TranslationBase.of(context)
.generalResult,
bold: true,
))),
Container(
width: 25,
height: 25,
child: Icon(
_isShowMoreGeneral ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
_isShowMoreGeneral
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.grey[800],
size: 22,
),
@ -128,8 +133,11 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
model.labResultLists.length,
(index) => LabResultWidget(
patientLabOrder: widget.patientLabOrder,
filterName: model.labResultLists[index].filterName,
patientLabResultList: model.labResultLists[index].patientLabResultList,
filterName: model
.labResultLists[index].filterName,
patientLabResultList: model
.labResultLists[index]
.patientLabResultList,
patient: widget.patient,
isInpatient: widget.isInpatient,
),
@ -140,6 +148,12 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
),
],
),
)
else
Container(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
),
),
SizedBox(
height: 15,
@ -166,16 +180,20 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
children: <Widget>[
Expanded(
child: Container(
margin: EdgeInsets.only(left: 10, right: 10),
margin: EdgeInsets.only(
left: 10, right: 10),
child: AppText(
TranslationBase.of(context).specialResult,
TranslationBase.of(context)
.specialResult,
bold: true,
))),
Container(
width: 25,
height: 25,
child: Icon(
_isShowMore ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
_isShowMore
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.grey[800],
size: 22,
),
@ -200,10 +218,14 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
width: double.infinity,
child: !Helpers.isTextHtml(widget.details)
? AppText(
widget.details ?? TranslationBase.of(context).noDataAvailable,
widget.details ??
TranslationBase.of(context)
.noDataAvailable,
)
: Html(
data: widget.details ?? TranslationBase.of(context).noDataAvailable,
data: widget.details ??
TranslationBase.of(context)
.noDataAvailable,
),
),
),

@ -0,0 +1,83 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.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/errors/error_message.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
class SpecialLabResultDetailsPage extends StatelessWidget {
final String resultData;
final PatiantInformtion patient;
const SpecialLabResultDetailsPage({Key key, this.resultData, this.patient}) : super(key: key);
@override
Widget build(BuildContext context) {
return BaseView<PatientMedicalReportViewModel>(
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: PatientProfileAppBar(
patient,
),
body: Container(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"Special Lab ",
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
),
AppText(
"Result",
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
)
],
),
),
resultData != null
? Container(
width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)),
border: Border.fromBorderSide(
BorderSide(
color: Colors.white,
width: 1.0,
),
),
),
child: Html(data: resultData ?? ""),
)
: Container(
child: ErrorMessage(
error: "No Data",
),
),
],
),
),
),
),
);
}
}

@ -75,8 +75,6 @@ class MedicalReportDetailPage extends StatelessWidget {
),
),
child: Html(
data: medicalReport.reportDataHtml ?? ""
),
) : Container(

@ -205,7 +205,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
),
],
),
if ( (isInpatient && isMyPatient )? true:isFromLiveCare
if ( (isInpatient )? true:isFromLiveCare
? patient.episodeNo != null
: patient.patientStatusType != null && patient.patientStatusType == 43)
BaseView<SOAPViewModel>(
@ -223,7 +223,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
AppButton(
title:
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
color: isFromLiveCare
color: isFromLiveCare ||isInpatient
? Colors.red.shade700
: patient.patientStatusType == 43
? Colors.red.shade700
@ -250,7 +250,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
AppButton(
title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: (isInpatient &&isMyPatient ) || isFromLiveCare
color: (isInpatient ) || isFromLiveCare
? Colors.red.shade700
: patient.patientStatusType == 43
? Colors.red.shade700

@ -47,6 +47,12 @@ class ProfileGridForInPatient extends StatelessWidget {
LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).specialResult,
ALL_SPECIAL_LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).result,
@ -124,30 +130,35 @@ class ProfileGridForInPatient extends StatelessWidget {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15),
child: StaggeredGridView.countBuilder(
child: GridView(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
crossAxisCount: 3,
itemCount: cardsList.length,
staggeredTileBuilder: (int index) => StaggeredTile.fit(1),
itemBuilder: (BuildContext context, int index) => PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: cardsList[index].nameLine1,
nameLine2: cardsList[index].nameLine2,
route: cardsList[index].route,
icon: cardsList[index].icon,
isInPatient: cardsList[index].isInPatient,
isDischargedPatient: cardsList[index].isDischargedPatient,
isDisable: cardsList[index].isDisable,
onTap: cardsList[index].onTap,
isLoading: cardsList[index].isLoading,
physics: BouncingScrollPhysics(),
// if you want IOS bouncing effect, otherwise remove this line
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisSpacing: 10,
mainAxisSpacing: 10,
crossAxisCount: 3,
),
//change the number as you want
children: cardsList.map((item) {
return PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: item.nameLine1,
nameLine2: item.nameLine2,
route: item.route,
icon: item.icon,
isInPatient: item.isInPatient,
isDischargedPatient: item.isDischargedPatient,
isDisable: item.isDisable,
onTap: item.onTap,
isLoading: item.isLoading,
);
}).toList(),
),
);
}

@ -33,112 +33,60 @@ class ProfileGridForOther extends StatelessWidget {
@override
Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS,
'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'patient/lab_results.png',
TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).service,
RADIOLOGY_PATIENT,
'patient/health_summary.png',
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).specialResult,
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'patient/order_prescription.png',
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service,
RADIOLOGY_PATIENT, 'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY,
'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patient,
"ECG",
PATIENT_ECG,
'patient/patient_sick_leave.png',
PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'patient/patient_sick_leave.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'patient/Order_Procedures.png',
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures,
ORDER_PROCEDURE, 'patient/Order_Procedures.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase
.of(context)
.insurance,
TranslationBase
.of(context)
.service,
PATIENT_INSURANCE_APPROVALS_NEW,
'patient/vital_signs.png',
PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).service,
PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase
.of(context)
.patientSick,
TranslationBase
.of(context)
.leave,
ADD_SICKLEAVE,
PatientProfileCardModel(TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE,
'patient/patient_sick_leave.png',
isInPatient: isInpatient),
if (isFromLiveCare ||
(patient.appointmentNo != null && patient.appointmentNo != 0))
PatientProfileCardModel(
TranslationBase
.of(context)
.patient,
TranslationBase
.of(context)
.ucaf,
PATIENT_UCAF_REQUEST,
'patient/ucaf.png',
if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0))
PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).ucaf,
PATIENT_UCAF_REQUEST, 'patient/ucaf.png',
isInPatient: isInpatient,
isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 ||
patient.appointmentNo == null ),
if (isFromLiveCare ||
(patient.appointmentNo != null && patient.appointmentNo != 0))
isDisable: isFromLiveCare
? patient.appointmentNo == null
: patient.patientStatusType != 43 || patient.appointmentNo == null),
if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0))
PatientProfileCardModel(
TranslationBase
.of(context)
.referral,
TranslationBase
.of(context)
.patient,
REFER_PATIENT_TO_DOCTOR,
'patient/refer_patient.png',
isInPatient: isInpatient,
isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 ||
patient.appointmentNo == null ,
TranslationBase.of(context).referral,
TranslationBase.of(context).patient,
REFER_PATIENT_TO_DOCTOR,
'patient/refer_patient.png',
isInPatient: isInpatient,
isDisable: isFromLiveCare
? patient.appointmentNo == null
: patient.patientStatusType != 43 || patient.appointmentNo == null,
),
if (isFromLiveCare ||
(patient.appointmentNo != null && patient.appointmentNo != 0))
PatientProfileCardModel(
TranslationBase
.of(context)
.admission,
TranslationBase
.of(context)
.request,
PATIENT_ADMISSION_REQUEST,
'patient/admission_req.png',
if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0))
PatientProfileCardModel(TranslationBase.of(context).admission, TranslationBase.of(context).request,
PATIENT_ADMISSION_REQUEST, 'patient/admission_req.png',
isInPatient: isInpatient,
isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 ||
patient.appointmentNo == null
),
isDisable: isFromLiveCare
? patient.appointmentNo == null
: patient.patientStatusType != 43 || patient.appointmentNo == null),
];
return Column(
@ -168,9 +116,7 @@ class ProfileGridForOther extends StatelessWidget {
isDisable: cardsList[index].isDisable,
onTap: cardsList[index].onTap,
isLoading: cardsList[index].isLoading,
isFromLiveCare: isFromLiveCare
),
isFromLiveCare: isFromLiveCare),
),
),
],

@ -16,96 +16,54 @@ class ProfileGridForSearch extends StatelessWidget {
String from;
String to;
ProfileGridForSearch(
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.height,
this.isInpatient, this.from,this.to})
ProfileGridForSearch(
{Key key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient, this.from, this.to})
: super(key: key);
@override
Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS,
'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'patient/lab_results.png',
TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).service,
RADIOLOGY_PATIENT,
'patient/health_summary.png',
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).specialResult,
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'patient/order_prescription.png',
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service,
RADIOLOGY_PATIENT, 'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY,
'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patient,
"ECG",
PATIENT_ECG,
'patient/patient_sick_leave.png',
PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'patient/patient_sick_leave.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'patient/Order_Procedures.png',
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures,
ORDER_PROCEDURE, 'patient/Order_Procedures.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).insurance,
TranslationBase.of(context).service,
PATIENT_INSURANCE_APPROVALS_NEW,
'patient/vital_signs.png',
PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).service,
PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave,
ADD_SICKLEAVE,
PatientProfileCardModel(TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE,
'patient/patient_sick_leave.png',
isInPatient: isInpatient),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).ucaf,
PATIENT_UCAF_REQUEST,
'patient/ucaf.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).ucaf,
PATIENT_UCAF_REQUEST, 'patient/ucaf.png',
isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).referral,
TranslationBase.of(context).patient,
REFER_PATIENT_TO_DOCTOR,
'patient/refer_patient.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
PatientProfileCardModel(TranslationBase.of(context).referral, TranslationBase.of(context).patient,
REFER_PATIENT_TO_DOCTOR, 'patient/refer_patient.png',
isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).admission,
TranslationBase.of(context).request,
PATIENT_ADMISSION_REQUEST,
'patient/admission_req.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
PatientProfileCardModel(TranslationBase.of(context).admission, TranslationBase.of(context).request,
PATIENT_ADMISSION_REQUEST, 'patient/admission_req.png',
isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false),
];
return Column(

File diff suppressed because it is too large Load Diff

@ -8,6 +8,7 @@ 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_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -31,12 +32,9 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
return Container(
child: CardWithBgWidget(
bgColor:
widget.reply.infoStatus == 4
? IN_PROGRESS_COLOR
: widget.reply.infoStatus == 3 ?Color(0xFFD02127): Colors.green[600],
widget.reply.status == 2 ? Colors.green[600] : Color(0xFFD02127),
hasBorder: false,
widget: Container(
// padding: EdgeInsets.only(left: 20, right: 0, bottom: 0),
child: InkWell(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -51,12 +49,15 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: widget.reply.infoStatus ==1? TranslationBase.of(context).replayCallStatus:widget.reply.infoStatus ==2? TranslationBase.of(context).patientArrived:widget.reply.infoStatus ==3? TranslationBase.of(context).calledAndNoResponse:widget.reply.infoStatus ==4? TranslationBase.of(context).underProcess:widget.reply.infoStatus ==6? TranslationBase.of(context).textResponse:'' ,//widget.reply.status==2 ? "Active":widget.reply.status==1?"Hold":"Cancelled",//TranslationBase.of(context).replied :TranslationBase.of(context).unReplied ,
text: widget.reply.status == 2
? TranslationBase.of(context).active
: widget.reply.status == 1
? TranslationBase.of(context).onHold
: TranslationBase.of(context).cancelled,
style: TextStyle(
color: widget.reply.infoStatus == 4
? IN_PROGRESS_COLOR
: widget.reply.infoStatus == 3 ?Color(0xFFD02127): Colors.green[600],
color: widget.reply.status == 2
? Colors.green[600]
: Color(0xFFD02127),
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 2.0 * SizeConfig.textMultiplier)),
@ -73,7 +74,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
.toString() +
" " +
AppDateUtils.getMonth(
AppDateUtils.getDateTimeFromServerFormat(
AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn)
.month)
.toString()
@ -88,18 +89,17 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
),
AppText(
AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn)
.hour
.toString()
+ ":"+
widget.reply.createdOn)
.hour
.toString() +
":" +
AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn)
widget.reply.createdOn)
.minute
.toString(),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
)
],
),
],
@ -109,7 +109,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
children: [
Expanded(
child: AppText(
Helpers.capitalize( widget.reply.patientName),
Helpers.capitalize(widget.reply.patientName),
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
@ -119,7 +119,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
margin: EdgeInsets.symmetric(horizontal: 4),
child: InkWell(
onTap: () {
launch("tel://" +widget.reply.mobileNumber);
launch("tel://" + widget.reply.mobileNumber);
},
child: Icon(
Icons.phone,
@ -163,7 +163,6 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
fit: BoxFit.cover,
),
),
],
),
SizedBox(
@ -173,89 +172,91 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// SizedBox(height: 10,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomRow(
label: TranslationBase.of(context).fileNumber,
value: widget.reply.patientID.toString(),
),
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).fileNumber,
style: TextStyle(
fontSize: 14,color: Color(0xFF575757),fontWeight: FontWeight.bold, fontFamily: 'Poppins')),
new TextSpan(
text: widget.reply.patientID.toString(),
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
CustomRow(
label: TranslationBase.of(context).age + " : ",
value:
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}",
),
),
Container(
width: MediaQuery.of(context).size.width*0.45,
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).age +
" : ",
style: TextStyle(fontSize: 14,color: Color(0xFF575757),fontWeight: FontWeight.bold)),
new TextSpan(
text:
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 15)),
],
),
CustomRow(
width: MediaQuery.of(context).size.width * .3,
label: TranslationBase.of(context).infoStatus +
":",
value: widget.reply.infoStatus == 1
? TranslationBase.of(context)
.replayCallStatus
: widget.reply.infoStatus == 2
? TranslationBase.of(context)
.patientArrived
: widget.reply.infoStatus == 3
? TranslationBase.of(context)
.calledAndNoResponse
: widget.reply.infoStatus == 4
? TranslationBase.of(context)
.underProcess
: widget.reply.infoStatus == 6
? TranslationBase.of(
context)
.textResponse
: '',
),
)
],
),
SizedBox(
height: 10,
),
],
),
],
),
],
),
Container(
width: MediaQuery.of(context).size.width * 0.5,
child: RichText(
maxLines: 3,
overflow: TextOverflow.ellipsis,
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text:"Patient Question :" ,//TranslationBase.of(context).doctorResponse + " : ",
style:
TextStyle(fontSize: 14, fontFamily: 'Poppins', color: Color(0xFF575757),fontWeight: FontWeight.bold)),
new TextSpan(
text: widget.reply?.remarks?.trim()??'',
style: TextStyle(
fontFamily: 'Poppins',
Container(
width: MediaQuery.of(context).size.width * 0.5,
child: RichText(
maxLines: 3,
overflow: TextOverflow.ellipsis,
text: new TextSpan(
style: new TextStyle(
fontSize:
1.3 * SizeConfig.textMultiplier,
color: Color(0xFF575757)),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.requestType +
": ",
style: TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
2.8,
color: Color(0xFF575757),
fontSize: 12)),
],
//TranslationBase.of(context).doctorResponse + " : ",
)),
new TextSpan(
text:
"${widget.reply.requestTypeDescription}",
style: TextStyle(
fontFamily: 'Poppins',
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
)),
],
),
),
),
),
],)
],
)
],
),
// Container(

@ -6,6 +6,7 @@ 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_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -382,36 +383,20 @@ class PatientCard extends StatelessWidget {
"${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}",
),
if (patientInfo.admissionDate != null)
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.roomNo +
" : ",
style: TextStyle(fontSize: 12)),
new TextSpan(
text:
"${patientInfo.roomId}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 13)),
]))),
CustomRow(
label:
TranslationBase.of(context).roomNo + " : ",
value: "${patientInfo.roomId}",
),
if (isFromLiveCare)
Column(
children: [
CustomRow(label: TranslationBase.of(context)
.clinic +
" : ",
value: patientInfo.clinicName,),
CustomRow(
label: TranslationBase.of(context).clinic +
" : ",
value: patientInfo.clinicName,
),
],
),
]))
@ -470,37 +455,4 @@ class PatientCard extends StatelessWidget {
}
}
class CustomRow extends StatelessWidget {
const CustomRow({
Key key,
this.label,
this.value,
}) : super(key: key);
final String label;
final String value;
@override
Widget build(BuildContext context) {
return Row(
children: [
AppText(
label,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.8,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
AppText(
value,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
);
}
}

@ -48,7 +48,9 @@ class PatientProfileButton extends StatelessWidget {
this.isDischargedPatient = false,
this.isSelectInpatient = false,
this.isDartIcon = false,
this.dartIcon, this.isFromLiveCare = false, this.color,
this.dartIcon,
this.isFromLiveCare = false,
this.color,
}) : super(key: key);
@override
@ -73,38 +75,40 @@ class PatientProfileButton extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
child: isDartIcon ? Icon(
dartIcon, size: 30, color: color?? Color(0xFF333C45),) : new Image
.asset(
url + icon,
width: 30,
height: 30,
fit: BoxFit.contain,
),
child: isDartIcon
? Icon(
dartIcon,
size: 30,
color: color ?? Color(0xFF333C45),
)
: new Image.asset(
url + icon,
width: 30,
height: 30,
fit: BoxFit.contain,
),
)
],
)),
Container(
alignment: projectsProvider.isArabic
? Alignment.topRight
: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 8),
alignment: projectsProvider.isArabic ? Alignment.topRight : Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 7),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
!projectsProvider.isArabic ? this.nameLine1 : nameLine2,
color: color??Color(0xFF2B353E),
color: color ?? Color(0xFF2B353E),
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 1.5,
fontSize: SizeConfig.textMultiplier * 1.35,
),
AppText(
!projectsProvider.isArabic ? this.nameLine2 : nameLine1,
color: color??Color(0xFF2B353E),
color: color ?? Color(0xFF2B353E),
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 1.5,
fontSize: SizeConfig.textMultiplier * 1.35,
),
if (isLoading) DrAppCircularProgressIndeicator()
],
@ -117,7 +121,7 @@ class PatientProfileButton extends StatelessWidget {
color: isDisable ? Colors.grey.withOpacity(0.4) : Colors.white,
borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border.fromBorderSide(BorderSide(
color: color??Color(0xffBBBBBB),
color: color ?? Color(0xffBBBBBB),
width: 1,
)),
),
@ -145,7 +149,7 @@ class PatientProfileButton extends StatelessWidget {
'isInpatient': isInPatient,
'isDischargedPatient': isDischargedPatient,
'isSelectInpatient': isSelectInpatient,
"isFromLiveCare":isFromLiveCare
"isFromLiveCare": isFromLiveCare
});
}
}

@ -16,12 +16,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
final bool isInpatient;
ProfileMedicalInfoWidget(
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to, this.isInpatient});
{Key key, this.patient, this.patientType, this.arrivalType, this.from, this.to, this.isInpatient});
@override
Widget build(BuildContext context) {
@ -35,27 +30,27 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'patient/vital_signs.png'),
// if (selectedPatientType != 7)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: HEALTH_SUMMARY,
nameLine1: "Health" ,//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",//TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'patient/vital_signs.png'),
// if (selectedPatientType != 7)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: HEALTH_SUMMARY,
nameLine1: "Health", //TranslationBase.of(context).medicalReport,
nameLine2: "Summary", //TranslationBase.of(context).summaryReport,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,
patient: patient,
@ -65,17 +60,26 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ALL_SPECIAL_LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: 'Special Result',
icon: 'patient/lab_results.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient:isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/health_summary.png'),
PatientProfileButton(
key: key,
patient: patient,
@ -94,37 +98,37 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'),
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/vital_signs.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'),
if (patient.appointmentNo!=null && patient.appointmentNo!=0)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/vital_signs.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
@ -135,7 +139,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'patient/ucaf.png'),
if (patient.appointmentNo!=null && patient.appointmentNo!=0)
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
@ -146,7 +150,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
if (patient.appointmentNo!=null && patient.appointmentNo!=0)
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
key: key,
patient: patient,
@ -174,7 +178,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
nameLine1:"Order", //"Text",
nameLine1: "Order", //"Text",
nameLine2: "Sheet",
icon: 'patient/Progress_notes.png'),
],

@ -40,8 +40,8 @@ class CardWithBgWidget extends StatelessWidget {
color: bgColor ?? HexColor('#58434F'),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),),),
topRight: Radius.circular(10),
bottomRight: Radius.circular(10),),),
width: 10,
),
bottom: 1,

@ -0,0 +1,43 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:flutter/material.dart';
import '../app_texts_widget.dart';
class CustomRow extends StatelessWidget {
const CustomRow({
Key key,
this.label,
this.value, this.labelSize, this.valueSize, this.width,
}) : super(key: key);
final String label;
final String value;
final double labelSize;
final double valueSize;
final double width;
@override
Widget build(BuildContext context) {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
label,
fontSize: labelSize??SizeConfig.getTextMultiplierBasedOnWidth() * 2.8,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
AppText(
value,
fontSize: valueSize??SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
);
}
}
Loading…
Cancel
Save