flutter 2 models

merge-requests/893/head
hussam al-habibeh 4 years ago
parent 1146f613df
commit 24618e5232

@ -39,10 +39,14 @@ class PatientSearchViewModel extends BaseViewModel {
if (strExist) { if (strExist) {
filterData = []; filterData = [];
for (var i = 0; i < _outPatientService.patientList.length; i++) { for (var i = 0; i < _outPatientService.patientList.length; i++) {
String firstName = _outPatientService.patientList[i].firstName!.toUpperCase(); String firstName =
String lastName = _outPatientService.patientList[i].lastName!.toUpperCase(); _outPatientService.patientList[i].firstName!.toUpperCase();
String mobile = _outPatientService.patientList[i].mobileNumber!.toUpperCase(); String lastName =
String patientID = _outPatientService.patientList[i].patientId.toString(); _outPatientService.patientList[i].lastName!.toUpperCase();
String mobile =
_outPatientService.patientList[i].mobileNumber!.toUpperCase();
String patientID =
_outPatientService.patientList[i].patientId.toString();
if (firstName.contains(str.toUpperCase()) || if (firstName.contains(str.toUpperCase()) ||
lastName.contains(str.toUpperCase()) || lastName.contains(str.toUpperCase()) ||
@ -58,7 +62,8 @@ class PatientSearchViewModel extends BaseViewModel {
} }
} }
getOutPatient(PatientSearchRequestModel patientSearchRequestModel, {bool isLocalBusy = false}) async { getOutPatient(PatientSearchRequestModel patientSearchRequestModel,
{bool isLocalBusy = false}) async {
if (isLocalBusy) { if (isLocalBusy) {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
} else { } else {
@ -88,9 +93,11 @@ class PatientSearchViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel, {bool isLocalBusy = false}) async { getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel,
{bool isLocalBusy = false}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _outPatientService.getPatientFileInformation(patientSearchRequestModel); await _outPatientService
.getPatientFileInformation(patientSearchRequestModel);
if (_outPatientService.hasError) { if (_outPatientService.hasError) {
error = _outPatientService.error!; error = _outPatientService.error!;
setState(ViewState.Error); setState(ViewState.Error);
@ -109,22 +116,32 @@ class PatientSearchViewModel extends BaseViewModel {
String dateTo; String dateTo;
String dateFrom; String dateFrom;
if (OutPatientFilterType.Previous == outPatientFilterType) { if (OutPatientFilterType.Previous == outPatientFilterType) {
selectedFromDate = DateTime(DateTime.now().year, DateTime.now().month - 1, DateTime.now().day); selectedFromDate = DateTime(
selectedToDate = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); DateTime.now().year, DateTime.now().month - 1, DateTime.now().day);
selectedToDate = DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day - 1);
dateTo = AppDateUtils.convertDateToFormat(selectedToDate!, 'yyyy-MM-dd'); dateTo = AppDateUtils.convertDateToFormat(selectedToDate!, 'yyyy-MM-dd');
dateFrom = dateFrom =
AppDateUtils.convertDateToFormat(selectedFromDate!, 'yyyy-MM-dd'); AppDateUtils.convertDateToFormat(selectedFromDate!, 'yyyy-MM-dd');
} else if (OutPatientFilterType.NextWeek == outPatientFilterType) { } else if (OutPatientFilterType.NextWeek == outPatientFilterType) {
dateTo = AppDateUtils.convertDateToFormat( dateTo = AppDateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 6), 'yyyy-MM-dd'); DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 6),
'yyyy-MM-dd');
dateFrom = AppDateUtils.convertDateToFormat( dateFrom = AppDateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 1), 'yyyy-MM-dd'); DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 1),
'yyyy-MM-dd');
} else { } else {
dateFrom = AppDateUtils.convertDateToFormat( dateFrom = AppDateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day),
'yyyy-MM-dd');
dateTo = AppDateUtils.convertDateToFormat( dateTo = AppDateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day),
'yyyy-MM-dd');
} }
PatientSearchRequestModel currentModel = PatientSearchRequestModel(); PatientSearchRequestModel currentModel = PatientSearchRequestModel();
currentModel.patientID = patientSearchRequestModel!.patientID; currentModel.patientID = patientSearchRequestModel!.patientID;
@ -138,23 +155,27 @@ class PatientSearchViewModel extends BaseViewModel {
filterData = _outPatientService.patientList; filterData = _outPatientService.patientList;
} }
PatientInPatientService _inPatientService = locator<PatientInPatientService>(); PatientInPatientService _inPatientService =
locator<PatientInPatientService>();
List<PatiantInformtion> get inPatientList => _inPatientService.inPatientList; List<PatiantInformtion> get inPatientList => _inPatientService.inPatientList;
List<PatiantInformtion> get myIinPatientList => _inPatientService.myInPatientList; List<PatiantInformtion> get myIinPatientList =>
_inPatientService.myInPatientList;
List<PatiantInformtion> filteredInPatientItems = []; List<PatiantInformtion> filteredInPatientItems = [];
List<PatiantInformtion> filteredMyInPatientItems = []; List<PatiantInformtion> filteredMyInPatientItems = [];
Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false, bool isLocalBusy = false}) async { Future getInPatientList(PatientSearchRequestModel requestModel,
{bool isMyInpatient = false, bool isLocalBusy = false}) async {
await getDoctorProfile(); await getDoctorProfile();
if (isLocalBusy) { if (isLocalBusy) {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
} else { } else {
setState(ViewState.Busy); setState(ViewState.Busy);
} }
if (inPatientList.length == 0) await _inPatientService.getInPatientList(requestModel, false); if (inPatientList.length == 0)
await _inPatientService.getInPatientList(requestModel, false);
if (_inPatientService.hasError) { if (_inPatientService.hasError) {
error = _inPatientService.error!; error = _inPatientService.error!;
if (isLocalBusy) { if (isLocalBusy) {
@ -169,7 +190,10 @@ class PatientSearchViewModel extends BaseViewModel {
} }
} }
sortInPatient({bool isDes = false, required bool isAllClinic, required bool isMyInPatient}) { sortInPatient(
{bool isDes = false,
required bool isAllClinic,
required bool isMyInPatient}) {
if (isMyInPatient if (isMyInPatient
? myIinPatientList.length > 0 ? myIinPatientList.length > 0
: isAllClinic : isAllClinic
@ -182,12 +206,12 @@ class PatientSearchViewModel extends BaseViewModel {
: [...filteredInPatientItems]; : [...filteredInPatientItems];
if (isDes) if (isDes)
localInPatient.sort((PatiantInformtion a, PatiantInformtion b) => b localInPatient.sort((PatiantInformtion a, PatiantInformtion b) => b
.admissionDateWithDateTimeForm .admissionDateWithDateTimeForm!
.compareTo(a.admissionDateWithDateTimeForm)); .compareTo(a.admissionDateWithDateTimeForm!));
else else
localInPatient.sort((PatiantInformtion a, PatiantInformtion b) => a localInPatient.sort((PatiantInformtion a, PatiantInformtion b) => a
.admissionDateWithDateTimeForm .admissionDateWithDateTimeForm!
.compareTo(b.admissionDateWithDateTimeForm)); .compareTo(b.admissionDateWithDateTimeForm!));
if (isMyInPatient) { if (isMyInPatient) {
filteredMyInPatientItems.clear(); filteredMyInPatientItems.clear();
filteredMyInPatientItems.addAll(localInPatient); filteredMyInPatientItems.addAll(localInPatient);

@ -1,7 +1,7 @@
class GetPhysicalExamReqModel { class GetPhysicalExamReqModel {
int? patientMRN; int? patientMRN;
int? appointmentNo; int? appointmentNo;
int admissionNo; int? admissionNo;
String? episodeID; String? episodeID;
String? from; String? from;
String? to; String? to;

@ -1,7 +1,7 @@
class GetEpisodeForInpatientReqModel { class GetEpisodeForInpatientReqModel {
int patientID; int? patientID;
int patientTypeID; int? patientTypeID;
int admissionNo; int? admissionNo;
GetEpisodeForInpatientReqModel( GetEpisodeForInpatientReqModel(
{this.patientID, this.patientTypeID, this.admissionNo}); {this.patientID, this.patientTypeID, this.admissionNo});

@ -1,7 +1,7 @@
class PostEpisodeForInpatientRequestModel { class PostEpisodeForInpatientRequestModel {
int admissionNo; int? admissionNo;
int patientID; int? patientID;
int patientTypeID; int? patientTypeID;
PostEpisodeForInpatientRequestModel( PostEpisodeForInpatientRequestModel(
{this.admissionNo, this.patientID, this.patientTypeID = 1}); {this.admissionNo, this.patientID, this.patientTypeID = 1});

@ -1,14 +1,14 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedAllergy { class MySelectedAllergy {
MasterKeyModel selectedAllergySeverity; MasterKeyModel? selectedAllergySeverity;
MasterKeyModel selectedAllergy; MasterKeyModel? selectedAllergy;
String remark; String? remark;
bool isChecked; bool? isChecked;
bool isExpanded; bool? isExpanded;
bool isLocal; bool? isLocal;
int createdBy; int? createdBy;
bool hasValidationError; bool? hasValidationError;
MySelectedAllergy( MySelectedAllergy(
{this.selectedAllergySeverity, {this.selectedAllergySeverity,
@ -19,5 +19,4 @@ class MySelectedAllergy {
this.isLocal = true, this.isLocal = true,
this.createdBy, this.createdBy,
this.hasValidationError = false}); this.hasValidationError = false});
} }

@ -1,24 +1,26 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedAssessment { class MySelectedAssessment {
MasterKeyModel selectedICD; MasterKeyModel? selectedICD;
MasterKeyModel selectedDiagnosisCondition; MasterKeyModel? selectedDiagnosisCondition;
MasterKeyModel selectedDiagnosisType; MasterKeyModel? selectedDiagnosisType;
String remark; String? remark;
int appointmentId; int? appointmentId;
int createdBy; int? createdBy;
String createdOn; String? createdOn;
int doctorID; int? doctorID;
String doctorName; String? doctorName;
String icdCode10ID; String? icdCode10ID;
MySelectedAssessment( MySelectedAssessment(
{this.selectedICD, {this.selectedICD,
this.selectedDiagnosisCondition, this.selectedDiagnosisCondition,
this.selectedDiagnosisType, this.selectedDiagnosisType,
this.remark, this.appointmentId, this.createdBy, this.remark,
this.createdOn, this.appointmentId,
this.doctorID, this.createdBy,
this.doctorName, this.createdOn,
this.icdCode10ID}); this.doctorID,
this.doctorName,
this.icdCode10ID});
} }

@ -3,8 +3,8 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class MySelectedHistory { class MySelectedHistory {
MasterKeyModel selectedHistory; MasterKeyModel selectedHistory;
String remark; String remark;
bool isChecked; bool? isChecked;
bool isLocal; bool? isLocal;
MySelectedHistory( MySelectedHistory(
{this.selectedHistory, this.remark, this.isChecked, this.isLocal = true}); {this.selectedHistory, this.remark, this.isChecked, this.isLocal = true});

@ -1,15 +1,15 @@
class AdmissionOrdersModel { class AdmissionOrdersModel {
int procedureID; int? procedureID;
String procedureName; String? procedureName;
String procedureNameN; String? procedureNameN;
int orderNo; int? orderNo;
int doctorID; int? doctorID;
int clinicID; int? clinicID;
String createdOn; String? createdOn;
int createdBy; int? createdBy;
String editedOn; String? editedOn;
int editedBy; int? editedBy;
String createdByName; String? createdByName;
AdmissionOrdersModel( AdmissionOrdersModel(
{this.procedureID, {this.procedureID,

@ -1,20 +1,20 @@
class AdmissionOrdersRequestModel { class AdmissionOrdersRequestModel {
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int deviceTypeID; int? deviceTypeID;
String tokenID; String? tokenID;
int patientID; int? patientID;
int admissionNo; int? admissionNo;
String sessionID; String? sessionID;
int projectID; int? projectID;
String setupID; String? setupID;
bool patientOutSA; bool? patientOutSA;
int patientType; int? patientType;
int patientTypeID; int? patientTypeID;
AdmissionOrdersRequestModel( AdmissionOrdersRequestModel(
{this.isDentalAllowedBackend, {this.isDentalAllowedBackend,

@ -16,10 +16,10 @@
// } // }
class Countries { class Countries {
String name; String? name;
String nameAr; String? nameAr;
String code; String? code;
String countryCode; String? countryCode;
Countries({this.name, this.nameAr, this.code, this.countryCode}); Countries({this.name, this.nameAr, this.code, this.countryCode});

@ -1,11 +1,14 @@
class GetDischargeSummaryReqModel { class GetDischargeSummaryReqModel {
int patientID; int? patientID;
int admissionNo; int? admissionNo;
int patientType; int? patientType;
int patientTypeID; int? patientTypeID;
GetDischargeSummaryReqModel( GetDischargeSummaryReqModel(
{this.patientID, this.admissionNo, this.patientType = 1, this.patientTypeID=1}); {this.patientID,
this.admissionNo,
this.patientType = 1,
this.patientTypeID = 1});
GetDischargeSummaryReqModel.fromJson(Map<String, dynamic> json) { GetDischargeSummaryReqModel.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID']; patientID = json['PatientID'];

@ -1,33 +1,33 @@
class GetDischargeSummaryResModel { class GetDischargeSummaryResModel {
String setupID; String? setupID;
int projectID; int? projectID;
int dischargeNo; int? dischargeNo;
String dischargeDate; String? dischargeDate;
int admissionNo; int? admissionNo;
int assessmentNo; int? assessmentNo;
int patientType; int? patientType;
int patientID; int? patientID;
int clinicID; int? clinicID;
int doctorID; int? doctorID;
String finalDiagnosis; String? finalDiagnosis;
String persentation; String? persentation;
String pastHistory; String? pastHistory;
String planOfCare; String? planOfCare;
String investigations; String? investigations;
String followupPlan; String? followupPlan;
String conditionOnDischarge; String? conditionOnDischarge;
String significantFindings; String? significantFindings;
String planedProcedure; String? planedProcedure;
int daysStayed; int? daysStayed;
String remarks; String? remarks;
String eRCare; String? eRCare;
int status; int? status;
bool isActive; bool? isActive;
int createdBy; int? createdBy;
String createdOn; String? createdOn;
int editedBy; int? editedBy;
String editedOn; String? editedOn;
bool isPatientDied; bool? isPatientDied;
dynamic isMedicineApproved; dynamic isMedicineApproved;
dynamic isOpenBillDischarge; dynamic isOpenBillDischarge;
dynamic activatedDate; dynamic activatedDate;
@ -36,16 +36,16 @@ class GetDischargeSummaryResModel {
dynamic patientCodition; dynamic patientCodition;
dynamic others; dynamic others;
dynamic reconciliationInstruction; dynamic reconciliationInstruction;
String dischargeInstructions; String? dischargeInstructions;
String reason; String? reason;
dynamic dischargeDisposition; dynamic dischargeDisposition;
dynamic hospitalID; dynamic hospitalID;
String createdByName; String? createdByName;
dynamic createdByNameN; dynamic createdByNameN;
String editedByName; String? editedByName;
dynamic editedByNameN; dynamic editedByNameN;
String clinicName; String? clinicName;
String projectName; String? projectName;
GetDischargeSummaryResModel( GetDischargeSummaryResModel(
{this.setupID, {this.setupID,

@ -1,24 +1,24 @@
class CreateDoctorResponseModel { class CreateDoctorResponseModel {
String setupID; String? setupID;
int projectID; int? projectID;
String transactionNo; String? transactionNo;
int infoEnteredBy; int? infoEnteredBy;
int infoStatus; int? infoStatus;
int createdBy; int? createdBy;
int editedBy; int? editedBy;
String doctorResponse; String? doctorResponse;
int doctorID; int? doctorID;
CreateDoctorResponseModel( CreateDoctorResponseModel(
{this.setupID, {this.setupID,
this.projectID, this.projectID,
this.transactionNo, this.transactionNo,
this.infoEnteredBy, this.infoEnteredBy,
this.infoStatus, this.infoStatus,
this.createdBy, this.createdBy,
this.editedBy, this.editedBy,
this.doctorResponse, this.doctorResponse,
this.doctorID}); this.doctorID});
CreateDoctorResponseModel.fromJson(Map<String, dynamic> json) { CreateDoctorResponseModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];

@ -13,9 +13,9 @@ class RequestDoctorReply {
String? sessionID; String? sessionID;
bool? isLoginForDoctorApp; bool? isLoginForDoctorApp;
bool? patientOutSA; bool? patientOutSA;
int pageIndex; int? pageIndex;
int pageSize; int? pageSize;
int infoStatus; int? infoStatus;
RequestDoctorReply( RequestDoctorReply(
{this.projectID, {this.projectID,
@ -68,8 +68,7 @@ class RequestDoctorReply {
data['PatientOutSA'] = this.patientOutSA; data['PatientOutSA'] = this.patientOutSA;
data['PageIndex'] = this.pageIndex; data['PageIndex'] = this.pageIndex;
data['PageSize'] = this.pageSize; data['PageSize'] = this.pageSize;
if(this.infoStatus != null) if (this.infoStatus != null) data['InfoStatus'] = this.infoStatus;
data['InfoStatus'] = this.infoStatus;
return data; return data;
} }
} }

@ -5,17 +5,17 @@ class StartCallRes {
bool? isAuthenticated; bool? isAuthenticated;
int? messageStatus; int? messageStatus;
String? appointmentNo; String? appointmentNo;
bool isRecording; bool? isRecording;
StartCallRes( StartCallRes({
{this.result, this.result,
this.openSessionID, this.openSessionID,
this.openTokenID, this.openTokenID,
this.isAuthenticated, this.isAuthenticated,
this.appointmentNo, this.appointmentNo,
this.messageStatus, this.messageStatus,
this.isRecording = true, this.isRecording = true,
}); });
StartCallRes.fromJson(Map<String, dynamic> json) { StartCallRes.fromJson(Map<String, dynamic> json) {
result = json['Result']; result = json['Result'];

@ -1,54 +1,54 @@
class CreateUpdateOperationReportRequestModel { class CreateUpdateOperationReportRequestModel {
String setupID; String? setupID;
int patientID; int? patientID;
int reservationNo; int? reservationNo;
int admissionNo; int? admissionNo;
String preOpDiagmosis; String? preOpDiagmosis;
String postOpDiagmosis; String? postOpDiagmosis;
String surgeon; String? surgeon;
String assistant; String? assistant;
String anasthetist; String? anasthetist;
String operation; String? operation;
String inasion; String? inasion;
String finding; String? finding;
String surgeryProcedure; String? surgeryProcedure;
String postOpInstruction; String? postOpInstruction;
int createdBy; int? createdBy;
int editedBy; int? editedBy;
String complicationDetails; String? complicationDetails;
String bloodLossDetail; String? bloodLossDetail;
String histopathSpecimen; String? histopathSpecimen;
String microbiologySpecimen; String? microbiologySpecimen;
String otherSpecimen; String? otherSpecimen;
String scrubNurse; String? scrubNurse;
String circulatingNurse; String? circulatingNurse;
String bloodTransfusedDetail; String? bloodTransfusedDetail;
CreateUpdateOperationReportRequestModel( CreateUpdateOperationReportRequestModel(
{this.setupID, {this.setupID,
this.patientID, this.patientID,
this.reservationNo, this.reservationNo,
this.admissionNo, this.admissionNo,
this.preOpDiagmosis, this.preOpDiagmosis,
this.postOpDiagmosis, this.postOpDiagmosis,
this.surgeon, this.surgeon,
this.assistant, this.assistant,
this.anasthetist, this.anasthetist,
this.operation, this.operation,
this.inasion, this.inasion,
this.finding, this.finding,
this.surgeryProcedure, this.surgeryProcedure,
this.postOpInstruction, this.postOpInstruction,
this.createdBy, this.createdBy,
this.editedBy, this.editedBy,
this.complicationDetails, this.complicationDetails,
this.bloodLossDetail, this.bloodLossDetail,
this.histopathSpecimen, this.histopathSpecimen,
this.microbiologySpecimen, this.microbiologySpecimen,
this.otherSpecimen, this.otherSpecimen,
this.scrubNurse, this.scrubNurse,
this.circulatingNurse, this.circulatingNurse,
this.bloodTransfusedDetail}); this.bloodTransfusedDetail});
CreateUpdateOperationReportRequestModel.fromJson(Map<String, dynamic> json) { CreateUpdateOperationReportRequestModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];

@ -1,34 +1,34 @@
class GetOperationDetailsRequestModel { class GetOperationDetailsRequestModel {
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int deviceTypeID; int? deviceTypeID;
String tokenID; String? tokenID;
int patientID; int? patientID;
int reservationNo; int? reservationNo;
String sessionID; String? sessionID;
int projectID; int? projectID;
String setupID; String? setupID;
bool patientOutSA; bool? patientOutSA;
GetOperationDetailsRequestModel( GetOperationDetailsRequestModel(
{this.isDentalAllowedBackend = false, {this.isDentalAllowedBackend = false,
this.versionID, this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.deviceTypeID, this.deviceTypeID,
this.tokenID, this.tokenID,
this.patientID, this.patientID,
this.reservationNo, this.reservationNo,
this.sessionID, this.sessionID,
this.projectID, this.projectID,
this.setupID, this.setupID,
this.patientOutSA}); this.patientOutSA});
GetOperationDetailsRequestModel.fromJson(Map<String, dynamic> json) { GetOperationDetailsRequestModel.fromJson(Map<String, dynamic> json) {
isDentalAllowedBackend = json['isDentalAllowedBackend']; isDentalAllowedBackend = json['isDentalAllowedBackend'];

@ -1,74 +1,74 @@
class GetOperationDetailsResponseModel { class GetOperationDetailsResponseModel {
String setupID; String? setupID;
int projectID; int? projectID;
int reservationNo; int? reservationNo;
int patientID; int? patientID;
int admissionID; int? admissionID;
dynamic surgeryDate; dynamic surgeryDate;
String preOpDiagnosis; String? preOpDiagnosis;
String postOpDiagnosis; String? postOpDiagnosis;
String surgeon; String? surgeon;
String assistant; String? assistant;
String anasthetist; String? anasthetist;
String operation; String? operation;
String inasion; String? inasion;
String finding; String? finding;
String surgeryProcedure; String? surgeryProcedure;
String postOpInstruction; String? postOpInstruction;
bool isActive; bool? isActive;
int createdBy; int? createdBy;
String createdName; String? createdName;
dynamic createdNameN; dynamic createdNameN;
String createdOn; String? createdOn;
dynamic editedBy; dynamic editedBy;
dynamic editedByName; dynamic editedByName;
dynamic editedByNameN; dynamic editedByNameN;
dynamic editedOn; dynamic editedOn;
dynamic oRBookStatus; dynamic oRBookStatus;
String complicationDetail; String? complicationDetail;
String bloodLossDetail; String? bloodLossDetail;
String histopathSpecimen; String? histopathSpecimen;
String microbiologySpecimen; String? microbiologySpecimen;
String otherSpecimen; String? otherSpecimen;
dynamic scrubNurse; dynamic scrubNurse;
dynamic circulatingNurse; dynamic circulatingNurse;
dynamic bloodTransfusedDetail; dynamic bloodTransfusedDetail;
GetOperationDetailsResponseModel( GetOperationDetailsResponseModel(
{this.setupID, {this.setupID,
this.projectID, this.projectID,
this.reservationNo, this.reservationNo,
this.patientID, this.patientID,
this.admissionID, this.admissionID,
this.surgeryDate, this.surgeryDate,
this.preOpDiagnosis, this.preOpDiagnosis,
this.postOpDiagnosis, this.postOpDiagnosis,
this.surgeon, this.surgeon,
this.assistant, this.assistant,
this.anasthetist, this.anasthetist,
this.operation, this.operation,
this.inasion, this.inasion,
this.finding, this.finding,
this.surgeryProcedure, this.surgeryProcedure,
this.postOpInstruction, this.postOpInstruction,
this.isActive, this.isActive,
this.createdBy, this.createdBy,
this.createdName, this.createdName,
this.createdNameN, this.createdNameN,
this.createdOn, this.createdOn,
this.editedBy, this.editedBy,
this.editedByName, this.editedByName,
this.editedByNameN, this.editedByNameN,
this.editedOn, this.editedOn,
this.oRBookStatus, this.oRBookStatus,
this.complicationDetail, this.complicationDetail,
this.bloodLossDetail, this.bloodLossDetail,
this.histopathSpecimen, this.histopathSpecimen,
this.microbiologySpecimen, this.microbiologySpecimen,
this.otherSpecimen, this.otherSpecimen,
this.scrubNurse, this.scrubNurse,
this.circulatingNurse, this.circulatingNurse,
this.bloodTransfusedDetail}); this.bloodTransfusedDetail});
GetOperationDetailsResponseModel.fromJson(Map<String, dynamic> json) { GetOperationDetailsResponseModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];

@ -1,17 +1,17 @@
class GetReservationsRequestModel { class GetReservationsRequestModel {
int patientID; int? patientID;
int projectID; int? projectID;
String doctorID; String? doctorID;
int clinicID; int? clinicID;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
bool patientOutSA; bool? patientOutSA;
int deviceTypeID; int? deviceTypeID;
String tokenID; String? tokenID;
String sessionID; String? sessionID;
GetReservationsRequestModel( GetReservationsRequestModel(
{this.patientID, {this.patientID,

@ -1,38 +1,38 @@
class GetReservationsResponseModel { class GetReservationsResponseModel {
String setupID; String? setupID;
int projectID; int? projectID;
int oTReservationID; int? oTReservationID;
String oTReservationDate; String? oTReservationDate;
String oTReservationDateN; String? oTReservationDateN;
int oTID; int? oTID;
int admissionRequestNo; int? admissionRequestNo;
int admissionNo; int? admissionNo;
int primaryDoctorID; int? primaryDoctorID;
int patientType; int? patientType;
int patientID; int? patientID;
int patientStatusType; int? patientStatusType;
int clinicID; int? clinicID;
int doctorID; int? doctorID;
String operationDate; String? operationDate;
int operationType; int? operationType;
String endDate; String? endDate;
String timeStart; String? timeStart;
String timeEnd; String? timeEnd;
dynamic remarks; dynamic remarks;
int status; int? status;
int createdBy; int? createdBy;
String createdOn; String? createdOn;
int editedBy; int? editedBy;
String editedOn; String? editedOn;
String patientName; String? patientName;
Null patientNameN; Null patientNameN;
Null gender; Null gender;
String dateofBirth; String? dateofBirth;
String mobileNumber; String? mobileNumber;
String emailAddress; String? emailAddress;
String doctorName; String? doctorName;
Null doctorNameN; Null doctorNameN;
String clinicDescription; String? clinicDescription;
Null clinicDescriptionN; Null clinicDescriptionN;
GetReservationsResponseModel( GetReservationsResponseModel(

@ -3,11 +3,11 @@
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
class PatiantInformtion { class PatiantInformtion {
PatiantInformtion? patientDetails; PatiantInformtion? patientDetails;
int? genderInt; int? genderInt;
dynamic age; dynamic age;
String? appointmentDate; String? appointmentDate;
DateTime appointmentDateWithDateTimeForm; DateTime? appointmentDateWithDateTimeForm;
dynamic appointmentNo; dynamic appointmentNo;
dynamic appointmentType; dynamic appointmentType;
String? arrivalTime; String? arrivalTime;
@ -55,7 +55,7 @@ class PatiantInformtion {
int? patientMRN; int? patientMRN;
String? admissionNo; String? admissionNo;
String? admissionDate; String? admissionDate;
DateTime admissionDateWithDateTimeForm; DateTime? admissionDateWithDateTimeForm;
String? createdOn; String? createdOn;
String? roomId; String? roomId;
String? bedId; String? bedId;
@ -79,7 +79,7 @@ class PatiantInformtion {
int? vcId; int? vcId;
String? voipToken; String? voipToken;
PatiantInformtion( PatiantInformtion(
{this.patientDetails, {this.patientDetails,
this.projectId, this.projectId,
this.clinicId, this.clinicId,
@ -158,7 +158,9 @@ class PatiantInformtion {
PatiantInformtion.fromJson(Map<String, dynamic> json) { PatiantInformtion.fromJson(Map<String, dynamic> json) {
{ {
patientDetails = json['patientDetails'] != null ? new PatiantInformtion.fromJson(json['patientDetails']) : null; patientDetails = json['patientDetails'] != null
? new PatiantInformtion.fromJson(json['patientDetails'])
: null;
projectId = json["ProjectID"] ?? json["projectID"]; projectId = json["ProjectID"] ?? json["projectID"];
clinicId = json["ClinicID"] ?? json["clinicID"]; clinicId = json["ClinicID"] ?? json["clinicID"];
doctorId = json["DoctorID"] ?? json["doctorID"]; doctorId = json["DoctorID"] ?? json["doctorID"];
@ -186,7 +188,8 @@ class PatiantInformtion {
nationalityId = json["NationalityID"] ?? json["nationalityID"]; nationalityId = json["NationalityID"] ?? json["nationalityID"];
mobileNumber = json["MobileNumber"] ?? json["mobileNumber"]; mobileNumber = json["MobileNumber"] ?? json["mobileNumber"];
emailAddress = json["EmailAddress"] ?? json["emailAddress"]; emailAddress = json["EmailAddress"] ?? json["emailAddress"];
patientIdentificationNo = json["PatientIdentificationNo"] ?? json["patientIdentificationNo"]; patientIdentificationNo =
json["PatientIdentificationNo"] ?? json["patientIdentificationNo"];
//TODO make 7 dynamic when the backend retrun it in patient arrival //TODO make 7 dynamic when the backend retrun it in patient arrival
patientType = json["PatientType"] ?? json["patientType"] ?? 1; patientType = json["PatientType"] ?? json["patientType"] ?? 1;
admissionNo = json["AdmissionNo"] ?? json["admissionNo"]; admissionNo = json["AdmissionNo"] ?? json["admissionNo"];
@ -196,10 +199,16 @@ class PatiantInformtion {
bedId = json["BedID"] ?? json["bedID"]; bedId = json["BedID"] ?? json["bedID"];
nursingStationId = json["NursingStationID"] ?? json["nursingStationID"]; nursingStationId = json["NursingStationID"] ?? json["nursingStationID"];
description = json["Description"] ?? json["description"]; description = json["Description"] ?? json["description"];
clinicDescription = json["ClinicDescription"] ?? json["clinicDescription"]; clinicDescription =
clinicDescriptionN = json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; json["ClinicDescription"] ?? json["clinicDescription"];
nationalityName = json["NationalityName"] ?? json["nationalityName"] ?? json['NationalityName']; clinicDescriptionN =
nationalityNameN = json["NationalityNameN"] ?? json["nationalityNameN"] ?? json['NationalityNameN']; json["ClinicDescriptionN"] ?? json["clinicDescriptionN"];
nationalityName = json["NationalityName"] ??
json["nationalityName"] ??
json['NationalityName'];
nationalityNameN = json["NationalityNameN"] ??
json["nationalityNameN"] ??
json['NationalityNameN'];
age = json["Age"] ?? json["age"]; age = json["Age"] ?? json["age"];
genderDescription = json["GenderDescription"]; genderDescription = json["GenderDescription"];
nursingStationName = json["NursingStationName"]; nursingStationName = json["NursingStationName"];
@ -207,7 +216,8 @@ class PatiantInformtion {
startTime = json["startTime"] ?? json['StartTime']; startTime = json["startTime"] ?? json['StartTime'];
appointmentNo = json['appointmentNo'] ?? json['AppointmentNo']; appointmentNo = json['appointmentNo'] ?? json['AppointmentNo'];
appointmentType = json['appointmentType']; appointmentType = json['appointmentType'];
appointmentTypeId = json['appointmentTypeId'] ?? json['appointmentTypeid']; appointmentTypeId =
json['appointmentTypeId'] ?? json['appointmentTypeid'];
arrivedOn = json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn']; arrivedOn = json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn'];
clinicGroupId = json['clinicGroupId']; clinicGroupId = json['clinicGroupId'];
companyName = json['companyName']; companyName = json['companyName'];
@ -229,9 +239,12 @@ class PatiantInformtion {
? int?.parse(json["patientId"].toString()) ? int?.parse(json["patientId"].toString())
: ''); : '');
visitType = json['visitType'] ?? json['visitType'] ?? json['visitType']; visitType = json['visitType'] ?? json['visitType'] ?? json['visitType'];
nationalityFlagURL = json['NationalityFlagURL'] ?? json['NationalityFlagURL']; nationalityFlagURL =
patientStatusType = json['patientStatusType'] ?? json['PatientStatusType']; json['NationalityFlagURL'] ?? json['NationalityFlagURL'];
visitTypeId = json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid']; patientStatusType =
json['patientStatusType'] ?? json['PatientStatusType'];
visitTypeId =
json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid'];
startTimes = json['StartTime'] ?? json['StartTime']; startTimes = json['StartTime'] ?? json['StartTime'];
dischargeDate = json['DischargeDate']; dischargeDate = json['DischargeDate'];
status = json['Status']; status = json['Status'];
@ -254,8 +267,9 @@ class PatiantInformtion {
? AppDateUtils.convertStringToDate(json["admissionDate"]) ? AppDateUtils.convertStringToDate(json["admissionDate"])
: null; : null;
appointmentDateWithDateTimeForm = appointmentDateWithDateTimeForm = json["AppointmentDate"] != null
json["AppointmentDate"] != null ? AppDateUtils.convertStringToDate(json["AppointmentDate"]) : null; ? AppDateUtils.convertStringToDate(json["AppointmentDate"])
: null;
} }
} }
@ -303,7 +317,8 @@ class PatiantInformtion {
data["gender"] = this.gender; data["gender"] = this.gender;
data['Age'] = this.age; data['Age'] = this.age;
data['AppointmentDate'] = this.appointmentDate.isNotEmpty ? this.appointmentDate : null; data['AppointmentDate'] =
this.appointmentDate!.isNotEmpty ? this.appointmentDate : null;
data['AppointmentNo'] = this.appointmentNo; data['AppointmentNo'] = this.appointmentNo;
data['ArrivalTime'] = this.arrivalTime; data['ArrivalTime'] = this.arrivalTime;

@ -1,20 +1,20 @@
class PendingOrderRequestModel { class PendingOrderRequestModel {
bool isDentalAllowedBackend; bool? isDentalAllowedBackend;
double versionID; double? versionID;
int channel; int? channel;
int languageID; int? languageID;
String iPAdress; String? iPAdress;
String generalid; String? generalid;
int deviceTypeID; int? deviceTypeID;
String tokenID; String? tokenID;
int patientID; int? patientID;
int admissionNo; int? admissionNo;
String sessionID; String? sessionID;
int projectID; int? projectID;
String setupID; String? setupID;
bool patientOutSA; bool? patientOutSA;
int patientType; int? patientType;
int patientTypeID; int? patientTypeID;
PendingOrderRequestModel( PendingOrderRequestModel(
{this.isDentalAllowedBackend, {this.isDentalAllowedBackend,

@ -1,5 +1,5 @@
class PendingOrderModel { class PendingOrderModel {
String notes; String? notes;
PendingOrderModel({this.notes}); PendingOrderModel({this.notes});

@ -1,12 +1,12 @@
class SickLeaveStatisticsModel { class SickLeaveStatisticsModel {
String recommendedSickLeaveDays; String? recommendedSickLeaveDays;
int totalLeavesByAllClinics; int? totalLeavesByAllClinics;
int totalLeavesByDoctor; int? totalLeavesByDoctor;
SickLeaveStatisticsModel( SickLeaveStatisticsModel(
{this.recommendedSickLeaveDays, {this.recommendedSickLeaveDays,
this.totalLeavesByAllClinics, this.totalLeavesByAllClinics,
this.totalLeavesByDoctor}); this.totalLeavesByDoctor});
SickLeaveStatisticsModel.fromJson(Map<String, dynamic> json) { SickLeaveStatisticsModel.fromJson(Map<String, dynamic> json) {
recommendedSickLeaveDays = json['recommendedSickLeaveDays']; recommendedSickLeaveDays = json['recommendedSickLeaveDays'];

@ -18,7 +18,8 @@ class VideoCallPage extends StatefulWidget {
final PatiantInformtion patientData; final PatiantInformtion patientData;
final listContext; final listContext;
final LiveCarePatientViewModel model; final LiveCarePatientViewModel model;
VideoCallPage({required this.patientData, this.listContext, required this.model}); VideoCallPage(
{required this.patientData, this.listContext, required this.model});
@override @override
_VideoCallPageState createState() => _VideoCallPageState(); _VideoCallPageState createState() => _VideoCallPageState();
@ -66,8 +67,12 @@ class _VideoCallPageState extends State<VideoCallPage> {
//'1_MX40NjgwMzIyNH5-MTU5MzY4MzYzODYwM35ucExWYVRVSm5Hcy9uWGZmM1lOa3czZHV-fg', //'1_MX40NjgwMzIyNH5-MTU5MzY4MzYzODYwM35ucExWYVRVSm5Hcy9uWGZmM1lOa3czZHV-fg',
kApiKey: '46209962', kApiKey: '46209962',
vcId: widget.patientData.vcId, vcId: widget.patientData.vcId,
isRecording: tokenData != null ? tokenData.isRecording: false, isRecording: tokenData != null ? tokenData.isRecording! : false,
patientName: widget.patientData.fullName != null ? widget.patientData.fullName! : widget.patientData.firstName != null ? "${widget.patientData.firstName} ${widget.patientData.lastName}" : "-", patientName: widget.patientData.fullName != null
? widget.patientData.fullName!
: widget.patientData.firstName != null
? "${widget.patientData.firstName} ${widget.patientData.lastName}"
: "-",
tokenID: token, //"hfkjshdf347r8743", tokenID: token, //"hfkjshdf347r8743",
generalId: "Cs2020@2016\$2958", generalId: "Cs2020@2016\$2958",
doctorId: doctorprofile['DoctorID'], doctorId: doctorprofile['DoctorID'],
@ -98,7 +103,8 @@ class _VideoCallPageState extends State<VideoCallPage> {
}); });
connectOpenTok(result); connectOpenTok(result);
}).catchError((error) => {Helpers.showErrorToast(error), Navigator.of(context).pop()}); }).catchError((error) =>
{Helpers.showErrorToast(error), Navigator.of(context).pop()});
} }
@override @override
@ -126,14 +132,20 @@ class _VideoCallPageState extends State<VideoCallPage> {
), ),
Text( Text(
_start == 0 ? 'Dailing' : 'Connected', _start == 0 ? 'Dailing' : 'Connected',
style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w300, fontSize: 15), style: TextStyle(
color: Colors.deepPurpleAccent,
fontWeight: FontWeight.w300,
fontSize: 15),
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.02, height: MediaQuery.of(context).size.height * 0.02,
), ),
Text( Text(
widget.patientData.fullName!, widget.patientData.fullName!,
style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w900, fontSize: 20), style: TextStyle(
color: Colors.deepPurpleAccent,
fontWeight: FontWeight.w900,
fontSize: 20),
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.02, height: MediaQuery.of(context).size.height * 0.02,
@ -141,7 +153,10 @@ class _VideoCallPageState extends State<VideoCallPage> {
Container( Container(
child: Text( child: Text(
_start == 0 ? 'Connecting...' : _timmer.toString(), _start == 0 ? 'Connecting...' : _timmer.toString(),
style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w300, fontSize: 15), style: TextStyle(
color: Colors.deepPurpleAccent,
fontWeight: FontWeight.w300,
fontSize: 15),
)), )),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.02, height: MediaQuery.of(context).size.height * 0.02,
@ -188,8 +203,8 @@ class _VideoCallPageState extends State<VideoCallPage> {
_showAlert(BuildContext context) async { _showAlert(BuildContext context) async {
await showDialog( await showDialog(
context: context, context: context,
builder: (dialogContex) => builder: (dialogContex) => AlertDialog(content: StatefulBuilder(
AlertDialog(content: StatefulBuilder(builder: (BuildContext context, StateSetter setState) { builder: (BuildContext context, StateSetter setState) {
return Container( return Container(
height: MediaQuery.of(context).size.height * 0.7, height: MediaQuery.of(context).size.height * 0.7,
width: MediaQuery.of(context).size.width * .9, width: MediaQuery.of(context).size.width * .9,
@ -202,7 +217,8 @@ class _VideoCallPageState extends State<VideoCallPage> {
top: -40.0, top: -40.0,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
Navigator.of(context, rootNavigator: true).pop('dialog'); Navigator.of(context, rootNavigator: true)
.pop('dialog');
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: CircleAvatar( child: CircleAvatar(
@ -220,7 +236,8 @@ class _VideoCallPageState extends State<VideoCallPage> {
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: RaisedButton( child: RaisedButton(
onPressed: () => {endCall()}, onPressed: () => {endCall()},
child: Text(TranslationBase.of(context).endcall!), child:
Text(TranslationBase.of(context).endcall!),
color: Colors.red, color: Colors.red,
textColor: Colors.white, textColor: Colors.white,
)), )),
@ -228,7 +245,8 @@ class _VideoCallPageState extends State<VideoCallPage> {
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: RaisedButton( child: RaisedButton(
onPressed: () => {resumeCall()}, onPressed: () => {resumeCall()},
child: Text(TranslationBase.of(context).resumecall!), child:
Text(TranslationBase.of(context).resumecall!),
color: Colors.green[900], color: Colors.green[900],
textColor: Colors.white, textColor: Colors.white,
), ),
@ -237,7 +255,8 @@ class _VideoCallPageState extends State<VideoCallPage> {
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: RaisedButton( child: RaisedButton(
onPressed: () => {endCallWithCharge()}, onPressed: () => {endCallWithCharge()},
child: Text(TranslationBase.of(context).endcallwithcharge!), child: Text(TranslationBase.of(context)
.endcallwithcharge!),
textColor: Colors.white, textColor: Colors.white,
), ),
), ),
@ -247,7 +266,8 @@ class _VideoCallPageState extends State<VideoCallPage> {
onPressed: () => { onPressed: () => {
setState(() => {isTransfer = true}) setState(() => {isTransfer = true})
}, },
child: Text(TranslationBase.of(context).transfertoadmin!), child: Text(
TranslationBase.of(context).transfertoadmin!),
color: Colors.yellow[900], color: Colors.yellow[900],
), ),
), ),
@ -261,11 +281,14 @@ class _VideoCallPageState extends State<VideoCallPage> {
child: TextField( child: TextField(
maxLines: 3, maxLines: 3,
controller: notes, controller: notes,
decoration: InputDecoration.collapsed(hintText: "Enter your notes here"), decoration: InputDecoration.collapsed(
hintText:
"Enter your notes here"),
)), )),
Center( Center(
child: RaisedButton( child: RaisedButton(
onPressed: () => {this.transferToAdmin(notes)}, onPressed: () =>
{this.transferToAdmin(notes)},
child: Text('Transfer'), child: Text('Transfer'),
color: Colors.yellow[900], color: Colors.yellow[900],
)) ))
@ -287,24 +310,33 @@ class _VideoCallPageState extends State<VideoCallPage> {
transferToAdmin(notes) { transferToAdmin(notes) {
closeRoute(); closeRoute();
_liveCareProvider.transfterToAdmin(widget.patientData, notes).then((result) { _liveCareProvider
.transfterToAdmin(widget.patientData, notes)
.then((result) {
connectOpenTok(result); connectOpenTok(result);
}).catchError((error) => {Helpers.showErrorToast(error), Navigator.of(context).pop()}); }).catchError((error) =>
{Helpers.showErrorToast(error), Navigator.of(context).pop()});
} }
endCall() { endCall() {
closeRoute(); closeRoute();
_liveCareProvider.endCall(widget.patientData, false, doctorprofile['DoctorID']).then((result) { _liveCareProvider
.endCall(widget.patientData, false, doctorprofile['DoctorID'])
.then((result) {
print(result); print(result);
}).catchError((error) => {Helpers.showErrorToast(error), Navigator.of(context).pop()}); }).catchError((error) =>
{Helpers.showErrorToast(error), Navigator.of(context).pop()});
} }
endCallWithCharge() { endCallWithCharge() {
_liveCareProvider.endCallWithCharge(widget.patientData.vcId, doctorprofile['DoctorID']).then((result) { _liveCareProvider
.endCallWithCharge(widget.patientData.vcId, doctorprofile['DoctorID'])
.then((result) {
closeRoute(); closeRoute();
print('end callwith charge'); print('end callwith charge');
print(result); print(result);
}).catchError((error) => {Helpers.showErrorToast(error), Navigator.of(context).pop()}); }).catchError((error) =>
{Helpers.showErrorToast(error), Navigator.of(context).pop()});
} }
closeRoute() { closeRoute() {

@ -59,7 +59,6 @@ class _DischargedPatientState extends State<DischargedPatient> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox( SizedBox(
height: 12, height: 12,
), ),
@ -70,6 +69,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
}, },
marginTop: 0, marginTop: 0,
suffixIcon: IconButton( suffixIcon: IconButton(
onPressed: () {},
icon: Icon( icon: Icon(
DoctorApp.filter_1, DoctorApp.filter_1,
color: Colors.black, color: Colors.black,
@ -170,14 +170,14 @@ class _DischargedPatientState extends State<DischargedPatient> {
? model ? model
.filterData[ .filterData[
index] index]
.nationalityName .nationalityName!
.trim() .trim()
: model.filterData[index].nationality != : model.filterData[index].nationality !=
null null
? model ? model
.filterData[ .filterData[
index] index]
.nationality .nationality!
.trim() .trim()
: model.filterData[index].nationalityId != : model.filterData[index].nationalityId !=
null null
@ -203,7 +203,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
.network( .network(
model.filterData[index].nationalityFlagURL != model.filterData[index].nationalityFlagURL !=
null null
? model.filterData[index].nationalityFlagURL ? model.filterData[index].nationalityFlagURL!
: '', : '',
height: height:
25, 25,
@ -320,7 +320,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
text: model.filterData[index].admissionDate == text: model.filterData[index].admissionDate ==
null null
? "" ? ""
: TranslationBase.of(context).admissionDate + : TranslationBase.of(context).admissionDate! +
" : ", " : ",
style: TextStyle( style: TextStyle(
fontSize: fontSize:
@ -385,7 +385,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
.w300, .w300,
), ),
AppText( AppText(
"${AppDateUtils.convertStringToDate(model.filterData[index].dischargeDate).difference(AppDateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate)).inDays + 1}", "${AppDateUtils.convertStringToDate(model.filterData[index].dischargeDate!).difference(AppDateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate!)).inDays + 1}",
fontSize: fontSize:
15, 15,
fontWeight: fontWeight:

@ -9,7 +9,8 @@ class CustomEditableText extends StatefulWidget {
Key key, Key key,
required this.controller, required this.controller,
this.hint, this.hint,
this.isEditable = false, this.isSubmitted, this.isEditable = false,
this.isSubmitted,
}) : super(key: key); }) : super(key: key);
final TextEditingController controller; final TextEditingController controller;
@ -27,7 +28,7 @@ class _CustomEditableTextState extends State<CustomEditableText> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
children: [ children: [
if(!widget.isEditable) if (!widget.isEditable)
Container( Container(
height: 60, height: 60,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -36,7 +37,7 @@ class _CustomEditableTextState extends State<CustomEditableText> {
borderRadius: BorderRadius.all(Radius.circular(20)), borderRadius: BorderRadius.all(Radius.circular(20)),
border: Border.fromBorderSide( border: Border.fromBorderSide(
BorderSide( BorderSide(
color: Colors.grey[300], color: Colors.grey[300]!,
width: 2, width: 2,
), ),
), ),
@ -62,7 +63,6 @@ class _CustomEditableTextState extends State<CustomEditableText> {
child: Icon( child: Icon(
DoctorApp.edit_1, DoctorApp.edit_1,
size: 20, size: 20,
), ),
onTap: () { onTap: () {
setState(() { setState(() {
@ -74,17 +74,15 @@ class _CustomEditableTextState extends State<CustomEditableText> {
), ),
), ),
), ),
if(widget.isEditable) if (widget.isEditable)
AppTextFieldCustom( AppTextFieldCustom(
hintText: widget.hint, hintText: widget.hint,
//TranslationBase.of(context).addoperationReports, //TranslationBase.of(context).addoperationReports,
controller: widget.controller, controller: widget.controller,
validationError: widget.controller validationError:
.text.isEmpty && widget.controller.text.isEmpty && widget.isSubmitted
widget.isSubmitted ? TranslationBase.of(context).emptyMessage
? TranslationBase.of(context) : null,
.emptyMessage
: null,
maxLines: 1, maxLines: 1,
minLines: 1, minLines: 1,
hasBorder: true, hasBorder: true,
@ -92,4 +90,4 @@ class _CustomEditableTextState extends State<CustomEditableText> {
], ],
); );
} }
} }

Loading…
Cancel
Save