Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into in-patient-medication

 Conflicts:
	lib/widgets/patients/patient_card/PatientCard.dart
merge-requests/830/head
hussam al-habibeh 3 years ago
commit 696b8b89ec

@ -85,7 +85,7 @@ class SOAPService extends LookupService {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = super.error+ "\n"+error;
}, body: postAllergyRequestModel.toJson()); }, body: postAllergyRequestModel.toJson());
} }
@ -97,13 +97,14 @@ class SOAPService extends LookupService {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error =super.error + "\n"+error;
}, body: postHistoriesRequestModel.toJson()); }, body: postHistoriesRequestModel.toJson());
} }
Future postChiefComplaint( Future postChiefComplaint(
PostChiefComplaintRequestModel postChiefComplaintRequestModel) async { PostChiefComplaintRequestModel postChiefComplaintRequestModel) async {
hasError = false; hasError = false;
super.error ="";
await baseAppClient.post(POST_CHIEF_COMPLAINT, await baseAppClient.post(POST_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
@ -157,7 +158,7 @@ class SOAPService extends LookupService {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = "\n"+error;
}, body: patchAllergyRequestModel.toJson()); }, body: patchAllergyRequestModel.toJson());
} }
@ -169,13 +170,14 @@ class SOAPService extends LookupService {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = super.error +"\n"+error;
}, body: patchHistoriesRequestModel.toJson()); }, body: patchHistoriesRequestModel.toJson());
} }
Future patchChiefComplaint( Future patchChiefComplaint(
PostChiefComplaintRequestModel patchChiefComplaintRequestModel) async { PostChiefComplaintRequestModel patchChiefComplaintRequestModel) async {
hasError = false; hasError = false;
super.error ="";
await baseAppClient.post(PATCH_CHIEF_COMPLAINT, await baseAppClient.post(PATCH_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");

@ -14,26 +14,39 @@ import 'base_view_model.dart';
class PatientSearchViewModel extends BaseViewModel { class PatientSearchViewModel extends BaseViewModel {
OutPatientService _outPatientService = locator<OutPatientService>(); OutPatientService _outPatientService = locator<OutPatientService>();
SpecialClinicsService _specialClinicsService = locator<SpecialClinicsService>(); SpecialClinicsService _specialClinicsService =
locator<SpecialClinicsService>();
List<PatiantInformtion> get patientList => _outPatientService.patientList; List<PatiantInformtion> get patientList => _outPatientService.patientList;
List<GetSpecialClinicalCareMappingListResponseModel> get specialClinicalCareMappingList =>
_specialClinicsService.specialClinicalCareMappingList; List<GetSpecialClinicalCareMappingListResponseModel>
get specialClinicalCareMappingList =>
_specialClinicsService.specialClinicalCareMappingList;
List<PatiantInformtion> filterData = []; List<PatiantInformtion> filterData = [];
DateTime selectedFromDate; DateTime selectedFromDate;
DateTime selectedToDate; DateTime selectedToDate;
int firstSubsetIndex = 0;
int inPatientPageSize = 20;
int lastSubsetIndex = 19;
List<String> myInpatientClinicList = [];
searchData(String str) { searchData(String str) {
var strExist = str.length > 0 ? true : false; var strExist = str.length > 0 ? true : false;
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()) ||
@ -49,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 {
@ -81,9 +95,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);
@ -102,21 +118,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 = AppDateUtils.convertDateToFormat(selectedFromDate, 'yyyy-MM-dd'); dateFrom =
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;
@ -130,11 +157,13 @@ 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(); List<PatiantInformtion> filteredInPatientItems = List();
@ -146,7 +175,8 @@ class PatientSearchViewModel extends BaseViewModel {
} 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) {
@ -156,6 +186,8 @@ class PatientSearchViewModel extends BaseViewModel {
} }
} else { } else {
setDefaultInPatientList(); setDefaultInPatientList();
generateMyInpatientClinicList();
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
@ -163,10 +195,12 @@ class PatientSearchViewModel extends BaseViewModel {
sortInPatient({bool isDes = false}) { sortInPatient({bool isDes = false}) {
if (isDes) if (isDes)
filteredInPatientItems.sort((PatiantInformtion a, PatiantInformtion b) => filteredInPatientItems.sort((PatiantInformtion a, PatiantInformtion b) =>
b.admissionDateWithDateTimeForm.compareTo(a.admissionDateWithDateTimeForm)); b.admissionDateWithDateTimeForm
.compareTo(a.admissionDateWithDateTimeForm));
else else
filteredInPatientItems.sort((PatiantInformtion a, PatiantInformtion b) => filteredInPatientItems.sort((PatiantInformtion a, PatiantInformtion b) =>
a.admissionDateWithDateTimeForm.compareTo(b.admissionDateWithDateTimeForm)); a.admissionDateWithDateTimeForm
.compareTo(b.admissionDateWithDateTimeForm));
setState(ViewState.Idle); setState(ViewState.Idle);
} }
@ -174,10 +208,59 @@ class PatientSearchViewModel extends BaseViewModel {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await getDoctorProfile(); await getDoctorProfile();
filteredInPatientItems.clear(); filteredInPatientItems.clear();
if (inPatientList.length > 0) filteredInPatientItems.addAll(inPatientList); firstSubsetIndex = 0;
lastSubsetIndex = inPatientPageSize - 1;
if (inPatientList.length > 0)
filteredInPatientItems
.addAll(inPatientList.sublist(firstSubsetIndex, lastSubsetIndex));
setState(ViewState.Idle); setState(ViewState.Idle);
} }
generateMyInpatientClinicList() {
inPatientList.forEach((element) {
if(!myInpatientClinicList.contains(element.clinicDescription)) {
myInpatientClinicList.add(element.clinicDescription);
}
});
}
addOnFilteredList() {
if (lastSubsetIndex < inPatientList.length) {
firstSubsetIndex = firstSubsetIndex +
(inPatientList.length - lastSubsetIndex < inPatientPageSize - 1
? inPatientList.length - lastSubsetIndex
: inPatientPageSize - 1);
lastSubsetIndex = lastSubsetIndex +
(inPatientList.length - lastSubsetIndex < inPatientPageSize - 1
? inPatientList.length - lastSubsetIndex
: inPatientPageSize - 1);
filteredInPatientItems
.addAll(inPatientList.sublist(firstSubsetIndex, lastSubsetIndex));
setState(ViewState.Idle);
}
}
filterByHospital({ int hospitalId}) {
filteredInPatientItems = [];
for (var i = 0; i < inPatientList.length; i++) {
if (inPatientList[i].projectId == hospitalId) {
filteredInPatientItems.add(inPatientList[i]);
}
}
notifyListeners();
}
filterByClinic({ String clinicName}) {
filteredInPatientItems = [];
for (var i = 0; i < inPatientList.length; i++) {
if (inPatientList[i].clinicDescription == clinicName) {
filteredInPatientItems.add(inPatientList[i]);
}
}
notifyListeners();
}
void clearPatientList() { void clearPatientList() {
_inPatientService.inPatientList = []; _inPatientService.inPatientList = [];
_inPatientService.myInPatientList = []; _inPatientService.myInPatientList = [];
@ -208,7 +291,8 @@ class PatientSearchViewModel extends BaseViewModel {
} }
} }
getSpecialClinicalCareMappingList(clinicId, {bool isLocalBusy = false}) async { getSpecialClinicalCareMappingList(clinicId,
{bool isLocalBusy = false}) async {
if (isLocalBusy) { if (isLocalBusy) {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
} else { } else {

@ -28,7 +28,9 @@ import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_mode
import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart'; import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_history.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/assessment/assessment_call_back.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/assessment/assessment_call_back.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/objective/objective_call_back.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/objective/objective_call_back.dart';
@ -199,38 +201,6 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postAllergy(postAllergyRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future postHistories(
PostHistoriesRequestModel postHistoriesRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postHistories(postHistoriesRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future postChiefComplaint(
PostChiefComplaintRequestModel postChiefComplaintRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postChiefComplaint(postChiefComplaintRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future postPhysicalExam( Future postPhysicalExam(
PostPhysicalExamRequestModel postPhysicalExamRequestModel) async { PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
@ -264,38 +234,6 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future patchAllergy(PostAllergyRequestModel patchAllergyRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.patchAllergy(patchAllergyRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future patchHistories(
PostHistoriesRequestModel patchHistoriesRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.patchHistories(patchHistoriesRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future patchChiefComplaint(
PostChiefComplaintRequestModel patchChiefComplaintRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.patchChiefComplaint(patchChiefComplaintRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future patchPhysicalExam( Future patchPhysicalExam(
PostPhysicalExamRequestModel patchPhysicalExamRequestModel) async { PostPhysicalExamRequestModel patchPhysicalExamRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
@ -361,28 +299,6 @@ class SOAPViewModel extends BaseViewModel {
return allergiesString; return allergiesString;
} }
Future getPatientHistories(GetHistoryReqModel getHistoryReqModel,
{bool isFirst = false}) async {
setState(ViewState.Busy);
await _SOAPService.getPatientHistories(getHistoryReqModel,
isFirst: isFirst);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getPatientChiefComplaint(
GetChiefComplaintReqModel getChiefComplaintReqModel) async {
setState(ViewState.Busy);
await _SOAPService.getPatientChiefComplaint(getChiefComplaintReqModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getPatientPhysicalExam( Future getPatientPhysicalExam(
PatiantInformtion patientInfo, PatiantInformtion patientInfo,
@ -742,20 +658,16 @@ class SOAPViewModel extends BaseViewModel {
} }
} }
if (allMedicationList.length == 0) { if (allMedicationList.length == 0) {
await getMedicationList();
if (services == null) { if (services == null) {
services = [ services = [_prescriptionService.getMedicationList()];
_prescriptionService.getMedicationList()
];
} else { } else {
services.add( services.add(_prescriptionService.getMedicationList());
_prescriptionService.getMedicationList());
} }
} }
final results = await Future.wait(services ?? []); final results = await Future.wait(services ?? []);
if (_SOAPService.hasError ||_prescriptionService.hasError ) { if (_SOAPService.hasError || _prescriptionService.hasError) {
error = _SOAPService.error + _prescriptionService.error; error = _SOAPService.error + _prescriptionService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
@ -763,8 +675,7 @@ class SOAPViewModel extends BaseViewModel {
} }
callAddAssessmentLookupsServices({bool allowSetState = true}) async { callAddAssessmentLookupsServices({bool allowSetState = true}) async {
if(allowSetState) if (allowSetState) setState(ViewState.Busy);
setState(ViewState.Busy);
var services; var services;
if (listOfDiagnosisCondition.length == 0) { if (listOfDiagnosisCondition.length == 0) {
if (services == null) { if (services == null) {
@ -782,59 +693,177 @@ class SOAPViewModel extends BaseViewModel {
_SOAPService.getMasterLookup(MasterKeysService.DiagnosisType) _SOAPService.getMasterLookup(MasterKeysService.DiagnosisType)
]; ];
} else { } else {
services.add(_SOAPService.getMasterLookup( services
MasterKeysService.DiagnosisType)); .add(_SOAPService.getMasterLookup(MasterKeysService.DiagnosisType));
} }
} }
if (listOfICD10.length == 0) { if (listOfICD10.length == 0) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.ICD10)];
_SOAPService.getMasterLookup(MasterKeysService.ICD10)
];
} else { } else {
services.add( services.add(_SOAPService.getMasterLookup(MasterKeysService.ICD10));
_SOAPService.getMasterLookup(MasterKeysService.ICD10));
} }
} }
final results = await Future.wait(services ?? []); final results = await Future.wait(services ?? []);
if(allowSetState) { if (allowSetState) {
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
onUpdateAssessmentStepStart(PatiantInformtion patientInfo) async { onUpdateAssessmentStepStart(PatiantInformtion patientInfo) async {
GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel(
patientMRN: patientInfo.patientMRN, patientMRN: patientInfo.patientMRN,
episodeID: patientInfo.episodeNo.toString(), episodeID: patientInfo.episodeNo.toString(),
editedBy: '', editedBy: '',
doctorID: '', doctorID: '',
appointmentNo: appointmentNo: int.parse(patientInfo.appointmentNo.toString()));
int.parse(patientInfo.appointmentNo.toString()));
var services = [ var services = [_SOAPService.getPatientAssessment(getAssessmentReqModel)];
_SOAPService.getPatientAssessment(getAssessmentReqModel)
];
final results = await Future.wait(services); final results = await Future.wait(services);
if (patientAssessmentList.isNotEmpty) { if (patientAssessmentList.isNotEmpty) {
await callAddAssessmentLookupsServices(allowSetState: false); await callAddAssessmentLookupsServices(allowSetState: false);
} }
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
postSubjectServices(
{patientInfo,
String complaintsText,
String medicationText,
String illnessText,
List<MySelectedHistory> myHistoryList,
List<MySelectedAllergy> myAllergiesList}) async {
var services;
PostChiefComplaintRequestModel postChiefComplaintRequestModel =
createPostChiefComplaintRequestModel(
patientInfo: patientInfo,
illnessText: illnessText,
medicationText: medicationText,
complaintsText: complaintsText);
if (patientChiefComplaintList.isEmpty) {
postChiefComplaintRequestModel.editedBy = '';
services = [
_SOAPService.postChiefComplaint(postChiefComplaintRequestModel)
];
} else {
postChiefComplaintRequestModel.editedBy = '';
services = [
_SOAPService.patchChiefComplaint(postChiefComplaintRequestModel)
];
}
if (myHistoryList.length != 0) {
PostHistoriesRequestModel postHistoriesRequestModel =
createPostHistoriesRequestModel(
patientInfo: patientInfo, myHistoryList: myHistoryList);
if (patientHistoryList.isEmpty) {
services.add(_SOAPService.postHistories(postHistoriesRequestModel));
} else {
services.add(_SOAPService.patchHistories(postHistoriesRequestModel));
}
}
if (myAllergiesList.length != 0) {
PostAllergyRequestModel postAllergyRequestModel =createPostAllergyRequestModel (myAllergiesList:myAllergiesList, patientInfo: patientInfo);
if (patientAllergiesList.isEmpty) {
services.add(_SOAPService.postAllergy(postAllergyRequestModel));
} else {
services.add(_SOAPService.patchAllergy(postAllergyRequestModel));
}
}
final results = await Future.wait(services);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
}
PostChiefComplaintRequestModel createPostChiefComplaintRequestModel(
{patientInfo,
String complaintsText,
String medicationText,
String illnessText}) {
return new PostChiefComplaintRequestModel(
admissionNo: patientInfo.admissionNo != null
? int.parse(patientInfo.admissionNo)
: null,
patientMRN: patientInfo.patientMRN,
episodeID: patientInfo.episodeNo ?? 0,
appointmentNo: patientInfo.appointmentNo ?? 0,
chiefComplaint: complaintsText,
currentMedication: medicationText,
hopi: illnessText,
isLactation: false,
ispregnant: false,
doctorID: '',
numberOfWeeks: 0);
}
PostHistoriesRequestModel createPostHistoriesRequestModel(
{patientInfo, List<MySelectedHistory> myHistoryList}) {
PostHistoriesRequestModel postHistoriesRequestModel =
new PostHistoriesRequestModel(doctorID: '');
myHistoryList.forEach((history) {
if (postHistoriesRequestModel.listMedicalHistoryVM == null)
postHistoriesRequestModel.listMedicalHistoryVM = [];
postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM(
patientMRN: patientInfo.patientMRN,
episodeId: patientInfo.episodeNo,
appointmentNo: patientInfo.appointmentNo,
remarks: "",
historyId: history.selectedHistory.id,
historyType: history.selectedHistory.typeId,
isChecked: history.isChecked,
));
});
return postHistoriesRequestModel;
}
PostAllergyRequestModel createPostAllergyRequestModel({myAllergiesList, patientInfo}){
PostAllergyRequestModel postAllergyRequestModel =
new PostAllergyRequestModel();
myAllergiesList.forEach((allergy) {
if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM ==
null)
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = [];
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(
ListHisProgNotePatientAllergyDiseaseVM(
allergyDiseaseId: allergy.selectedAllergy.id,
allergyDiseaseType: allergy.selectedAllergy.typeId,
patientMRN: patientInfo.patientMRN,
episodeId: patientInfo.episodeNo,
appointmentNo: patientInfo.appointmentNo,
severity: allergy.selectedAllergySeverity.id,
remarks: allergy.remark,
createdBy: allergy.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
isChecked: allergy.isChecked,
isUpdatedByNurse: false));
});
return postAllergyRequestModel;
} }
} }

@ -253,7 +253,7 @@ class AuthenticationViewModel extends BaseViewModel {
/// add  token to shared preferences in case of send activation code is success /// add  token to shared preferences in case of send activation code is success
setDataAfterSendActivationSuccess(CheckActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel)async { setDataAfterSendActivationSuccess(CheckActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel)async {
// print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); // print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
await sharedPref.setString(VIDA_AUTH_TOKEN_ID, await sharedPref.setString(VIDA_AUTH_TOKEN_ID,
sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID);
await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, await sharedPref.setString(VIDA_REFRESH_TOKEN_ID,

@ -36,6 +36,8 @@ class UcafViewModel extends BaseViewModel {
List<OrderProcedure> get orderProcedures => _ucafService.orderProcedureList; List<OrderProcedure> get orderProcedures => _ucafService.orderProcedureList;
Function saveUCAFOnTap;
String selectedLanguage; String selectedLanguage;
String heightCm = "0"; String heightCm = "0";
String weightKg = "0"; String weightKg = "0";
@ -45,7 +47,11 @@ class UcafViewModel extends BaseViewModel {
String respirationBeatPerMinute = "0"; String respirationBeatPerMinute = "0";
String bloodPressure = "0 / 0"; String bloodPressure = "0 / 0";
resetDataInFirst() { resetDataInFirst({bool firstPage = true}) {
if(firstPage){
_ucafService.patientVitalSignsHistory = [];
_ucafService.patientChiefComplaintList = [];
}
_ucafService.patientAssessmentList = []; _ucafService.patientAssessmentList = [];
_ucafService.orderProcedureList = []; _ucafService.orderProcedureList = [];
_ucafService.prescriptionList = null; _ucafService.prescriptionList = null;
@ -56,7 +62,7 @@ class UcafViewModel extends BaseViewModel {
} }
Future getUCAFData(PatiantInformtion patient) async { Future getUCAFData(PatiantInformtion patient) async {
setState(ViewState.Busy); // setState(ViewState.Busy);
String from; String from;
String to; String to;
@ -112,7 +118,7 @@ class UcafViewModel extends BaseViewModel {
Future getPatientAssessment(PatiantInformtion patient) async { Future getPatientAssessment(PatiantInformtion patient) async {
if (patientAssessmentList.isEmpty) { if (patientAssessmentList.isEmpty) {
setState(ViewState.Busy); // setState(ViewState.Busy);
await _ucafService.getPatientAssessment(patient); await _ucafService.getPatientAssessment(patient);
if (_ucafService.hasError) { if (_ucafService.hasError) {
error = _ucafService.error; error = _ucafService.error;
@ -139,7 +145,7 @@ class UcafViewModel extends BaseViewModel {
Future getOrderProcedures(PatiantInformtion patient) async { Future getOrderProcedures(PatiantInformtion patient) async {
if (orderProcedures.isEmpty) { if (orderProcedures.isEmpty) {
setState(ViewState.Busy); // setState(ViewState.Busy);
await _ucafService.getOrderProcedures(patient); await _ucafService.getOrderProcedures(patient);
if (_ucafService.hasError) { if (_ucafService.hasError) {
error = _ucafService.error; error = _ucafService.error;
@ -152,7 +158,7 @@ class UcafViewModel extends BaseViewModel {
Future getPrescription(PatiantInformtion patient) async { Future getPrescription(PatiantInformtion patient) async {
if (prescriptionList == null) { if (prescriptionList == null) {
setState(ViewState.Busy); // setState(ViewState.Busy);
await _ucafService.getPrescription(patient); await _ucafService.getPrescription(patient);
if (_ucafService.hasError) { if (_ucafService.hasError) {
error = _ucafService.error; error = _ucafService.error;
@ -190,7 +196,7 @@ class UcafViewModel extends BaseViewModel {
} }
Future postUCAF(PatiantInformtion patient) async { Future postUCAF(PatiantInformtion patient) async {
setState(ViewState.Busy); // setState(ViewState.Busy);
await _ucafService.postUCAF(patient); await _ucafService.postUCAF(patient);
if (_ucafService.hasError) { if (_ucafService.hasError) {
error = _ucafService.error; error = _ucafService.error;

@ -3,8 +3,6 @@ import 'package:doctor_app_flutter/screens/live_care/end_call_screen.dart';
import 'package:doctor_app_flutter/screens/medical-file/health_summary_page.dart'; import 'package:doctor_app_flutter/screens/medical-file/health_summary_page.dart';
import 'package:doctor_app_flutter/screens/patients/ECGPage.dart'; 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/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/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/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/AddVerifyMedicalReport.dart';
@ -22,6 +20,7 @@ import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart';
import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart'; import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart';
import './screens/auth/login_screen.dart'; import './screens/auth/login_screen.dart';
import 'screens/patients/profile/UCAF/ucaf_pager_screen.dart';
import 'screens/patients/profile/profile_screen/patient_profile_screen.dart'; import 'screens/patients/profile/profile_screen/patient_profile_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart'; import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart';
import 'landing_page.dart'; import 'landing_page.dart';
@ -109,8 +108,8 @@ var routes = {
ORDER_PRESCRIPTION_NEW: (_) => PrescriptionsPage(), ORDER_PRESCRIPTION_NEW: (_) => PrescriptionsPage(),
ORDER_PROCEDURE: (_) => ProcedureScreen(), ORDER_PROCEDURE: (_) => ProcedureScreen(),
MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(), MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(),
PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(), PATIENT_UCAF_REQUEST: (_) => UCAFPagerScreen(),
PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(), // PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(),
PATIENT_ECG: (_) => ECGPage(), PATIENT_ECG: (_) => ECGPage(),
ALL_SPECIAL_LAB_RESULT: (_) => AllLabSpecialResult(), ALL_SPECIAL_LAB_RESULT: (_) => AllLabSpecialResult(),
}; };

@ -187,7 +187,7 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
children: [ children: [
AppText( AppText(
widget.reply.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(widget.reply.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()), widget.reply.createdOn !=null?getFormattedDate(widget.reply.createdOn):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight fontWeight: FontWeight
.w500, .w500,
color: Colors.white, color: Colors.white,
@ -295,7 +295,7 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
AppText( AppText(
widget.reply.responseDate !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(widget.reply.responseDate)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()), widget.reply.responseDate !=null?getFormattedDate(widget.reply.responseDate):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight fontWeight: FontWeight
.w500, .w500,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
@ -445,4 +445,24 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
), ),
)); ));
} }
getFormattedDate(date){
return (AppDateUtils.getDateTimeFromServerFormat(
date)
.day
.toString() +
" " +
AppDateUtils.getMonth(
AppDateUtils.getDateTimeFromServerFormat(
date)
.month)
.toString()
.substring(0, 3) +
' ' +
AppDateUtils.getDateTimeFromServerFormat(
date)
.year
.toString());
}
} }

@ -1,75 +0,0 @@
import 'package:doctor_app_flutter/core/viewModel/referral_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/doctor/my_referral_patient_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
class MyReferralPatient extends StatefulWidget {
int expandedItemIndex = -1;
@override
_MyReferralPatientState createState() => _MyReferralPatientState();
}
class _MyReferralPatientState extends State<MyReferralPatient> {
@override
Widget build(BuildContext context) {
return BaseView<ReferralPatientViewModel>(
onModelReady: (model) => model.getMyReferralPatient(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).myReferralPatient,
body: model.listMyReferralPatientModel.length == 0
? Center(
child: AppText(
TranslationBase.of(context).errorNoSchedule,
color: Theme.of(context).errorColor,
),
)
: Container(
padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0),
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
Container(
child: Column(
children: [
...List.generate(
model.listMyReferralPatientModel.length,
(index) => MyReferralPatientWidget(
myReferralPatientModel: model
.listMyReferralPatientModel[index],
model: model,
expandClick: () {
setState(() {
if (widget.expandedItemIndex ==
index) {
widget.expandedItemIndex = -1;
} else {
widget.expandedItemIndex = index;
}
});
},
isExpand:
widget.expandedItemIndex == index,
),
)
],
),
),
],
),
],
),
),
));
}
}

@ -12,7 +12,7 @@ import 'package:doctor_app_flutter/screens/home/dashboard_swipe_widget.dart';
import 'package:doctor_app_flutter/screens/home/home_patient_card.dart'; import 'package:doctor_app_flutter/screens/home/home_patient_card.dart';
import 'package:doctor_app_flutter/screens/live_care/live_care_patient_screen.dart'; import 'package:doctor_app_flutter/screens/live_care/live_care_patient_screen.dart';
import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart';
import 'package:doctor_app_flutter/screens/patients/PatientsInPatientScreen.dart'; import 'package:doctor_app_flutter/screens/patients/In_patient/in_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/out_patient/out_patient_screen.dart'; import 'package:doctor_app_flutter/screens/patients/out_patient/out_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_screen.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/patient_referral_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/patient_referral_screen.dart';
@ -371,7 +371,7 @@ class _HomeScreenState extends State<HomeScreen> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: PatientInPatientScreen( page: InPatientScreen(
specialClinic: model.getSpecialClinic( specialClinic: model.getSpecialClinic(
clinicId ?? projectsProvider.doctorClinicsList[0].clinicID), clinicId ?? projectsProvider.doctorClinicsList[0].clinicID),
), ),

@ -1,213 +0,0 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_container.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import '../../routes.dart';
class InPatientPage extends StatefulWidget {
final bool isMyInPatient;
final PatientSearchViewModel patientSearchViewModel;
InPatientPage(this.isMyInPatient, this.patientSearchViewModel);
@override
_InPatientPageState createState() => _InPatientPageState();
}
class _InPatientPageState extends State<InPatientPage> {
TextEditingController _searchController = TextEditingController();
bool isSortDes = false;
@override
void dispose() {
_searchController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
baseViewModel: widget.patientSearchViewModel,
isShowAppBar: false,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: MediaQuery.of(context).size.height * 0.070,
),
Container(
margin: EdgeInsets.all(16.0),
child: Stack(
children: [
AppTextFieldCustom(
hintText: TranslationBase.of(context).searchPatientName,
isTextFieldHasSuffix: true,
suffixIcon: IconButton(
icon: Icon(
Icons.search,
color: Colors.black,
),
onPressed: () {},
),
controller: _searchController,
onChanged: (value) {
widget.patientSearchViewModel.filterSearchResults(value);
}),
Positioned(
right: 35,
top:5,
child: IconButton(
icon: Icon(
isSortDes
? FontAwesomeIcons.sortAmountDown
: FontAwesomeIcons.sortAmountUp,
color: Colors.black,
),
iconSize: 20,
// padding: EdgeInsets.only(bottom: 30),
onPressed: () {
GifLoaderDialogUtils.showMyDialog(context);
widget.patientSearchViewModel.sortInPatient(isDes: isSortDes);
isSortDes = !isSortDes;
GifLoaderDialogUtils.hideDialog(context);
},
),
)
],
),
),
widget.patientSearchViewModel.state == ViewState.Idle?widget.patientSearchViewModel.filteredInPatientItems.length > 0
? (widget.isMyInPatient && widget.patientSearchViewModel.myIinPatientList.length ==0 )?NoData():Expanded(
child: Container(
margin: EdgeInsets.symmetric(horizontal: 16.0),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
...List.generate(
widget.patientSearchViewModel.filteredInPatientItems.length, (index) {
if (!widget.isMyInPatient)
return PatientCard(
patientInfo:
widget.patientSearchViewModel.filteredInPatientItems[index],
patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: widget.patientSearchViewModel.filteredInPatientItems[index]
.doctorId ==
widget.patientSearchViewModel.doctorProfile.doctorID,
onTap: () {
FocusScopeNode currentFocus =
FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": widget.patientSearchViewModel.
filteredInPatientItems[index],
"patientType": "1",
"from": "0",
"to": "0",
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
"isMyPatient":widget.patientSearchViewModel.filteredInPatientItems[index]
.doctorId ==
widget.patientSearchViewModel.doctorProfile.doctorID,
});
},
);
else if (widget.patientSearchViewModel.filteredInPatientItems[index]
.doctorId ==
widget.patientSearchViewModel.doctorProfile.doctorID &&
widget.isMyInPatient)
return PatientCard(
patientInfo:
widget.patientSearchViewModel.filteredInPatientItems[index],
patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: widget.patientSearchViewModel
.filteredInPatientItems[index]
.doctorId ==
widget.patientSearchViewModel.doctorProfile.doctorID,
onTap: () {
FocusScopeNode currentFocus =
FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": widget.patientSearchViewModel.filteredInPatientItems[index],
"patientType": "1",
"from": "0",
"to": "0",
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
"isMyPatient":widget.patientSearchViewModel.filteredInPatientItems[index]
.doctorId ==
widget.patientSearchViewModel.doctorProfile.doctorID,
});
},
);
else
return SizedBox();
}),
SizedBox(
height: 15,
)
],
),
),
),
)
: NoData(): Center(
child: Container(
height: 300,
width: 300,
),
),
],
),
);
}
}
class NoData extends StatelessWidget {
const NoData({
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Expanded(
child: SingleChildScrollView(
child: Container(
child: ErrorMessage(
error:
TranslationBase.of(context).noDataAvailable)),
),
);
}
}

@ -0,0 +1,370 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_container.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import '../../../routes.dart';
class InPatientListPage extends StatefulWidget {
final bool isMyInPatient;
final PatientSearchViewModel patientSearchViewModel;
InPatientListPage(this.isMyInPatient, this.patientSearchViewModel);
@override
_InPatientListPageState createState() => _InPatientListPageState();
}
class _InPatientListPageState extends State<InPatientListPage> {
TextEditingController _searchController = TextEditingController();
bool isSortDes = false;
bool isAllClinic = true;
bool showBottomSheet = false;
String selectedClinicName;
@override
void dispose() {
_searchController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
baseViewModel: widget.patientSearchViewModel,
isShowAppBar: false,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Container(
// height: MediaQuery.of(context).size.height * 0.070,
// ),
Container(
margin: EdgeInsets.symmetric(horizontal: 14.0, vertical: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
InkWell(
child: Row(
children: [
Radio(
value: 1,
groupValue: isAllClinic ? 1 : 2,
onChanged: (value) {
setState(() {
setState(() {
isAllClinic = true;
showBottomSheet = false;
});
widget.patientSearchViewModel
.setDefaultInPatientList();
});
},
activeColor: Colors.red,
),
AppText("All Clinic", fontSize: 15,),
],
),
onTap: () {
setState(() {
isAllClinic = true;
showBottomSheet = false;
});
widget.patientSearchViewModel.setDefaultInPatientList();
},
),
InkWell(
onTap: () {
setState(() {
isAllClinic = false;
showBottomSheet = true;
});
},
child: Row(
children: [
Radio(
value: 2,
groupValue: isAllClinic ? 1 : 2,
onChanged: (value) {
setState(() {
setState(() {
isAllClinic = false;
showBottomSheet = true;
});
});
},
activeColor: Colors.red,
),
AppText(selectedClinicName ?? "Select Clinic", fontSize: 15,),
Container(
margin: EdgeInsets.only(bottom: 10),
child: Icon(FontAwesomeIcons.sortDown))
],
)),
],
),
),
Container(
margin: EdgeInsets.all(16.0),
child: Stack(
children: [
AppTextFieldCustom(
hintText: TranslationBase.of(context).searchPatientName,
isTextFieldHasSuffix: true,
suffixIcon: IconButton(
icon: Icon(
Icons.search,
color: Colors.black,
),
onPressed: () {},
),
controller: _searchController,
onChanged: (value) {
widget.patientSearchViewModel.filterSearchResults(value);
}),
Positioned(
right: 35,
top: 5,
child: IconButton(
icon: Icon(
isSortDes
? FontAwesomeIcons.sortAmountDown
: FontAwesomeIcons.sortAmountUp,
color: Colors.black,
),
iconSize: 20,
// padding: EdgeInsets.only(bottom: 30),
onPressed: () {
GifLoaderDialogUtils.showMyDialog(context);
widget.patientSearchViewModel
.sortInPatient(isDes: isSortDes);
isSortDes = !isSortDes;
GifLoaderDialogUtils.hideDialog(context);
},
),
)
],
),
),
widget.patientSearchViewModel.state == ViewState.Idle
? widget.patientSearchViewModel.filteredInPatientItems.length > 0
? (widget.isMyInPatient &&
widget.patientSearchViewModel.myIinPatientList
.length ==
0)
? NoData()
: Expanded(
child: Container(
margin: EdgeInsets.symmetric(horizontal: 16.0),
child: NotificationListener(
child: ListView.builder(
itemCount: widget.patientSearchViewModel
.filteredInPatientItems.length,
scrollDirection: Axis.vertical,
// physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
if (!widget.isMyInPatient)
return PatientCard(
patientInfo: widget
.patientSearchViewModel
.filteredInPatientItems[index],
patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: widget
.patientSearchViewModel
.filteredInPatientItems[index]
.doctorId ==
widget.patientSearchViewModel
.doctorProfile.doctorID,
onTap: () {
FocusScopeNode currentFocus =
FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": widget
.patientSearchViewModel
.filteredInPatientItems[
index],
"patientType": "1",
"from": "0",
"to": "0",
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
"isMyPatient": widget
.patientSearchViewModel
.filteredInPatientItems[
index]
.doctorId ==
widget
.patientSearchViewModel
.doctorProfile
.doctorID,
});
},
);
else if (widget
.patientSearchViewModel
.filteredInPatientItems[index]
.doctorId ==
widget.patientSearchViewModel
.doctorProfile.doctorID &&
widget.isMyInPatient)
return PatientCard(
patientInfo: widget
.patientSearchViewModel
.filteredInPatientItems[index],
patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: widget
.patientSearchViewModel
.filteredInPatientItems[index]
.doctorId ==
widget.patientSearchViewModel
.doctorProfile.doctorID,
onTap: () {
FocusScopeNode currentFocus =
FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": widget
.patientSearchViewModel
.filteredInPatientItems[
index],
"patientType": "1",
"from": "0",
"to": "0",
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
"isMyPatient": widget
.patientSearchViewModel
.filteredInPatientItems[
index]
.doctorId ==
widget
.patientSearchViewModel
.doctorProfile
.doctorID,
});
},
);
else
return SizedBox();
}),
onNotification: (t) {
if (isAllClinic) if (t
is ScrollUpdateNotification &&
t.metrics.pixels >=
t.metrics.maxScrollExtent - 50) {
widget.patientSearchViewModel
.addOnFilteredList();
}
return;
},
),
),
)
: NoData()
: Center(
child: Container(
height: 300,
width: 300,
),
),
],
),
bottomSheet: !showBottomSheet
? Container(
height: 0,
)
: Container(
height: 500,
color: Colors.white,
child: ListView.builder(
itemCount: widget
.patientSearchViewModel.myInpatientClinicList.length,
scrollDirection: Axis.vertical,
physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
setState(() {
isAllClinic = false;
showBottomSheet = false;
selectedClinicName = widget.patientSearchViewModel
.myInpatientClinicList[index];
});
widget.patientSearchViewModel.filterByClinic(
clinicName: widget.patientSearchViewModel
.myInpatientClinicList[index]);
},
child: Row(
children: [
Radio(
value: widget.patientSearchViewModel
.myInpatientClinicList[index],
groupValue: selectedClinicName,
onChanged: (value) {
setState(() {
setState(() {
isAllClinic = false;
showBottomSheet = false;
});
widget.patientSearchViewModel
.filterByClinic(clinicName: value);
});
},
activeColor: Colors.red,
),
AppText(widget.patientSearchViewModel
.myInpatientClinicList[index]),
],
));
}),
),
);
}
}
class NoData extends StatelessWidget {
const NoData({
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Expanded(
child: SingleChildScrollView(
child: Container(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable)),
),
);
}
}

@ -14,19 +14,19 @@ import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'DischargedPatientPage.dart'; import '../DischargedPatientPage.dart';
import 'InPatientPage.dart'; import 'in_patient_list_page.dart';
class PatientInPatientScreen extends StatefulWidget { class InPatientScreen extends StatefulWidget {
GetSpecialClinicalCareListResponseModel specialClinic; GetSpecialClinicalCareListResponseModel specialClinic;
PatientInPatientScreen({Key key, this.specialClinic}); InPatientScreen({Key key, this.specialClinic});
@override @override
_PatientInPatientScreenState createState() => _PatientInPatientScreenState(); _InPatientScreenState createState() => _InPatientScreenState();
} }
class _PatientInPatientScreenState extends State<PatientInPatientScreen> class _InPatientScreenState extends State<InPatientScreen>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
int _activeTab = 0; int _activeTab = 0;
@ -221,7 +221,7 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen>
), ),
Expanded( Expanded(
child: Scaffold( child: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: false,
appBar: PreferredSize( appBar: PreferredSize(
preferredSize: Size.fromHeight( preferredSize: Size.fromHeight(
MediaQuery.of(context).size.height * 0.070), MediaQuery.of(context).size.height * 0.070),
@ -266,8 +266,8 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen>
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: [ children: [
InPatientPage(false, model), InPatientListPage(false, model),
InPatientPage(true,model), InPatientListPage(true,model),
DischargedPatient(), DischargedPatient(),
], ],
), ),

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_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/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/ucaf_pager_screen.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -22,34 +23,63 @@ import 'package:hexcolor/hexcolor.dart';
import '../../../../routes.dart'; import '../../../../routes.dart';
class UcafDetailScreen extends StatefulWidget { class UcafDetailScreen extends StatefulWidget {
final PatiantInformtion patient;
final UcafViewModel model;
final Function changeLoadingState;
UcafDetailScreen(this.patient, this.model, {this.changeLoadingState});
@override @override
_UcafDetailScreenState createState() => _UcafDetailScreenState(); _UcafDetailScreenState createState() => _UcafDetailScreenState(this.patient, this.model);
} }
class _UcafDetailScreenState extends State<UcafDetailScreen> { class _UcafDetailScreenState extends State<UcafDetailScreen> {
final PatiantInformtion patient;
final UcafViewModel model;
UcafViewModel ucafModel;
int _activeTap = 0; int _activeTap = 0;
_UcafDetailScreenState(this.patient, this.model);
@override @override
Widget build(BuildContext context) { void initState() {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; model.saveUCAFOnTap = () async{
PatiantInformtion patient = routeArgs['patient']; widget.changeLoadingState(true);
String patientType = routeArgs['patientType']; await ucafModel.postUCAF(patient);
String arrivalType = routeArgs['arrivalType']; widget.changeLoadingState(false);
if (ucafModel.state == ViewState.Idle) {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.postUcafSuccessMsg);
Navigator.of(context).popUntil((route) {
return route.settings.name ==
PATIENTS_PROFILE;
});
} else {
DrAppToastMsg.showErrorToast(ucafModel.error);
}
};
super.initState();
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>( return BaseView<UcafViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
model.resetDataInFirst(); ucafModel = model;
model.resetDataInFirst(firstPage: false);
await model.getLanguage(); await model.getLanguage();
await model.getPatientAssessment(patient); await model.getPatientAssessment(patient);
widget.changeLoadingState(false);
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: false,
appBar: PatientProfileAppBar(
patient),
appBarTitle: TranslationBase.of(context).ucaf,
body: Column( body: Column(
children: [ children: [
Expanded( Expanded(
@ -58,35 +88,6 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// PatientHeaderWidgetNoAvatar(patient),
Container(
margin: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).patient}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).ucaf}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
PageStepperWidget(
stepsCount: 2,
currentStepIndex: 2,
screenSize: screenSize,
),
SizedBox(
height: 10,
),
Container( Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
vertical: 16, horizontal: 16), vertical: 16, horizontal: 16),
@ -107,64 +108,7 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
), ),
), ),
), ),
Container(
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Row(
children: [
Expanded(
child: Container(
child: AppButton(
title: TranslationBase.of(context).cancel,
hasBorder: true,
vPadding: 8,
hPadding: 8,
borderColor: Colors.white,
color: Colors.white,
fontColor: HexColor("#B8382B"),
fontSize: 2.2,
onPressed: () {
Navigator.of(context).popUntil((route) {
return route.settings.name ==
PATIENTS_PROFILE;
});
},
),
),
),
SizedBox(
width: 8,
),
Expanded(
child: Container(
child: AppButton(
title: TranslationBase.of(context).save,
hasBorder: true,
vPadding: 8,
hPadding: 8,
borderColor: HexColor("#B8382B"),
color: HexColor("#B8382B"),
fontColor: Colors.white,
fontSize: 2.0,
onPressed: () async {
await model.postUCAF(patient);
if (model.state == ViewState.Idle) {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.postUcafSuccessMsg);
Navigator.of(context).popUntil((route) {
return route.settings.name ==
PATIENTS_PROFILE;
});
} else {
DrAppToastMsg.showErrorToast(model.error);
}
},
),
),
),
],
),
),
], ],
), ),
)); ));
@ -210,12 +154,18 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
onTap: () async { onTap: () async {
print(__treatmentSteps.indexOf(item)); print(__treatmentSteps.indexOf(item));
if (__treatmentSteps.indexOf(item) == 0) { if (__treatmentSteps.indexOf(item) == 0) {
widget.changeLoadingState(true);
await model.getPatientAssessment(patient); await model.getPatientAssessment(patient);
widget.changeLoadingState(false);
} else if (__treatmentSteps.indexOf(item) == 1) { } else if (__treatmentSteps.indexOf(item) == 1) {
widget.changeLoadingState(true);
await model.getPrescription(patient); await model.getPrescription(patient);
widget.changeLoadingState(false);
} }
if (__treatmentSteps.indexOf(item) == 2) { if (__treatmentSteps.indexOf(item) == 2) {
widget.changeLoadingState(true);
await model.getOrderProcedures(patient); await model.getOrderProcedures(patient);
widget.changeLoadingState(false);
} }
setState(() { setState(() {
_activeTap = __treatmentSteps.indexOf(item); _activeTap = __treatmentSteps.indexOf(item);
@ -234,10 +184,15 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
case 0: case 0:
if (model.patientAssessmentList != null) { if (model.patientAssessmentList != null) {
return [ return [
...List.generate( ListView.builder(
model.patientAssessmentList.length, itemCount: model.patientAssessmentList.length,
(index) => DiagnosisWidget( scrollDirection: Axis.vertical,
model, model.patientAssessmentList[index])).toList() physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
return DiagnosisWidget(
model, model.patientAssessmentList[index]);
})
]; ];
} else { } else {
return [ return [
@ -247,22 +202,30 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
break; break;
case 1: case 1:
return [ return [
...List.generate( ListView.builder(
model.prescriptionList != null itemCount: model.prescriptionList != null
? model.prescriptionList.entityList.length ? model.prescriptionList.entityList.length
: 0, : 0,
(index) => MedicationWidget( scrollDirection: Axis.vertical,
model, model.prescriptionList.entityList[index])).toList() physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
return MedicationWidget(
model, model.prescriptionList.entityList[index]);
})
]; ];
break; break;
case 2: case 2:
if (model.orderProcedures != null) { if (model.orderProcedures != null) {
return [ return [
...List.generate( ListView.builder(
model.orderProcedures.length, itemCount: model.orderProcedures.length,
(index) => scrollDirection: Axis.vertical,
ProceduresWidget(model, model.orderProcedures[index])) physics: ScrollPhysics(),
.toList() shrinkWrap: true,
itemBuilder: (context, index) {
return ProceduresWidget(model, model.orderProcedures[index]);
})
]; ];
} else { } else {
return [ return [
@ -276,6 +239,7 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
]; ];
} }
} }
} }
class DiagnosisWidget extends StatelessWidget { class DiagnosisWidget extends StatelessWidget {

@ -19,11 +19,20 @@ import 'package:hexcolor/hexcolor.dart';
import '../../../../routes.dart'; import '../../../../routes.dart';
class UCAFInputScreen extends StatefulWidget { class UCAFInputScreen extends StatefulWidget {
final PatiantInformtion patient;
final Function changeLoadingState;
UCAFInputScreen(this.patient, {this.changeLoadingState});
@override @override
_UCAFInputScreenState createState() => _UCAFInputScreenState(); _UCAFInputScreenState createState() => _UCAFInputScreenState(this.patient);
} }
class _UCAFInputScreenState extends State<UCAFInputScreen> { class _UCAFInputScreenState extends State<UCAFInputScreen> {
final PatiantInformtion patient;
_UCAFInputScreenState(this.patient);
bool _inPatient = false; bool _inPatient = false;
bool _emergencyCase = false; bool _emergencyCase = false;
final _durationOfIllnessController = TextEditingController(); final _durationOfIllnessController = TextEditingController();
@ -53,21 +62,15 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>( return BaseView<UcafViewModel>(
onModelReady: (model) => model.getUCAFData(patient), onModelReady: (model) async {
model.resetDataInFirst();
await model.getUCAFData(patient);
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: false,
appBar: PatientProfileAppBar(
patient),
appBarTitle: TranslationBase.of(context).ucaf,
body: model.patientVitalSignsHistory.length > 0 && body: model.patientVitalSignsHistory.length > 0 &&
model.patientChiefComplaintList != null && model.patientChiefComplaintList != null &&
model.patientChiefComplaintList.length > 0 model.patientChiefComplaintList.length > 0
@ -79,31 +82,6 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// PatientHeaderWidgetNoAvatar(patient), // PatientHeaderWidgetNoAvatar(patient),
Container(
margin: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).patient}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).ucaf}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
PageStepperWidget(
stepsCount: 2,
currentStepIndex: 1,
screenSize: screenSize,
),
Container( Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
vertical: 0, horizontal: 16), vertical: 0, horizontal: 16),
@ -263,7 +241,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
), ),
/* SizedBox( /* SizedBox(
height: 4, height: 4,
), ),
AppText( AppText(
@ -323,7 +301,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
SizedBox( SizedBox(
height: 8, height: 8,
), ),
/* AppTextFieldCustom( /* AppTextFieldCustom(
hintText: TranslationBase.of(context).other, hintText: TranslationBase.of(context).other,
dropDownText: TranslationBase.of(context).none, dropDownText: TranslationBase.of(context).none,
enabled: false, enabled: false,
@ -400,21 +378,6 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
), ),
), ),
), ),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton(
title: TranslationBase.of(context).next,
color: HexColor("#D02127"),
onPressed: () {
Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL,
arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType
});
},
),
),
], ],
) )
: Center( : Center(
@ -428,9 +391,10 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: AppText( child: AppText(
model.patientVitalSignsHistory.length == 0 model.patientVitalSignsHistory.length == 0
? TranslationBase.of(context).vitalSignEmptyMsg ? TranslationBase.of(context).vitalSignEmptyMsg
: TranslationBase.of(context).chiefComplaintEmptyMsg, : TranslationBase.of(context)
.chiefComplaintEmptyMsg,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: HexColor("#B8382B"), color: HexColor("#B8382B"),

@ -0,0 +1,214 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.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/UCAF/page-stepper-widget.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/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart';
import '../../../../routes.dart';
import 'UCAF-detail-screen.dart';
import 'UCAF-input-screen.dart';
class UCAFPagerScreen extends StatefulWidget {
const UCAFPagerScreen({Key key}) : super(key: key);
@override
_UCAFPagerScreenState createState() => _UCAFPagerScreenState();
}
class _UCAFPagerScreenState extends State<UCAFPagerScreen>
with TickerProviderStateMixin {
PageController _controller;
int _currentIndex = 0;
bool _isLoading = true;
PatiantInformtion patient;
String patientType;
String arrivalType;
changePageViewIndex(pageIndex, {isChangeState = true}) {
if (pageIndex != _currentIndex && isChangeState) changeLoadingState(true);
_controller.jumpToPage(pageIndex);
setState(() {
_currentIndex = pageIndex;
});
}
void changeLoadingState(bool isLoading) {
setState(() {
_isLoading = isLoading;
});
}
@override
void initState() {
_controller = new PageController();
super.initState();
}
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
patientType = routeArgs['patientType'];
arrivalType = routeArgs['arrivalType'];
final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
isLoading: _isLoading,
appBar: PatientProfileAppBar(patient),
appBarTitle: TranslationBase.of(context).ucaf,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// PatientHeaderWidgetNoAvatar(patient),
Container(
margin: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).patient}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).ucaf}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
PageStepperWidget(
stepsCount: 2,
currentStepIndex: _currentIndex + 1,
screenSize: screenSize,
),
SizedBox(
height: 10,
),
Expanded(
child: Container(
color: Theme.of(context).scaffoldBackgroundColor,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
UCAFInputScreen(
patient,
changeLoadingState: changeLoadingState,
),
UcafDetailScreen(
patient,
model,
changeLoadingState: changeLoadingState,
),
]),
),
),
],
),
),
),
_isLoading
? Container(
height: 0,
)
: ucafButtons(model),
],
),
));
}
Widget ucafButtons(UcafViewModel model) {
switch (_currentIndex) {
case 0:
return Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton(
title: TranslationBase.of(context).next,
color: Color(0xFFD02127),
onPressed: () {
changePageViewIndex(1);
// Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL, arguments: {
// 'patient': patient,
// 'patientType': patientType,
// 'arrivalType': arrivalType
// });
},
),
);
case 1:
return Container(
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Row(
children: [
Expanded(
child: Container(
child: AppButton(
title: TranslationBase.of(context).cancel,
hasBorder: true,
vPadding: 8,
hPadding: 8,
borderColor: Colors.white,
color: Colors.white,
fontColor: Color(0xFFB8382B),
fontSize: 2.2,
onPressed: () {
Navigator.of(context).popUntil((route) {
return route.settings.name == PATIENTS_PROFILE;
});
},
),
),
),
SizedBox(
width: 8,
),
Expanded(
child: Container(
child: AppButton(
title: TranslationBase.of(context).save,
hasBorder: true,
vPadding: 8,
hPadding: 8,
borderColor: Color(0xFFB8382B),
color: Color(0xFFB8382B),
fontColor: Colors.white,
fontSize: 2.0,
onPressed: () {
model.saveUCAFOnTap();
},
),
),
),
],
),
);
default:
return Container();
}
}
}

@ -18,7 +18,8 @@ import 'my-referral-patient-screen.dart';
class MyReferralInPatientScreen extends StatefulWidget { class MyReferralInPatientScreen extends StatefulWidget {
@override @override
_MyReferralInPatientScreenState createState() => _MyReferralInPatientScreenState(); _MyReferralInPatientScreenState createState() =>
_MyReferralInPatientScreenState();
} }
class _MyReferralInPatientScreenState extends State<MyReferralInPatientScreen> { class _MyReferralInPatientScreenState extends State<MyReferralInPatientScreen> {
@ -76,51 +77,87 @@ class _MyReferralInPatientScreenState extends State<MyReferralInPatientScreen> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...List.generate( ListView.builder(
model.myReferralPatients.length, itemCount: model.myReferralPatients.length,
(index) => InkWell( scrollDirection: Axis.vertical,
onTap: () { physics: ScrollPhysics(),
if(patientType == PatientType.OUT_PATIENT) { shrinkWrap: true,
Navigator.push( itemBuilder: (context, index) {
context, return InkWell(
FadePage( onTap: () {
page: MyReferralDetailScreen(referralPatient: model.myReferralPatients[index]), if (patientType ==
), PatientType.OUT_PATIENT) {
); Navigator.push(
} else{ context,
Navigator.push( FadePage(
context, page: MyReferralDetailScreen(
FadePage( referralPatient: model
page: ReferralPatientDetailScreen(model.myReferralPatients[index], model), .myReferralPatients[index]),
), ),
); );
} } else {
Navigator.push(
}, context,
child: PatientReferralItemWidget( FadePage(
referralStatus: model.getReferralStatusNameByCode( page: ReferralPatientDetailScreen(
model.myReferralPatients[index].referralStatus, context), model.myReferralPatients[index],
referralStatusCode: model.myReferralPatients[index].referralStatus, model),
patientName: model.myReferralPatients[index].patientName, ),
patientGender: model.myReferralPatients[index].gender, );
referredDate: AppDateUtils.getDayMonthYearDateFormatted( }
model.myReferralPatients[index].referralDate), },
referredTime: AppDateUtils.getTimeHHMMA(model.myReferralPatients[index].referralDate), child: PatientReferralItemWidget(
patientID: "${model.myReferralPatients[index].patientID}", referralStatus:
isSameBranch: false, model.getReferralStatusNameByCode(
isReferral: true, model.myReferralPatients[index]
isReferralClinic: true, .referralStatus,
referralClinic: "${model.myReferralPatients[index].referringClinicDescription}", context),
remark: model.myReferralPatients[index].referringDoctorRemarks, referralStatusCode: model
nationality: model.myReferralPatients[index].nationalityName, .myReferralPatients[index]
nationalityFlag: model.myReferralPatients[index].nationalityFlagURL, .referralStatus,
doctorAvatar: model.myReferralPatients[index].doctorImageURL, patientName: model
referralDoctorName: model.myReferralPatients[index].referringDoctorName, .myReferralPatients[index]
clinicDescription: model.myReferralPatients[index].referringClinicDescription, .patientName,
infoIcon: Icon(FontAwesomeIcons.arrowRight, size: 25, color: Colors.black), patientGender: model
), .myReferralPatients[index].gender,
), referredDate: AppDateUtils
), .getDayMonthYearDateFormatted(model
.myReferralPatients[index]
.referralDate),
referredTime: AppDateUtils.getTimeHHMMA(
model.myReferralPatients[index]
.referralDate),
patientID:
"${model.myReferralPatients[index].patientID}",
isSameBranch: false,
isReferral: true,
isReferralClinic: true,
referralClinic:
"${model.myReferralPatients[index].referringClinicDescription}",
remark: model.myReferralPatients[index]
.referringDoctorRemarks,
nationality: model
.myReferralPatients[index]
.nationalityName,
nationalityFlag: model
.myReferralPatients[index]
.nationalityFlagURL,
doctorAvatar: model
.myReferralPatients[index]
.doctorImageURL,
referralDoctorName: model
.myReferralPatients[index]
.referringDoctorName,
clinicDescription: model
.myReferralPatients[index]
.referringClinicDescription,
infoIcon: Icon(
FontAwesomeIcons.arrowRight,
size: 25,
color: Colors.black),
),
);
})
], ],
), ),
), ),

@ -13,7 +13,6 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class ReferredPatientScreen extends StatefulWidget { class ReferredPatientScreen extends StatefulWidget {
@override @override
_ReferredPatientScreenState createState() => _ReferredPatientScreenState(); _ReferredPatientScreenState createState() => _ReferredPatientScreenState();
} }
@ -69,79 +68,87 @@ class _ReferredPatientScreenState extends State<ReferredPatientScreen> {
), ),
) )
: Expanded( : Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
// DoctorApplication.svc/REST/GtMyReferredPatient // DoctorApplication.svc/REST/GtMyReferredPatient
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
...List.generate( ListView.builder(
model.listMyReferredPatientModel.length, itemCount:
(index) => InkWell( model.listMyReferredPatientModel.length,
onTap: () { scrollDirection: Axis.vertical,
Navigator.push( physics: ScrollPhysics(),
context, shrinkWrap: true,
FadePage( itemBuilder: (context, index) {
page: ReferredPatientDetailScreen( return InkWell(
model.getReferredPatientItem(index), this.patientType), onTap: () {
), Navigator.push(
); context,
}, FadePage(
child: PatientReferralItemWidget( page: ReferredPatientDetailScreen(
referralStatus: model model.getReferredPatientItem(index),
.getReferredPatientItem(index) this.patientType),
.referralStatusDesc, ),
referralStatusCode: model );
.getReferredPatientItem(index) },
.referralStatus, child: PatientReferralItemWidget(
patientName: referralStatus: model
"${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}", .getReferredPatientItem(index)
patientGender: .referralStatusDesc,
model.getReferredPatientItem(index).gender, referralStatusCode: model
referredDate: .getReferredPatientItem(index)
AppDateUtils.convertDateFromServerFormat( .referralStatus,
model patientName:
.getReferredPatientItem(index) "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}",
.referralDate, patientGender: model
"dd/MM/yyyy"), .getReferredPatientItem(index)
referredTime: .gender,
AppDateUtils.convertDateFromServerFormat( referredDate: AppDateUtils
model .convertDateFromServerFormat(
.getReferredPatientItem(index) model
.referralDate, .getReferredPatientItem(index)
"hh:mm a"), .referralDate,
patientID: "dd/MM/yyyy"),
"${model.getReferredPatientItem(index).patientID}", referredTime: AppDateUtils
isSameBranch: model .convertDateFromServerFormat(
.getReferredPatientItem(index) model
.isReferralDoctorSameBranch, .getReferredPatientItem(index)
isReferral: false, .referralDate,
remark: model "hh:mm a"),
.getReferredPatientItem(index) patientID:
.referringDoctorRemarks, "${model.getReferredPatientItem(index).patientID}",
nationality: model isSameBranch: model
.getReferredPatientItem(index) .getReferredPatientItem(index)
.nationalityName, .isReferralDoctorSameBranch,
nationalityFlag: model isReferral: false,
.getReferredPatientItem(index) remark: model
.nationalityFlagURL, .getReferredPatientItem(index)
doctorAvatar: model .referringDoctorRemarks,
.getReferredPatientItem(index) nationality: model
.doctorImageURL, .getReferredPatientItem(index)
referralDoctorName: .nationalityName,
"${TranslationBase.of(context).dr} ${model.getReferredPatientItem(index).referralDoctorName}", nationalityFlag: model
clinicDescription: model .getReferredPatientItem(index)
.getReferredPatientItem(index) .nationalityFlagURL,
.referralClinicDescription, doctorAvatar: model
infoIcon: Icon(FontAwesomeIcons.arrowRight, .getReferredPatientItem(index)
size: 25, color: Colors.black), .doctorImageURL,
), referralDoctorName:
), "${TranslationBase.of(context).dr} ${model.getReferredPatientItem(index).referralDoctorName}",
clinicDescription: model
.getReferredPatientItem(index)
.referralClinicDescription,
infoIcon: Icon(FontAwesomeIcons.arrowRight,
size: 25, color: Colors.black),
),
);
},
), ),
], ],
), ),
), ),
), ),
), ),
], ],
), ),
), ),

@ -1,7 +1,6 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart'; import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';

@ -21,7 +21,7 @@ class SOAPStepHeader extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: SizeConfig.isHeightVeryShort?30: 15,), SizedBox(height: SizeConfig.isHeightVeryShort?30:SizeConfig.isHeightShort?35: 15,),
AppText( AppText(
TranslationBase.of(context).createNew, TranslationBase.of(context).createNew,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge? 3: 4), fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge? 3: 4),

@ -1,7 +1,6 @@
// ignore: must_be_immutable // ignore: must_be_immutable
import 'package:autocomplete_textfield/autocomplete_textfield.dart'; import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';

@ -1,16 +1,9 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_history.dart'; import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_history.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart';
@ -33,13 +26,18 @@ class UpdateSubjectivePage extends StatefulWidget {
final int currentIndex; final int currentIndex;
UpdateSubjectivePage( UpdateSubjectivePage(
{Key key, this.changePageViewIndex, this.patientInfo, this.changeLoadingState, this.currentIndex}); {Key key,
this.changePageViewIndex,
this.patientInfo,
this.changeLoadingState,
this.currentIndex});
@override @override
_UpdateSubjectivePageState createState() => _UpdateSubjectivePageState(); _UpdateSubjectivePageState createState() => _UpdateSubjectivePageState();
} }
class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements SubjectiveCallBack { class _UpdateSubjectivePageState extends State<UpdateSubjectivePage>
implements SubjectiveCallBack {
bool isChiefExpand = false; bool isChiefExpand = false;
bool isHistoryExpand = false; bool isHistoryExpand = false;
bool isAllergiesExpand = false; bool isAllergiesExpand = false;
@ -55,7 +53,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
widget.changeLoadingState(true); widget.changeLoadingState(true);
if (model.patientHistoryList.isNotEmpty) { if (model.patientHistoryList.isNotEmpty) {
model.patientHistoryList.forEach((element) { model.patientHistoryList.forEach((element) {
if (element.historyType == MasterKeysService.HistoryFamily.getMasterKeyService()) { if (element.historyType ==
MasterKeysService.HistoryFamily.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey( MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistoryFamily, masterKeys: MasterKeysService.HistoryFamily,
id: element.historyId, id: element.historyId,
@ -63,11 +62,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
if (history != null) { if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory mySelectedHistory =
SoapUtils.generateMySelectedHistory( SoapUtils.generateMySelectedHistory(
history: history, isChecked: element.isChecked, remark: element.remarks, isLocal: false); history: history,
isChecked: element.isChecked,
remark: element.remarks,
isLocal: false);
myHistoryList.add(mySelectedHistory); myHistoryList.add(mySelectedHistory);
} }
} }
if (element.historyType == MasterKeysService.HistoryMedical.getMasterKeyService()) { if (element.historyType ==
MasterKeysService.HistoryMedical.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey( MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistoryMedical, masterKeys: MasterKeysService.HistoryMedical,
id: element.historyId, id: element.historyId,
@ -75,11 +78,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
if (history != null) { if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory mySelectedHistory =
SoapUtils.generateMySelectedHistory( SoapUtils.generateMySelectedHistory(
history: history, isChecked: element.isChecked, remark: element.remarks, isLocal: false); history: history,
isChecked: element.isChecked,
remark: element.remarks,
isLocal: false);
myHistoryList.add(mySelectedHistory); myHistoryList.add(mySelectedHistory);
} }
} }
if (element.historyType == MasterKeysService.HistorySports.getMasterKeyService()) { if (element.historyType ==
MasterKeysService.HistorySports.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey( MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistorySports, masterKeys: MasterKeysService.HistorySports,
id: element.historyId, id: element.historyId,
@ -87,11 +94,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
if (history != null) { if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory mySelectedHistory =
SoapUtils.generateMySelectedHistory( SoapUtils.generateMySelectedHistory(
history: history, isChecked: element.isChecked, remark: element.remarks, isLocal: false); history: history,
isChecked: element.isChecked,
remark: element.remarks,
isLocal: false);
myHistoryList.add(mySelectedHistory); myHistoryList.add(mySelectedHistory);
} }
} }
if (element.historyType == MasterKeysService.HistorySurgical.getMasterKeyService()) { if (element.historyType ==
MasterKeysService.HistorySurgical.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey( MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistorySurgical, masterKeys: MasterKeysService.HistorySurgical,
id: element.historyId, id: element.historyId,
@ -99,7 +110,10 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
if (history != null) { if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory mySelectedHistory =
SoapUtils.generateMySelectedHistory( SoapUtils.generateMySelectedHistory(
history: history, isChecked: element.isChecked, remark: element.remarks, isLocal: false); history: history,
isChecked: element.isChecked,
remark: element.remarks,
isLocal: false);
myHistoryList.add(mySelectedHistory); myHistoryList.add(mySelectedHistory);
} }
} }
@ -108,15 +122,19 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
} }
getAllergies(SOAPViewModel model) async { getAllergies(SOAPViewModel model) async {
if (model.patientAllergiesList.isNotEmpty) { if (model.patientAllergiesList.isNotEmpty) {
model.patientAllergiesList.forEach((element) { model.patientAllergiesList.forEach((element) {
MasterKeyModel selectedAllergy = model.getOneMasterKey( MasterKeyModel selectedAllergy = model.getOneMasterKey(
masterKeys: MasterKeysService.Allergies, id: element.allergyDiseaseId, typeId: element.allergyDiseaseType); masterKeys: MasterKeysService.Allergies,
id: element.allergyDiseaseId,
typeId: element.allergyDiseaseType);
MasterKeyModel selectedAllergySeverity; MasterKeyModel selectedAllergySeverity;
if (element.severity == 0) { if (element.severity == 0) {
selectedAllergySeverity = MasterKeyModel( selectedAllergySeverity = MasterKeyModel(
id: 0, typeId: MasterKeysService.AllergySeverity.getMasterKeyService(), nameAr: '', nameEn: ''); id: 0,
typeId: MasterKeysService.AllergySeverity.getMasterKeyService(),
nameAr: '',
nameEn: '');
} else { } else {
selectedAllergySeverity = model.getOneMasterKey( selectedAllergySeverity = model.getOneMasterKey(
masterKeys: MasterKeysService.AllergySeverity, masterKeys: MasterKeysService.AllergySeverity,
@ -124,15 +142,17 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
); );
} }
MySelectedAllergy mySelectedAllergy = SoapUtils.generateMySelectedAllergy( MySelectedAllergy mySelectedAllergy =
allergy: selectedAllergy, SoapUtils.generateMySelectedAllergy(
isChecked: element.isChecked, allergy: selectedAllergy,
createdBy: element.createdBy, isChecked: element.isChecked,
remark: element.remarks, createdBy: element.createdBy,
isLocal: false, remark: element.remarks,
allergySeverity: selectedAllergySeverity); isLocal: false,
allergySeverity: selectedAllergySeverity);
if (selectedAllergy != null && selectedAllergySeverity != null) myAllergiesList.add(mySelectedAllergy); if (selectedAllergy != null && selectedAllergySeverity != null)
myAllergiesList.add(mySelectedAllergy);
}); });
} }
} }
@ -148,11 +168,14 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
if (model.patientChiefComplaintList.isNotEmpty) { if (model.patientChiefComplaintList.isNotEmpty) {
isChiefExpand = true; isChiefExpand = true;
complaintsController.text = Helpers.parseHtmlString(model.patientChiefComplaintList[0].chiefComplaint); complaintsController.text = Helpers.parseHtmlString(
model.patientChiefComplaintList[0].chiefComplaint);
illnessController.text = model.patientChiefComplaintList[0].hopi; illnessController.text = model.patientChiefComplaintList[0].hopi;
medicationController.text = !(model.patientChiefComplaintList[0].currentMedication).isNotEmpty medicationController.text =
? model.patientChiefComplaintList[0].currentMedication + '\n \n' !(model.patientChiefComplaintList[0].currentMedication).isNotEmpty
: model.patientChiefComplaintList[0].currentMedication; ? model.patientChiefComplaintList[0].currentMedication +
'\n \n'
: model.patientChiefComplaintList[0].currentMedication;
} }
if (widget.patientInfo.admissionNo == null) { if (widget.patientInfo.admissionNo == null) {
await getHistory(model); await getHistory(model);
@ -200,7 +223,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
isExpanded: isChiefExpand, isExpanded: isChiefExpand,
), ),
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 4 : 2), height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 4 : 2),
), ),
if (widget.patientInfo.admissionNo == null) if (widget.patientInfo.admissionNo == null)
ExpandableSOAPWidget( ExpandableSOAPWidget(
@ -212,12 +236,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
}); });
}, },
child: Column( child: Column(
children: [UpdateHistoryWidget(myHistoryList: myHistoryList)], children: [
UpdateHistoryWidget(myHistoryList: myHistoryList)
],
), ),
isExpanded: isHistoryExpand, isExpanded: isHistoryExpand,
), ),
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 4 : 2), height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 4 : 2),
), ),
if (widget.patientInfo.admissionNo == null) if (widget.patientInfo.admissionNo == null)
ExpandableSOAPWidget( ExpandableSOAPWidget(
@ -241,7 +268,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
isExpanded: isAllergiesExpand, isExpanded: isAllergiesExpand,
), ),
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 20 : 10), height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 20 : 10),
), ),
], ],
), ),
@ -253,7 +281,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
} }
addSubjectiveInfo( addSubjectiveInfo(
{SOAPViewModel model, List<MySelectedAllergy> myAllergiesList, List<MySelectedHistory> myHistoryList}) async { {SOAPViewModel model,
List<MySelectedAllergy> myAllergiesList,
List<MySelectedHistory> myHistoryList}) async {
if (FocusScope.of(context).hasFocus) FocusScope.of(context).unfocus(); if (FocusScope.of(context).hasFocus) FocusScope.of(context).unfocus();
widget.changeLoadingState(true); widget.changeLoadingState(true);
formKey.currentState.save(); formKey.currentState.save();
@ -265,22 +295,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
if (complaintsController.text.isNotEmpty && if (complaintsController.text.isNotEmpty &&
illnessController.text.isNotEmpty && illnessController.text.isNotEmpty &&
complaintsController.text.length > 25) { complaintsController.text.length > 25) {
await postChiefComplaint(model: model); await model.postSubjectServices(
if (model.state == ViewState.ErrorLocal) { patientInfo: widget.patientInfo,
Helpers.showErrorToast(model.error); complaintsText: complaintsController.text,
} medicationText: medicationController.text,
if (myHistoryList.length != 0) { illnessText: illnessController.text,
await postHistories(model: model, myHistoryList: myHistoryList); myHistoryList: myHistoryList,
if (model.state == ViewState.ErrorLocal) { myAllergiesList: myAllergiesList,
Helpers.showErrorToast(model.error); );
}
}
if (myAllergiesList.length != 0) {
await postAllergy(myAllergiesList: myAllergiesList, model: model);
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
}
widget.changeLoadingState(true); widget.changeLoadingState(true);
widget.changePageViewIndex(1); widget.changePageViewIndex(1);
@ -311,112 +334,11 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
} }
} }
postAllergy(
{List<MySelectedAllergy> myAllergiesList, SOAPViewModel model}) async {
PostAllergyRequestModel postAllergyRequestModel =
new PostAllergyRequestModel();
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
myAllergiesList.forEach((allergy) {
if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM ==
null)
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = [];
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(
ListHisProgNotePatientAllergyDiseaseVM(
allergyDiseaseId: allergy.selectedAllergy.id,
allergyDiseaseType: allergy.selectedAllergy.typeId,
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
severity: allergy.selectedAllergySeverity.id,
remarks: allergy.remark,
createdBy: allergy.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
isChecked: allergy.isChecked,
isUpdatedByNurse: false));
});
if (model.patientAllergiesList.isEmpty) {
await model.postAllergy(postAllergyRequestModel);
} else {
await model.patchAllergy(postAllergyRequestModel);
}
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
doctorID: '',
editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP, isLocalBusy: true);
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
}
postHistories(
{List<MySelectedHistory> myHistoryList, SOAPViewModel model}) async {
PostHistoriesRequestModel postHistoriesRequestModel =
new PostHistoriesRequestModel(doctorID: '');
myHistoryList.forEach((history) {
if (postHistoriesRequestModel.listMedicalHistoryVM == null)
postHistoriesRequestModel.listMedicalHistoryVM = [];
postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: "",
historyId: history.selectedHistory.id,
historyType: history.selectedHistory.typeId,
isChecked: history.isChecked,
));
});
if (model.patientHistoryList.isEmpty) {
await model.postHistories(postHistoriesRequestModel);
} else {
await model.patchHistories(postHistoriesRequestModel);
}
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
}
postChiefComplaint({SOAPViewModel model}) async {
formKey.currentState.save();
if (formKey.currentState.validate()) {
PostChiefComplaintRequestModel postChiefComplaintRequestModel = new PostChiefComplaintRequestModel(
admissionNo: widget.patientInfo.admissionNo != null ? int.parse(widget.patientInfo.admissionNo) : null,
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo ?? 0,
appointmentNo: widget.patientInfo.appointmentNo ?? 0,
chiefComplaint: complaintsController.text,
currentMedication: medicationController.text,
hopi: illnessController.text,
isLactation: false,
ispregnant: false,
doctorID: '',
numberOfWeeks: 0);
if (model.patientChiefComplaintList.isEmpty) {
postChiefComplaintRequestModel.editedBy = '';
await model.postChiefComplaint(postChiefComplaintRequestModel);
} else {
postChiefComplaintRequestModel.editedBy = '';
await model.patchChiefComplaint(postChiefComplaintRequestModel);
}
}
}
@override @override
Function nextFunction(model) { Function nextFunction(model) {
addSubjectiveInfo(model: model, myAllergiesList: myAllergiesList, myHistoryList: myHistoryList); addSubjectiveInfo(
model: model,
myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList);
} }
} }

@ -31,14 +31,20 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
return Container( return Container(
child: CardWithBgWidget( child: CardWithBgWidget(
bgColor: bgColor: widget.reply.infoStatus == 0
widget.reply.status == 2 ? Colors.green[600] : Color(0xFFD02127), ? Color(0xFF2B353E)
: widget.reply.infoStatus == 4
? IN_PROGRESS_COLOR
: widget.reply.infoStatus == 3
? Color(0xFFD02127)
: Colors.green[600],
hasBorder: false, hasBorder: false,
widget: Container( widget: Container(
child: InkWell( child: InkWell(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if(widget.reply.infoStatus != 0)
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -49,18 +55,29 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: widget.reply.status == 2 text: widget.reply.infoStatus == 1
? TranslationBase.of(context).active ? TranslationBase.of(context).replayCallStatus
: widget.reply.status == 1 : widget.reply.infoStatus == 2
? TranslationBase.of(context).onHold ? TranslationBase.of(context).patientArrived
: TranslationBase.of(context).cancelled, : widget.reply.infoStatus == 3
? TranslationBase.of(context)
.calledAndNoResponse
: widget.reply.infoStatus == 4
? TranslationBase.of(context)
.underProcess
: widget.reply.infoStatus == 6
? TranslationBase.of(context)
.textResponse
: '',
style: TextStyle( style: TextStyle(
color: widget.reply.status == 2 color: widget.reply.infoStatus == 4
? Colors.green[600] ? IN_PROGRESS_COLOR
: Color(0xFFD02127), : widget.reply.infoStatus == 3
? Color(0xFFD02127)
: Colors.green[600],
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 2.0 * SizeConfig.textMultiplier)), fontSize: 1.8 * SizeConfig.textMultiplier)),
], ],
), ),
), ),
@ -183,37 +200,13 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
label: TranslationBase.of(context).fileNumber, label: TranslationBase.of(context).fileNumber,
value: widget.reply.patientID.toString(), value: widget.reply.patientID.toString(),
), ),
CustomRow( CustomRow(
label: TranslationBase.of(context).age + " : ", label: TranslationBase.of(context).age + " : ",
value: value:
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}", "${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}",
), ),
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( SizedBox(
height: 10, height: 8,
), ),
], ],
), ),
@ -227,27 +220,28 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: fontSize: 1.3 * SizeConfig.textMultiplier,
1.3 * SizeConfig.textMultiplier,
color: Color(0xFF575757)), color: Color(0xFF575757)),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context) text:
.requestType + TranslationBase.of(context).requestType +
": ", ": ",
style: TextStyle( style: TextStyle(
fontSize: SizeConfig fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() * .getTextMultiplierBasedOnWidth() *
2.8, 2.8,
color: Color(0xFF575757), color: Color(0xFF575757),
//TranslationBase.of(context).doctorResponse + " : ", //TranslationBase.of(context).doctorResponse + " : ",
)), )),
new TextSpan( new TextSpan(
text: text:
"${widget.reply.requestTypeDescription}", "${widget.reply.requestTypeDescription}",
style: TextStyle( style: TextStyle(
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
)), )),

@ -82,7 +82,8 @@ class PatientCard extends StatelessWidget {
? Row( ? Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context).arrivedP, TranslationBase.of(context)
.arrivedP,
color: Colors.green, color: Colors.green,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -134,19 +135,27 @@ class PatientCard extends StatelessWidget {
width: 8, width: 8,
), ),
AppText( AppText(
patientInfo.status == 2 ? 'Confirmed' : 'Booked', patientInfo.status == 2
color: patientInfo.status == 2 ? Colors.green : Colors.grey, ? 'Confirmed'
: 'Booked',
color: patientInfo.status == 2
? Colors.green
: Colors.grey,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 10, fontSize: 10,
), ),
], ],
) )
: !isFromSearch && !isFromLiveCare && patientInfo.patientStatusType == null : !isFromSearch &&
!isFromLiveCare &&
patientInfo.patientStatusType ==
null
? Row( ? Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context).notArrived, TranslationBase.of(context)
.notArrived,
color: Colors.red[800], color: Colors.red[800],
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -166,8 +175,13 @@ class PatientCard extends StatelessWidget {
width: 8, width: 8,
), ),
AppText( AppText(
patientInfo.status == 2 ? 'Booked' : 'Confirmed', patientInfo.status == 2
color: patientInfo.status == 2 ? Colors.grey : Colors.green, ? 'Booked'
: 'Confirmed',
color:
patientInfo.status == 2
? Colors.grey
: Colors.green,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 12, fontSize: 12,
@ -177,13 +191,17 @@ class PatientCard extends StatelessWidget {
: SizedBox(), : SizedBox(),
this.arrivalType == '1' this.arrivalType == '1'
? AppText( ? AppText(
patientInfo.startTime != null ? patientInfo.startTime : patientInfo.startTimes, patientInfo.startTime != null
? patientInfo.startTime
: patientInfo.startTimes,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
) )
: patientInfo.arrivedOn != null : patientInfo.arrivedOn != null
? AppText( ? AppText(
AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate( AppDateUtils.getDayMonthYearDate(
AppDateUtils
.convertStringToDate(
patientInfo.arrivedOn, patientInfo.arrivedOn,
)) + )) +
" " + " " +
@ -192,8 +210,10 @@ class PatientCard extends StatelessWidget {
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontSize: 15, fontSize: 15,
) )
: (patientInfo.appointmentDate != null && : (patientInfo.appointmentDate !=
patientInfo.appointmentDate.isNotEmpty) null &&
patientInfo
.appointmentDate.isNotEmpty)
? AppText( ? AppText(
"${AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate( "${AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate(
patientInfo.appointmentDate, patientInfo.appointmentDate,
@ -232,10 +252,13 @@ class PatientCard extends StatelessWidget {
// width: MediaQuery.of(context).size.width*0.51, // width: MediaQuery.of(context).size.width*0.51,
child: AppText( child: AppText(
isFromLiveCare isFromLiveCare
? Helpers.capitalize(patientInfo.fullName) ? Helpers.capitalize(
: (Helpers.capitalize(patientInfo.firstName) + patientInfo.fullName)
: (Helpers.capitalize(
patientInfo.firstName) +
" " + " " +
Helpers.capitalize(patientInfo.lastName)), Helpers.capitalize(
patientInfo.lastName)),
fontSize: 16, fontSize: 16,
color: Color(0xff2e303a), color: Color(0xff2e303a),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -273,19 +296,25 @@ class PatientCard extends StatelessWidget {
fontSize: 14, fontSize: 14,
textOverflow: TextOverflow.ellipsis, textOverflow: TextOverflow.ellipsis,
), ),
patientInfo.nationality != null || patientInfo.nationalityId != null patientInfo.nationality != null ||
patientInfo.nationalityId != null
? ClipRRect( ? ClipRRect(
borderRadius: BorderRadius.circular(20.0), borderRadius:
child: CachedNetworkImage( BorderRadius.circular(20.0),
imageUrl: patientInfo.nationalityFlagURL != null child: Image.network(
patientInfo.nationalityFlagURL != null
? patientInfo.nationalityFlagURL ? patientInfo.nationalityFlagURL
: '', : '',
height: 25, height: 25,
width: 30, width: 30,
errorWidget: (context, url, error) => AppText( errorBuilder: (BuildContext context,
'No Image', Object exception,
fontSize: 7.5, StackTrace stackTrace) {
), return AppText(
'No Image',
fontSize: 10,
);
},
)) ))
: SizedBox() : SizedBox()
], ],
@ -315,14 +344,14 @@ class PatientCard extends StatelessWidget {
width: 10, width: 10,
), ),
Expanded( Expanded(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ child: Row(
children: [
Expanded(child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
CustomRow( CustomRow(
label: TranslationBase.of(context).fileNumber, label: TranslationBase.of(context).fileNumber,
value: patientInfo.patientId.toString(), value: patientInfo.patientId.toString(),
),
//if (isInpatient)
),
CustomRow( CustomRow(
label: TranslationBase.of(context).age + " : ", label: TranslationBase.of(context).age + " : ",
value: value:
@ -359,7 +388,11 @@ class PatientCard extends StatelessWidget {
), ),
], ],
), ),
])) ]),
),
Icon(Icons.arrow_forward, size: 24,),
],
))
]), ]),
isFromLiveCare isFromLiveCare
? Row( ? Row(
@ -407,3 +440,5 @@ class PatientCard extends StatelessWidget {
)); ));
} }
} }

Loading…
Cancel
Save