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

 Conflicts:
	lib/config/config.dart
merge-requests/820/head
hussam al-habibeh 4 years ago
commit 8fc25538b0

@ -134,6 +134,7 @@ const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies';
const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode';
const POST_EPISODE_FOR_IN_PATIENT = 'Services/DoctorApplication.svc/REST/PostEpisodeForInpatient';
const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies';
const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory';
@ -240,6 +241,7 @@ const CREATE_DOCTOR_RESPONSE = "Services/DoctorApplication.svc/REST/CreateDoctor
const GET_DOCTOR_NOT_REPLIED_COUNTS = "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts";
const ALL_SPECIAL_LAB_RESULT = "services/Patients.svc/REST/GetPatientLabSpecialResultsALL";
const GET_MEDICATION_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/Doctor_GetMedicationForInpatient";
const GET_EPISODE_FOR_INPATIENT = "/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient";
var selectedPatientType = 1;

@ -699,9 +699,14 @@ const Map<String, Map<String, String>> localizedValues = {
"textCopiedSuccessfully": {"en": "Text copied successfully", "ar": "تم نسخ النص بنجاح"},
"roomNo": {"en": "Room No", "ar": "رقم الغرفة"},
"replayCallStatus": {"en": "Called", "ar": "تم الاتصال"},
"patientArrived": {"en": "Patient Arrived", "ar": "تم الاتصال"},
"calledAndNoResponse": {"en": "Called And No Response", "ar": "تم الاتصال"},
"underProcess": {"en": "Under Process", "ar": "تم الاتصال"},
"textResponse": {"en": "Text Response", "ar": "تم الاتصال"},
"patientArrived": {"en": "Patient Arrived", "ar": "وصل المريض"},
"calledAndNoResponse": {"en": "Called And No Response", "ar": "تم الاتصال ولا يوجد رد"},
"underProcess": {"en": "Under Process", "ar": "تحت التجهيز"},
"textResponse": {"en": "Text Response", "ar": "استجابة النص"
}
,
"requestType":{
"en":"Request Type",
"ar":"نوع الطلب"},
"special": {"en": "Special", "ar": "خاص"}
};

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

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

@ -14,6 +14,8 @@ import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/PatchAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.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_assessment_request_model.dart';
@ -63,6 +65,18 @@ class SOAPService extends LookupService {
}, body: postEpisodeReqModel.toJson());
}
Future postEpisodeForInPatient(PostEpisodeForInpatientRequestModel postEpisodeForInpatientRequestModel) async {
hasError = false;
await baseAppClient.post(POST_EPISODE_FOR_IN_PATIENT,
onSuccess: (dynamic response, int statusCode) {
episodeID = response['EpisodeID'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postEpisodeForInpatientRequestModel.toJson());
}
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
hasError = false;
@ -302,4 +316,19 @@ class SOAPService extends LookupService {
super.error = error;
}, body: getAssessmentReqModel.toJson());
}
Future getEpisodeForInpatient(
GetEpisodeForInpatientReqModel getEpisodeForInpatientReqModel) async {
hasError = false;
await baseAppClient.post(GET_EPISODE_FOR_INPATIENT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
episodeID = response["GetEpisodeNo"];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getEpisodeForInpatientReqModel.toJson());
}
}

@ -19,6 +19,8 @@ import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/PatchAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.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_assessment_request_model.dart';
@ -89,56 +91,64 @@ class SOAPViewModel extends BaseViewModel {
List<GetAssessmentResModel> get patientAssessmentList =>
_SOAPService.patientAssessmentList;
int get episodeID => _SOAPService.episodeID;
bool isAddProgress = true;
bool isAddExamInProgress = true;
String progressNoteText ="";
String progressNoteText = "";
String complaintsControllerError = '';
String medicationControllerError = '';
String illnessControllerError = '';
get medicationStrengthList => _SOAPService.medicationStrengthListWithModel;
get medicationDoseTimeList => _SOAPService.medicationDoseTimeListWithModel;
get medicationRouteList => _SOAPService.medicationRouteListWithModel;
get medicationFrequencyList => _SOAPService.medicationFrequencyListWithModel;
List<GetMedicationResponseModel> get allMedicationList =>
_prescriptionService.allMedicationList;
SubjectiveCallBack subjectiveCallBack;
setSubjectiveCallBack(SubjectiveCallBack callBack)
{
setSubjectiveCallBack(SubjectiveCallBack callBack) {
this.subjectiveCallBack = callBack;
}
nextOnSubjectPage(model){
nextOnSubjectPage(model) {
subjectiveCallBack.nextFunction(model);
}
}
ObjectiveCallBack objectiveCallBack;
setObjectiveCallBack(ObjectiveCallBack callBack)
{
setObjectiveCallBack(ObjectiveCallBack callBack) {
this.objectiveCallBack = callBack;
}
nextOnObjectivePage(model){
nextOnObjectivePage(model) {
objectiveCallBack.nextFunction(model);
}
AssessmentCallBack assessmentCallBack;
setAssessmentCallBack(AssessmentCallBack callBack)
{
setAssessmentCallBack(AssessmentCallBack callBack) {
this.assessmentCallBack = callBack;
}
nextOnAssessmentPage(model){
nextOnAssessmentPage(model) {
assessmentCallBack.nextFunction(model);
}
PlanCallBack planCallBack;
setPlanCallBack(PlanCallBack callBack)
{
setPlanCallBack(PlanCallBack callBack) {
this.planCallBack = callBack;
}
nextOnPlanPage(model){
nextOnPlanPage(model) {
planCallBack.nextFunction(model);
}
@ -176,6 +186,19 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future postEpisodeForInPatient(
PostEpisodeForInpatientRequestModel
postEpisodeForInpatientRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postEpisodeForInPatient(
postEpisodeForInpatientRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postAllergy(postAllergyRequestModel);
@ -361,19 +384,22 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getPatientPhysicalExam(PatiantInformtion patientInfo,
) async {
GetPhysicalExamReqModel getPhysicalExamReqModel =
GetPhysicalExamReqModel(
Future getPatientPhysicalExam(
PatiantInformtion patientInfo,
) async {
GetPhysicalExamReqModel getPhysicalExamReqModel = GetPhysicalExamReqModel(
patientMRN: patientInfo.patientMRN,
episodeID: patientInfo.episodeNo == null?"0":patientInfo.episodeNo.toString(),
appointmentNo: patientInfo.appointmentNo == null ?0:int.parse(
patientInfo.appointmentNo.toString(),
),
episodeID: patientInfo.episodeNo == null
? "0"
: patientInfo.episodeNo.toString(),
appointmentNo: patientInfo.appointmentNo == null
? 0
: int.parse(
patientInfo.appointmentNo.toString(),
),
);
if(patientInfo.admissionNo !=null &&patientInfo.admissionNo.isNotEmpty)
getPhysicalExamReqModel.admissionNo =int.parse(patientInfo.admissionNo);
if (patientInfo.admissionNo != null && patientInfo.admissionNo.isNotEmpty)
getPhysicalExamReqModel.admissionNo = int.parse(patientInfo.admissionNo);
else
getPhysicalExamReqModel.admissionNo = 0;
setState(ViewState.Busy);
@ -417,6 +443,23 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getEpisodeForInpatient(PatiantInformtion patient) async {
setState(ViewState.BusyLocal);
GetEpisodeForInpatientReqModel getEpisodeForInpatientReqModel =
GetEpisodeForInpatientReqModel(
patientID: patient.patientId,
admissionNo: int.parse(patient.admissionNo),
patientTypeID: 1);
await _SOAPService.getEpisodeForInpatient(getEpisodeForInpatientReqModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else {
patient.episodeNo = _SOAPService.episodeID;
setState(ViewState.Idle);
}
}
// ignore: missing_return
MasterKeyModel getOneMasterKey(
{@required MasterKeysService masterKeys, dynamic id, int typeId}) {
@ -530,14 +573,268 @@ class SOAPViewModel extends BaseViewModel {
}
}
int getFirstIndexForOldExamination(List<MySelectedExamination> mySelectedExamination){
Iterable<MySelectedExamination> examList = mySelectedExamination.where(
(element) => !element.isLocal);
int getFirstIndexForOldExamination(
List<MySelectedExamination> mySelectedExamination) {
Iterable<MySelectedExamination> examList =
mySelectedExamination.where((element) => !element.isLocal);
if (examList.length > 0) {
return mySelectedExamination.indexOf(examList.first);
} else
return -1;
}
onUpdateSubjectStepStart(PatiantInformtion patientInfo) async {
GetChiefComplaintReqModel getChiefComplaintReqModel =
GetChiefComplaintReqModel(
admissionNo:
patientInfo
.admissionNo !=
null
? int.parse(patientInfo.admissionNo)
: null,
patientMRN: patientInfo.patientMRN,
appointmentNo: patientInfo.appointmentNo != null
? int.parse(patientInfo.appointmentNo.toString())
: null,
episodeId: patientInfo.episodeNo,
episodeID: patientInfo.episodeNo,
doctorID: '');
var services = [
_SOAPService.getPatientChiefComplaint(getChiefComplaintReqModel)
];
if (patientInfo.admissionNo == null) {
complaintsControllerError = '';
medicationControllerError = '';
illnessControllerError = '';
GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel(
patientMRN: patientInfo.patientMRN,
episodeID: patientInfo.episodeNo.toString(),
appointmentNo: int.parse(patientInfo.appointmentNo.toString()),
doctorID: '',
editedBy: '');
services.add(
_SOAPService.getPatientHistories(getHistoryReqModel, isFirst: true));
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
patientMRN: patientInfo.patientMRN,
episodeId: patientInfo.episodeNo,
appointmentNo: int.parse(patientInfo.appointmentNo.toString()),
doctorID: '',
editedBy: '');
services.add(_SOAPService.getPatientAllergy(generalGetReqForSOAP));
}
final results = await Future.wait(services);
await callServicesAfterGetPatientInfoForUpdateSubject();
}
callServicesAfterGetPatientInfoForUpdateSubject() async {
var services;
if (patientHistoryList.isNotEmpty) {
if (historyFamilyList.isEmpty) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.HistoryFamily)
];
} else {
services.add(
_SOAPService.getMasterLookup(MasterKeysService.HistoryFamily));
}
}
if (historyMedicalList.isEmpty) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.HistoryMedical)
];
} else
services.add(
_SOAPService.getMasterLookup(MasterKeysService.HistoryMedical));
}
if (historySurgicalList.length == 0) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.HistorySurgical)
];
} else
services.add(
_SOAPService.getMasterLookup(MasterKeysService.HistorySurgical));
}
if (historySportList.length == 0) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.HistorySports)
];
} else
services.add(
_SOAPService.getMasterLookup(MasterKeysService.HistorySports));
}
}
if (patientAllergiesList.isNotEmpty) {
if (allergiesList.isEmpty) if (services == null) {
services = [_SOAPService.getMasterLookup(MasterKeysService.Allergies)];
} else
services.add(_SOAPService.getMasterLookup(MasterKeysService.Allergies));
if (allergySeverityList.isEmpty) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.AllergySeverity)
];
} else
services.add(
_SOAPService.getMasterLookup(MasterKeysService.AllergySeverity));
}
}
final results = await Future.wait(services ?? []);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
onAddMedicationStart() async {
setState(ViewState.Busy);
var services;
if (medicationStrengthList.length == 0) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.MedicationStrength)
];
} else {
services.add(
_SOAPService.getMasterLookup(MasterKeysService.MedicationStrength));
}
}
if (medicationFrequencyList.length == 0) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.MedicationFrequency)
];
} else {
services.add(_SOAPService.getMasterLookup(
MasterKeysService.MedicationFrequency));
}
}
if (medicationDoseTimeList.length == 0) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.MedicationDoseTime)
];
} else {
services.add(
_SOAPService.getMasterLookup(MasterKeysService.MedicationDoseTime));
}
}
if (medicationRouteList.length == 0) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.MedicationRoute)
];
} else {
services.add(
_SOAPService.getMasterLookup(MasterKeysService.MedicationRoute));
}
}
if (allMedicationList.length == 0) {
await getMedicationList();
if (services == null) {
services = [
_prescriptionService.getMedicationList()
];
} else {
services.add(
_prescriptionService.getMedicationList());
}
}
final results = await Future.wait(services ?? []);
if (_SOAPService.hasError ||_prescriptionService.hasError ) {
error = _SOAPService.error + _prescriptionService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
callAddAssessmentLookupsServices({bool allowSetState = true}) async {
if(allowSetState)
setState(ViewState.Busy);
var services;
if (listOfDiagnosisCondition.length == 0) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.DiagnosisCondition)
];
} else {
services.add(
_SOAPService.getMasterLookup(MasterKeysService.DiagnosisCondition));
}
}
if (listOfDiagnosisType.length == 0) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.DiagnosisType)
];
} else {
services.add(_SOAPService.getMasterLookup(
MasterKeysService.DiagnosisType));
}
}
if (listOfICD10.length == 0) {
if (services == null) {
services = [
_SOAPService.getMasterLookup(MasterKeysService.ICD10)
];
} else {
services.add(
_SOAPService.getMasterLookup(MasterKeysService.ICD10));
}
}
final results = await Future.wait(services ?? []);
if(allowSetState) {
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
}
onUpdateAssessmentStepStart(PatiantInformtion patientInfo) async {
GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel(
patientMRN: patientInfo.patientMRN,
episodeID: patientInfo.episodeNo.toString(),
editedBy: '',
doctorID: '',
appointmentNo:
int.parse(patientInfo.appointmentNo.toString()));
var services = [
_SOAPService.getPatientAssessment(getAssessmentReqModel)
];
final results = await Future.wait(services);
if (patientAssessmentList.isNotEmpty) {
await callAddAssessmentLookupsServices(allowSetState: false);
}
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
}

@ -1,3 +1,5 @@
import 'dart:isolate';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
@ -47,6 +49,21 @@ class BaseViewModel extends ChangeNotifier {
}
}
void getIsolateDoctorProfile(bool isGetProfile) async {
if (isGetProfile) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) {
doctorProfile = DoctorProfileModel.fromJson(profile);
}
}
if (doctorProfile == null) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) {
doctorProfile = DoctorProfileModel.fromJson(profile);
}
}
}
setDoctorProfile(DoctorProfileModel doctorProfile) async {
await sharedPref.setObj(DOCTOR_PROFILE, doctorProfile);
this.doctorProfile = doctorProfile;

@ -1,5 +1,3 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart';
import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart';
@ -8,16 +6,17 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_Model.dart';
import 'package:doctor_app_flutter/models/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import '../../locator.dart';
import 'authentication_view_model.dart';
import 'base_view_model.dart';
class DashboardViewModel extends BaseViewModel {
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
DashboardService _dashboardService = locator<DashboardService>();
SpecialClinicsService _specialClinicsService = locator<SpecialClinicsService>();
SpecialClinicsService _specialClinicsService =
locator<SpecialClinicsService>();
DoctorReplyService _doctorReplyService = locator<DoctorReplyService>();
List<DashboardModel> get dashboardItemsList =>
@ -26,17 +25,34 @@ class DashboardViewModel extends BaseViewModel {
bool get hasVirtualClinic => _dashboardService.hasVirtualClinic;
String get sServiceID => _dashboardService.sServiceID;
int get notRepliedCount => _doctorReplyService.notRepliedCount;
List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList => _specialClinicsService.specialClinicalCareList;
int get notRepliedCount => _doctorReplyService.notRepliedCount;
List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList =>
_specialClinicsService.specialClinicalCareList;
Future setFirebaseNotification(ProjectViewModel projectsProvider,
Future startHomeScreenServices(ProjectViewModel projectsProvider,
AuthenticationViewModel authProvider) async {
setState(ViewState.Busy);
await projectsProvider.getDoctorClinicsList();
await getDoctorProfile(isGetProfile: true);
final results = await Future.wait([
projectsProvider.getDoctorClinicsList(),
_dashboardService.getDashboard(),
_dashboardService.checkDoctorHasLiveCare(),
_specialClinicsService.getSpecialClinicalCareList(),
]);
// _firebaseMessaging.setAutoInitEnabled(true);
if (_dashboardService.hasError) {
error = _dashboardService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
setFirebaseNotification(authProvider);
}
Future setFirebaseNotification(AuthenticationViewModel authProvider) async {
_firebaseMessaging.requestNotificationPermissions(
const IosNotificationSettings(
sound: true, badge: true, alert: true, provisional: true));
@ -105,20 +121,17 @@ class DashboardViewModel extends BaseViewModel {
return value.toString();
}
GetSpecialClinicalCareListResponseModel getSpecialClinic(clinicId){
GetSpecialClinicalCareListResponseModel special ;
GetSpecialClinicalCareListResponseModel getSpecialClinic(clinicId) {
GetSpecialClinicalCareListResponseModel special;
specialClinicalCareList.forEach((element) {
if(element.clinicID == clinicId){
if (element.clinicID == clinicId) {
special = element;
}
});
return special;
}
Future getNotRepliedCount() async {
setState(ViewState.BusyLocal);
await getDoctorProfile();

@ -0,0 +1,22 @@
class GetEpisodeForInpatientReqModel {
int patientID;
int patientTypeID;
int admissionNo;
GetEpisodeForInpatientReqModel(
{this.patientID, this.patientTypeID, this.admissionNo});
GetEpisodeForInpatientReqModel.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];
patientTypeID = json['PatientTypeID'];
admissionNo = json['AdmissionNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientID'] = this.patientID;
data['PatientTypeID'] = this.patientTypeID;
data['AdmissionNo'] = this.admissionNo;
return data;
}
}

@ -0,0 +1,22 @@
class PostEpisodeForInpatientRequestModel {
int admissionNo;
int patientID;
int patientTypeID;
PostEpisodeForInpatientRequestModel(
{this.admissionNo, this.patientID, this.patientTypeID = 1});
PostEpisodeForInpatientRequestModel.fromJson(Map<String, dynamic> json) {
admissionNo = json['AdmissionNo'];
patientID = json['PatientID'];
patientTypeID = json['PatientTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AdmissionNo'] = this.admissionNo;
data['PatientID'] = this.patientID;
data['PatientTypeID'] = this.patientTypeID;
return data;
}
}

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

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

@ -66,12 +66,7 @@ class _HomeScreenState extends State<HomeScreen> {
return BaseView<DashboardViewModel>(
onModelReady: (model) async {
await model.setFirebaseNotification(
projectsProvider, authenticationViewModel);
await model.getDashboard();
await model.getDoctorProfile(isGetProfile: true);
await model.checkDoctorHasLiveCare();
await model.getSpecialClinicalCareList();
model.startHomeScreenServices(projectsProvider, authenticationViewModel);
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,

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

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

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

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

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

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

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

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

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

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

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

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

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/core/service/VideoCallService.dart';
import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.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/live_care/end_call_screen.dart';
@ -31,7 +32,8 @@ class PatientProfileScreen extends StatefulWidget {
_PatientProfileScreenState createState() => _PatientProfileScreenState();
}
class _PatientProfileScreenState extends State<PatientProfileScreen> with SingleTickerProviderStateMixin {
class _PatientProfileScreenState extends State<PatientProfileScreen>
with SingleTickerProviderStateMixin {
PatiantInformtion patient;
LiveCarePatientViewModel _liveCareViewModel = LiveCarePatientViewModel();
@ -54,6 +56,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
StreamController<String> videoCallDurationStreamController;
Stream<String> videoCallDurationStream = (() async* {})();
@override
void initState() {
_tabController = TabController(length: 2, vsync: this);
@ -108,15 +111,17 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
}
StreamSubscription callTimer;
callConnected() {
callTimer = CountdownTimer(Duration(minutes: 90), Duration(seconds: 1)).listen(null)
..onDone(() {
callTimer.cancel();
})
..onData((data) {
var t = Helpers.timeFrom(duration: data.elapsed);
videoCallDurationStreamController.sink.add(t);
});
callTimer =
CountdownTimer(Duration(minutes: 90), Duration(seconds: 1)).listen(null)
..onDone(() {
callTimer.cancel();
})
..onData((data) {
var t = Helpers.timeFrom(duration: data.elapsed);
videoCallDurationStreamController.sink.add(t);
});
}
callDisconnected() {
@ -133,12 +138,12 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
final screenSize = MediaQuery.of(context).size;
return BaseView<LiveCarePatientViewModel>(
onModelReady: (model) async {
if (isFromLiveCare && patient.patientStatus == 1) await model.addPatientToDoctorList(patient.vcId);
if (isFromLiveCare && patient.patientStatus == 1)
await model.addPatientToDoctorList(patient.vcId);
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isLoading: true,
appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: false,
body: Column(
@ -147,11 +152,13 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
children: [
Column(
children: [
PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? '0', patientType,
PatientProfileHeaderNewDesignAppBar(
patient, arrivalType ?? '0', patientType,
videoCallDurationStream: videoCallDurationStream,
isInpatient: isInpatient,
isFromLiveCare: isFromLiveCare,
height: (patient.patientStatusType != null && patient.patientStatusType == 43)
height: (patient.patientStatusType != null &&
patient.patientStatusType == 43)
? 210
: isDischargedPatient
? 240
@ -183,7 +190,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
isInpatient: isInpatient,
from: from,
to: to,
isDischargedPatient: isDischargedPatient,
isDischargedPatient:
isDischargedPatient,
isFromSearch: isFromSearch,
)
: ProfileGridForOther(
@ -204,25 +212,34 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
),
],
),
if ( (isInpatient && isMyPatient )? true:isFromLiveCare
? patient.episodeNo != null
: patient.patientStatusType != null && patient.patientStatusType == 43)
if ((isInpatient)
? true
: isFromLiveCare
? patient.episodeNo != null
: patient.patientStatusType != null &&
patient.patientStatusType == 43)
BaseView<SOAPViewModel>(
onModelReady: (model) async {
model.getDoctorProfile();
if (isInpatient) {
await model.getEpisodeForInpatient(patient);
}
},
builder: (_, model, w) => Positioned(
top: 180,
left: 20,
right: 20,
child: Row(
child: Row(
children: [
Expanded(child: Container()),
if (patient.episodeNo == 0)
AppButton(
loading: model.state== ViewState.BusyLocal,
disabled: model.state== ViewState.BusyLocal,
title:
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
color: isFromLiveCare
color: isFromLiveCare || isInpatient
? Colors.red.shade700
: patient.patientStatusType == 43
? Colors.red.shade700
@ -239,29 +256,22 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
height: 30,
),
onPressed: () async {
if ((isFromLiveCare && patient.appointmentNo != null) ||
patient.patientStatusType == 43) {
await locator<AnalyticsService>().logEvent(
eventCategory: "Patient Profile",
eventAction: "Create Episode",
);
PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(
appointmentNo: int.parse(patient.appointmentNo.toString()),
patientMRN: patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(context);
await model.postEpisode(postEpisodeReqModel);
GifLoaderDialogUtils.hideDialog(context);
patient.episodeNo = model.episodeID;
Navigator.of(context)
.pushNamed(CREATE_EPISODE, arguments: {'patient': patient});
if ((isFromLiveCare &&
patient.appointmentNo != null) ||
patient.patientStatusType == 43 || isInpatient ) {
createEpisode(
patient: patient, model: model);
}
},
),
if (patient.episodeNo != 0)
AppButton(
loading: model.state== ViewState.BusyLocal,
disabled: model.state== ViewState.BusyLocal,
title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: (isInpatient &&isMyPatient ) || isFromLiveCare
color: ((isInpatient) || isFromLiveCare) && model.state!= ViewState.BusyLocal
? Colors.red.shade700
: patient.patientStatusType == 43
? Colors.red.shade700
@ -278,16 +288,19 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
height: 30,
),
onPressed: () async {
await locator<AnalyticsService>().logEvent(
await locator<AnalyticsService>()
.logEvent(
eventCategory: "Patient Profile ",
eventAction: "Update Episode",
);
if ((isFromLiveCare &&
patient.appointmentNo != null &&
patient.appointmentNo != 0) ||
patient.patientStatusType == 43 ||isInpatient ) {
Navigator.of(context)
.pushNamed(UPDATE_EPISODE, arguments: {'patient': patient});
patient.patientStatusType == 43 ||
isInpatient) {
Navigator.of(context).pushNamed(
UPDATE_EPISODE,
arguments: {'patient': patient});
}
}),
],
@ -319,11 +332,14 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
child: Center(
child: AppButton(
fontWeight: FontWeight.w700,
color: isCallFinished ? Colors.red[600] : Colors.green[600],
color: isCallFinished
? Colors.red[600]
: Colors.green[600],
title: isCallFinished
? TranslationBase.of(context).endCall
: TranslationBase.of(context).initiateCall,
disabled: isCallStarted || model.state == ViewState.BusyLocal,
disabled: isCallStarted ||
model.state == ViewState.BusyLocal,
onPressed: () async {
// TODO MOSA TEST
// AppPermissionsUtils
@ -339,37 +355,52 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
// });
if (isCallFinished) {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) => EndCallScreen(patient: patient),settings: RouteSettings(name: 'EndCallScreen'),),);
context,
MaterialPageRoute(
builder: (BuildContext context) =>
EndCallScreen(patient: patient),
settings:
RouteSettings(name: 'EndCallScreen'),
),
);
} else {
GifLoaderDialogUtils.showMyDialog(context);
await model.startCall(isReCall: false, vCID: patient.vcId);
await model.startCall(
isReCall: false, vCID: patient.vcId);
if (model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
Helpers.showErrorToast(model.error);
} else {
await model.getDoctorProfile();
patient.appointmentNo = int.parse(model.startCallRes.appointmentNo.toString());
patient.appointmentNo = int.parse(model
.startCallRes.appointmentNo
.toString());
patient.episodeNo = 0;
model.updateInCallPatient(
patient: patient,
appointmentNo: int.parse(model.startCallRes.appointmentNo.toString()));
appointmentNo: int.parse(model
.startCallRes.appointmentNo
.toString()));
setState(() {
isCallStarted = true;
});
GifLoaderDialogUtils.hideDialog(context);
AppPermissionsUtils.requestVideoCallPermission(
context: context,
onTapGrant: () {
locator<VideoCallService>().openVideo(
model.startCallRes,
patient,
model.startCallRes != null ? model.startCallRes.isRecording : true,
callConnected,
callDisconnected);
});
AppPermissionsUtils
.requestVideoCallPermission(
context: context,
onTapGrant: () {
locator<VideoCallService>()
.openVideo(
model.startCallRes,
patient,
model.startCallRes != null
? model.startCallRes
.isRecording
: true,
callConnected,
callDisconnected);
});
}
}
},
@ -387,6 +418,36 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
),
);
}
createEpisode({PatiantInformtion patient, SOAPViewModel model}) async {
await locator<AnalyticsService>().logEvent(
eventCategory: "Patient Profile",
eventAction: "Create Episode",
);
GifLoaderDialogUtils.showMyDialog(context);
if (patient.admissionNo != null && patient.admissionNo.isNotEmpty) {
PostEpisodeForInpatientRequestModel postEpisodeReqModel =
PostEpisodeForInpatientRequestModel(
admissionNo: int.parse(patient.admissionNo),
patientID: patient.patientId);
await model.postEpisodeForInPatient(postEpisodeReqModel);
} else {
PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(
appointmentNo: int.parse(patient.appointmentNo.toString()),
patientMRN: patient.patientMRN);
await model.postEpisode(postEpisodeReqModel);
}
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
} else {
patient.episodeNo = model.episodeID;
Navigator.of(context)
.pushNamed(CREATE_EPISODE, arguments: {'patient': patient});
}
}
}
class AvatarWidget extends StatelessWidget {
@ -398,7 +459,12 @@ class AvatarWidget extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
boxShadow: [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.08), offset: Offset(0.0, 5.0), blurRadius: 16.0)],
boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.08),
offset: Offset(0.0, 5.0),
blurRadius: 16.0)
],
borderRadius: BorderRadius.all(Radius.circular(35.0)),
color: Color(0xffCCCCCC),
),

@ -35,36 +35,69 @@ class ProfileGridForInPatient extends StatelessWidget {
@override
Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS,
PatientProfileCardModel(
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png',
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).specialResult,
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).specialResult,
ALL_SPECIAL_LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).result,
RADIOLOGY_PATIENT, 'patient/health_summary.png',
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).result,
RADIOLOGY_PATIENT,
'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png',
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'patient/order_prescription.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).progress, TranslationBase.of(context).note, PROGRESS_NOTE,
PatientProfileCardModel(
TranslationBase.of(context).progress,
TranslationBase.of(context).note,
PROGRESS_NOTE,
'patient/Progress_notes.png',
isInPatient: isInpatient, isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(TranslationBase.of(context).order, TranslationBase.of(context).sheet, ORDER_NOTE,
isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(
TranslationBase.of(context).order,
TranslationBase.of(context).sheet,
ORDER_NOTE,
'patient/Progress_notes.png',
isInPatient: isInpatient, isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures,
ORDER_PROCEDURE, 'patient/Order_Procedures.png',
isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'patient/Order_Procedures.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY,
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).medical, TranslationBase.of(context).report,
PATIENT_MEDICAL_REPORT, 'patient/health_summary.png',
isInPatient: isInpatient, isDisable: false),
PatientProfileCardModel(
TranslationBase.of(context).medical,
TranslationBase.of(context).report,
PATIENT_MEDICAL_REPORT,
'patient/health_summary.png',
isInPatient: isInpatient,
isDisable: false),
PatientProfileCardModel(
TranslationBase.of(context).referral,
TranslationBase.of(context).patient,
@ -73,12 +106,19 @@ class ProfileGridForInPatient extends StatelessWidget {
isInPatient: isInpatient,
isDisable: isDischargedPatient || isFromSearch,
),
PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).approvals,
PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png',
PatientProfileCardModel(
TranslationBase.of(context).insurance,
TranslationBase.of(context).approvals,
PATIENT_INSURANCE_APPROVALS_NEW,
'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).discharge, TranslationBase.of(context).report, null,
PatientProfileCardModel(
TranslationBase.of(context).discharge,
TranslationBase.of(context).report,
null,
'patient/patient_sick_leave.png',
isInPatient: isInpatient, isDisable: true),
isInPatient: isInpatient,
isDisable: true),
PatientProfileCardModel(
TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave,
@ -90,30 +130,35 @@ class ProfileGridForInPatient extends StatelessWidget {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15),
child: StaggeredGridView.countBuilder(
child: GridView(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
crossAxisCount: 3,
itemCount: cardsList.length,
staggeredTileBuilder: (int index) => StaggeredTile.fit(1),
itemBuilder: (BuildContext context, int index) => PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: cardsList[index].nameLine1,
nameLine2: cardsList[index].nameLine2,
route: cardsList[index].route,
icon: cardsList[index].icon,
isInPatient: cardsList[index].isInPatient,
isDischargedPatient: cardsList[index].isDischargedPatient,
isDisable: cardsList[index].isDisable,
onTap: cardsList[index].onTap,
isLoading: cardsList[index].isLoading,
physics: BouncingScrollPhysics(),
// if you want IOS bouncing effect, otherwise remove this line
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisSpacing: 10,
mainAxisSpacing: 10,
crossAxisCount: 3,
),
//change the number as you want
children: cardsList.map((item) {
return PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: item.nameLine1,
nameLine2: item.nameLine2,
route: item.route,
icon: item.icon,
isInPatient: item.isInPatient,
isDischargedPatient: item.isDischargedPatient,
isDisable: item.isDisable,
onTap: item.onTap,
isLoading: item.isLoading,
);
}).toList(),
),
);
}

@ -18,14 +18,12 @@ import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.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:doctor_app_flutter/widgets/shared/text_fields/auto_complete_text_field.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class AddAssessmentDetails extends StatefulWidget {
@ -121,15 +119,9 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
heightFactor: 1,
child: BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.listOfDiagnosisCondition.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisCondition);
}
if (model.listOfDiagnosisType.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisType);
}
if (model.listOfICD10.length == 0) {
await model.getMasterLookup(MasterKeysService.ICD10);
}
model.callAddAssessmentLookupsServices();
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,

@ -1,6 +1,5 @@
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/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
@ -16,9 +15,7 @@ import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_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 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../shared_soap_widgets/SOAP_open_items.dart';
@ -58,24 +55,10 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage>
onModelReady: (model) async {
model.setAssessmentCallBack(this);
mySelectedAssessmentList.clear();
GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '',
doctorID: '',
appointmentNo:
int.parse(widget.patientInfo.appointmentNo.toString()));
await model.getPatientAssessment(getAssessmentReqModel);
await model.onUpdateAssessmentStepStart(widget.patientInfo);
if (model.patientAssessmentList.isNotEmpty) {
if (model.listOfDiagnosisCondition.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisCondition);
}
if (model.listOfDiagnosisType.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisType);
}
if (model.listOfICD10.length == 0) {
await model.getMasterLookup(MasterKeysService.ICD10);
}
model.patientAssessmentList.forEach((element) {
MasterKeyModel diagnosisType = model.getOneMasterKey(
masterKeys: MasterKeysService.DiagnosisType,

@ -1,4 +1,3 @@
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/viewModel/SOAP_view_model.dart';
@ -9,10 +8,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_s
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'examinations_list_search_widget.dart';

@ -6,8 +6,6 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_s
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class ExaminationItemCard extends StatelessWidget {

@ -3,10 +3,9 @@ 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/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.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/screens/base/base_view.dart';
@ -15,10 +14,8 @@ import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../shared_soap_widgets/SOAP_open_items.dart';
import '../shared_soap_widgets/SOAP_step_header.dart';

@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart';
@ -16,10 +15,8 @@ import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../shared_soap_widgets/SOAP_step_header.dart';
import '../shared_soap_widgets/expandable_SOAP_widget.dart';

@ -9,10 +9,8 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_s
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../shared_soap_widgets/bottom_sheet_title.dart';
import 'master_key_checkbox_search_allergies_widget.dart';

@ -8,11 +8,9 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_s
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../shared_soap_widgets/bottom_sheet_title.dart';
import 'priority_bar.dart';

@ -6,8 +6,6 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_s
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../shared_soap_widgets/SOAP_open_items.dart';

@ -13,13 +13,11 @@ import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/auto_complete_text_field.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../shared_soap_widgets/bottom_sheet_title.dart';
@ -58,23 +56,7 @@ class _AddMedicationState extends State<AddMedication> {
return FractionallySizedBox(
child: BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.medicationStrengthList.length == 0) {
await model.getMasterLookup(
MasterKeysService.MedicationStrength,
);
}
if (model.medicationFrequencyList.length == 0) {
await model.getMasterLookup(
MasterKeysService.MedicationFrequency);
}
if (model.medicationDoseTimeList.length == 0) {
await model.getMasterLookup(MasterKeysService.MedicationDoseTime);
}
if (model.medicationRouteList.length == 0) {
await model.getMasterLookup(MasterKeysService.MedicationRoute);
}
if (model.allMedicationList.length == 0)
await model.getMedicationList();
model.onAddMedicationStart();
},
builder: (_, model, w) =>
AppScaffold(

@ -3,15 +3,13 @@ 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/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart';
import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_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_history.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_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/screens/base/base_view.dart';
@ -20,9 +18,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjecti
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../shared_soap_widgets/SOAP_step_header.dart';
import '../shared_soap_widgets/expandable_SOAP_widget.dart';
@ -57,33 +53,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
getHistory(SOAPViewModel model) async {
widget.changeLoadingState(true);
model.complaintsControllerError = '';
model.medicationControllerError = '';
model.illnessControllerError = '';
GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()),
doctorID: '',
editedBy: '');
await model.getPatientHistories(getHistoryReqModel, isFirst: true);
if (model.patientHistoryList.isNotEmpty) {
if (model.historyFamilyList.isEmpty) {
await model.getMasterLookup(MasterKeysService.HistoryFamily);
}
if (model.historyMedicalList.isEmpty) {
await model.getMasterLookup(MasterKeysService.HistoryMedical);
}
if (model.historySurgicalList.length == 0) {
await model.getMasterLookup(MasterKeysService.HistorySurgical);
}
if (model.historySportList.length == 0) {
await model.getMasterLookup(MasterKeysService.HistorySports);
}
model.patientHistoryList.forEach((element) {
if (element.historyType == MasterKeysService.HistoryFamily.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey(
@ -138,17 +108,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
}
getAllergies(SOAPViewModel model) async {
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()),
doctorID: '',
editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP);
if (model.patientAllergiesList.isNotEmpty) {
if (model.allergiesList.isEmpty) await model.getMasterLookup(MasterKeysService.Allergies);
if (model.allergySeverityList.isEmpty) await model.getMasterLookup(MasterKeysService.AllergySeverity);
if (model.patientAllergiesList.isNotEmpty) {
model.patientAllergiesList.forEach((element) {
MasterKeyModel selectedAllergy = model.getOneMasterKey(
masterKeys: MasterKeysService.Allergies, id: element.allergyDiseaseId, typeId: element.allergyDiseaseType);
@ -183,16 +144,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
myAllergiesList.clear();
myHistoryList.clear();
model.setSubjectiveCallBack(this);
GetChiefComplaintReqModel getChiefComplaintReqModel = GetChiefComplaintReqModel(
admissionNo: widget.patientInfo.admissionNo != null ? int.parse(widget.patientInfo.admissionNo) : null,
patientMRN: widget.patientInfo.patientMRN,
appointmentNo: widget.patientInfo.appointmentNo != null
? int.parse(widget.patientInfo.appointmentNo.toString())
: null,
episodeId: widget.patientInfo.episodeNo,
episodeID: widget.patientInfo.episodeNo,
doctorID: '');
await model.getPatientChiefComplaint(getChiefComplaintReqModel);
await model.onUpdateSubjectStepStart(widget.patientInfo);
if (model.patientChiefComplaintList.isNotEmpty) {
isChiefExpand = true;
complaintsController.text = Helpers.parseHtmlString(model.patientChiefComplaintList[0].chiefComplaint);

@ -1,10 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.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/doctor_replay_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.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_history.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';

@ -1101,6 +1101,8 @@ class TranslationBase {
String get underProcess => localizedValues['underProcess'][locale.languageCode];
String get textResponse => localizedValues['textResponse'][locale.languageCode];
String get special => localizedValues['special'][locale.languageCode];
String get requestType => localizedValues['requestType'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

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

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

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

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