merge-requests/214/head
Sultan Khan 5 years ago
commit 669655307a

@ -36,20 +36,21 @@ class BaseAppClient {
}) async { }) async {
String url = BASE_URL + endPoint; String url = BASE_URL + endPoint;
try { try {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); //TODO change it edit By Jammal
String token = await sharedPref.getString(TOKEN); // Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) { // String token = await sharedPref.getString(TOKEN);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); // if (profile != null) {
if (body['DoctorID'] == null) // DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
body['DoctorID'] = doctorProfile?.doctorID; // if (body['DoctorID'] == null)
body['EditedBy'] = doctorProfile?.doctorID; body['DoctorID'] = 4709;//doctorProfile?.doctorID;
if (body['ProjectID'] == null) { body['EditedBy'] = 4709;//doctorProfile?.doctorID;
body['ProjectID'] = doctorProfile?.projectID; //if (body['ProjectID'] == null) {
} body['ProjectID'] = 15;//doctorProfile?.projectID;
if (body['ClinicID'] == null) // }
body['ClinicID'] = doctorProfile?.clinicID; // if (body['ClinicID'] == null)
} body['ClinicID'] = 1;//doctorProfile?.clinicID;
body['TokenID'] = token ?? ''; // }
body['TokenID'] = "@dm!n";//token ?? '';
String lang = await sharedPref.getString(APP_Language); String lang = await sharedPref.getString(APP_Language);
if (lang != null && lang == 'ar') if (lang != null && lang == 'ar')
body['LanguageID'] = 1; body['LanguageID'] = 1;
@ -63,9 +64,11 @@ class BaseAppClient {
body['SessionID'] = SESSION_ID; body['SessionID'] = SESSION_ID;
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP; body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP;
body['PatientOutSA'] = 0; // PATIENT_OUT_SA; body['PatientOutSA'] = 0; // PATIENT_OUT_SA;
body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID); body['VidaAuthTokenID'] =
body['VidaRefreshTokenID'] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU";
await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); //await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
body['VidaRefreshTokenID'] ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU";
//await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
@ -78,7 +81,7 @@ class BaseAppClient {
'Accept': 'application/json' 'Accept': 'application/json'
}); });
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400 ) { if (statusCode < 200 || statusCode >= 400) {
onFailure('Error While Fetching data', statusCode); onFailure('Error While Fetching data', statusCode);
} else { } else {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
@ -89,7 +92,7 @@ class BaseAppClient {
// helpers.showErrorToast('Your session expired Please login agian'); // helpers.showErrorToast('Your session expired Please login agian');
// } else // } else
if (parsed['MessageStatus'] == 1) { if (parsed['MessageStatus'] == 1) {
if(!parsed['IsAuthenticated']) if (!parsed['IsAuthenticated'])
onFailure(getError(parsed), statusCode); onFailure(getError(parsed), statusCode);
else else
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
@ -106,11 +109,10 @@ class BaseAppClient {
} }
} }
String getError(parsed){ String getError(parsed) {
//TODO change this fun //TODO change this fun
String error = parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']; String error = parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'];
if (parsed["ValidationErrors"] != null) { if (parsed["ValidationErrors"] != null) {
error = parsed["ValidationErrors"]["StatusMessage"].toString() + "\n"; error = parsed["ValidationErrors"]["StatusMessage"].toString() + "\n";
if (parsed["ValidationErrors"]["ValidationErrors"] != null && if (parsed["ValidationErrors"]["ValidationErrors"] != null &&
@ -119,12 +121,14 @@ class BaseAppClient {
i < parsed["ValidationErrors"]["ValidationErrors"].length; i < parsed["ValidationErrors"]["ValidationErrors"].length;
i++) { i++) {
error = error + error = error +
parsed["ValidationErrors"]["ValidationErrors"][i] parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] +
["Messages"][0] +
"\n"; "\n";
} }
} }
} }
if(error == null || error == "null" || error == "null\n"){
return "This server not work probably in this time";
}
return error; return error;
} }
} }

@ -29,6 +29,8 @@ const PROJECT_GET_INFO = "Services/DoctorApplication.svc/REST/GetProjectInfo";
const GET_PROJECTS = 'Services/Lists.svc/REST/GetProjectForDoctorAPP'; const GET_PROJECTS = 'Services/Lists.svc/REST/GetProjectForDoctorAPP';
const GET_PATIENT_VITAL_SIGN = const GET_PATIENT_VITAL_SIGN =
'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
const GET_PATIENT_VITAL_SIGN_DATA =
'Services/DoctorApplication.svc/REST/GetVitalSigns';
const GET_PATIENT_LAB_OREDERS = const GET_PATIENT_LAB_OREDERS =
'Services/DoctorApplication.svc/REST/GetPatientLabOreders'; 'Services/DoctorApplication.svc/REST/GetPatientLabOreders';
const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
@ -66,6 +68,9 @@ const GET_PENDING_REFERRAL_PATIENT =
const CREATE_REFERRAL_PATIENT = const CREATE_REFERRAL_PATIENT =
'Services/DoctorApplication.svc/REST/CreateReferral'; 'Services/DoctorApplication.svc/REST/CreateReferral';
const RESPONSE_PENDING_REFERRAL_PATIENT =
'Services/DoctorApplication.svc/REST/CreateReferral';
const GET_DOCTOR_WORKING_HOURS_TABLE = const GET_DOCTOR_WORKING_HOURS_TABLE =
'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable';
@ -131,6 +136,15 @@ const POST_PHYSICAL_EXAM =
'Services/DoctorApplication.svc/REST/PostPhysicalExam'; 'Services/DoctorApplication.svc/REST/PostPhysicalExam';
const POST_PROGRESS_NOTE = const POST_PROGRESS_NOTE =
'/Services/DoctorApplication.svc/REST/PostProgressNote'; '/Services/DoctorApplication.svc/REST/PostProgressNote';
const PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies';
const PATCH_HISTORY = 'Services/DoctorApplication.svc/REST/PatchHistory';
const PATCH_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/PatchChiefcomplaint';
const POST_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PostAssessment';
const GET_CATEGORISE_PROCEDURE =
'Services/DoctorApplication.svc/REST/GetProcedure';
var selectedPatientType = 1; var selectedPatientType = 1;
@ -152,7 +166,8 @@ var SERVICES_PATIANT2 = [
"List_MyReferredPatient", "List_MyReferredPatient",
"List_MyDischargeReferralPatient", "List_MyDischargeReferralPatient",
"List_MyTomorrowPatient", "List_MyTomorrowPatient",
"List_MyReferralPatient" "List_MyReferralPatient",
"patientArrivalList"
]; ];
var SERVICES_PATIANT_HEADER = [ var SERVICES_PATIANT_HEADER = [
"Search Out-Patient", "Search Out-Patient",
@ -162,7 +177,7 @@ var SERVICES_PATIANT_HEADER = [
"Referral Discharge", "Referral Discharge",
"Tomorrow", "Tomorrow",
"Referral", "Referral",
"Arrived" "Arrival Patient"
]; ];
var SERVICES_PATIANT_HEADER_AR = [ var SERVICES_PATIANT_HEADER_AR = [
"المريض الخارجي", "المريض الخارجي",
@ -172,7 +187,7 @@ var SERVICES_PATIANT_HEADER_AR = [
"المريض المحال المعافى", "المريض المحال المعافى",
"مريض الغد", "مريض الغد",
"المريض المحول مني", "المريض المحول مني",
"وصل المريض" "المريض الواصل"
]; ];
//****************** //******************

@ -360,5 +360,30 @@ const Map<String, Map<String, String>> localizedValues = {
'no-reschedule-leave': { 'no-reschedule-leave': {
'en': 'No Reschedule and leaves', 'en': 'No Reschedule and leaves',
'ar': 'لا إعادة جدولة ويغادر' 'ar': 'لا إعادة جدولة ويغادر'
} },
'weight': {'en': "Weight", 'ar': 'الوزن'},
'kg': {'en': "kg", 'ar': 'كغ'},
'height': {'en': "Height", 'ar': 'الطول'},
'cm': {'en': "cm", 'ar': 'سم'},
'idealBodyWeight': {'en': "Ideal Body Weight", 'ar': 'وزن الجسم المثالي'},
'waistSize': {'en': "Waist Size", 'ar': 'مقاس الخصر'},
'inch': {'en': "Inch", 'ar': 'إنش'},
'headCircum': {'en': "Head Circum", 'ar': 'محيط الرأس'},
'leanBodyWeight': {'en': "Lean Body Weight", 'ar': 'وزن الجسم الهزيل'},
'bodyMassIndex': {'en': "Body Mass Index", 'ar': 'مؤشر كتلة الجسم'},
'method': {'en': "Method", 'ar': 'الطريقة'},
'pulseBeats': {'en': 'Pulse(beats/minute)', 'ar': ' (دقة/دقيقة)النبض'},
'rhythm': {'en': "Rhythm", 'ar': 'الإيقاع'},
'respBeats': {'en': 'RESP (beats/minute)', 'ar': ' (دقة/دقيقة)التنفس'},
'patternOfRespiration': {'en': "Pattern Of Respiration", 'ar': 'نمط التنفس'},
'bloodPressureDiastoleAndSystole': {
'en': 'Blood Pressure (Sys, Dias)',
'ar': 'ضغط الدم (العظمى, الصغرى)'
},
'cuffLocation': {'en': "Cuff Location", 'ar': 'موقع الكف'},
'cuffSize': {'en': "Cuff Size", 'ar': 'حجم الكف'},
'patientPosition': {'en': "Patient Position", 'ar': 'موقع المريض'},
'fio2': {'en': "FIO2(%)", 'ar': 'FIO2(%)'},
'sao2': {'en': "SAO2(%)", 'ar': 'SAO2(%)'},
'painManagement': {'en': "Pain Management", 'ar': 'إدارة الألم'},
}; };

@ -9,7 +9,8 @@ enum MasterKeysService {
AllergySeverity, AllergySeverity,
physiotherapyGoals, physiotherapyGoals,
DiagnosisCondition, DiagnosisCondition,
DiagnosisType DiagnosisType,
ICD10
} }
extension SelectedMasterKeysService on MasterKeysService { extension SelectedMasterKeysService on MasterKeysService {
@ -48,6 +49,9 @@ extension SelectedMasterKeysService on MasterKeysService {
case MasterKeysService.DiagnosisType: case MasterKeysService.DiagnosisType:
return 35; return 35;
break; break;
case MasterKeysService.ICD10:
return 2500;
break;
} }
} }
} }

@ -7,12 +7,11 @@ class PostPrescriptionReqModel {
List<PrescriptionRequestModel> prescriptionRequestModel; List<PrescriptionRequestModel> prescriptionRequestModel;
PostPrescriptionReqModel( PostPrescriptionReqModel(
{this.vidaAuthTokenID = {this.vidaAuthTokenID,
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiYTYxZjAyZjItNzUwZS00MTZkLWEzOTQtZTRjZmViZGVjMDE5IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUzNTIiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODUzMDAyNywiZXhwIjoxNjA5Mzk0MDI3LCJpYXQiOjE2MDg1MzAwMjd9.M1NTREPgz5vQH_GTZ_KGb0xQW5HEDs47AtNR3jbqnms", this.clinicID,
this.clinicID = 1, this.episodeID,
this.episodeID = 200012117, this.appointmentNo,
this.appointmentNo = 2016054573, this.patientMRN,
this.patientMRN = 3120690,
this.prescriptionRequestModel}); this.prescriptionRequestModel});
PostPrescriptionReqModel.fromJson(Map<String, dynamic> json) { PostPrescriptionReqModel.fromJson(Map<String, dynamic> json) {
@ -58,19 +57,20 @@ class PrescriptionRequestModel {
String remarks; String remarks;
String icdcode10Id; String icdcode10Id;
PrescriptionRequestModel( PrescriptionRequestModel({
{this.itemId = 4, this.itemId,
this.doseStartDate = "2020-12-20T13:07:41.769Z", this.doseStartDate,
this.duration = 2, this.duration,
this.dose = 1, this.dose,
this.doseUnitId = 1, this.doseUnitId,
this.route = 1, this.route,
this.frequency = 1, this.frequency,
this.doseTime = 1, this.doseTime,
this.covered = true, this.covered,
this.approvalRequired = true, this.approvalRequired,
this.remarks = "test1", this.remarks,
this.icdcode10Id = "test3"}); this.icdcode10Id,
});
PrescriptionRequestModel.fromJson(Map<String, dynamic> json) { PrescriptionRequestModel.fromJson(Map<String, dynamic> json) {
itemId = json['itemId']; itemId = json['itemId'];

@ -0,0 +1,90 @@
class CategoriseProcedureModel {
List<EntityList> entityList;
int rowcount;
dynamic statusMessage;
CategoriseProcedureModel(
{this.entityList, this.rowcount, this.statusMessage});
CategoriseProcedureModel.fromJson(Map<String, dynamic> json) {
if (json['entityList'] != null) {
entityList = new List<EntityList>();
json['entityList'].forEach((v) {
entityList.add(new EntityList.fromJson(v));
});
}
rowcount = json['rowcount'];
statusMessage = json['statusMessage'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.entityList != null) {
data['entityList'] = this.entityList.map((v) => v.toJson()).toList();
}
data['rowcount'] = this.rowcount;
data['statusMessage'] = this.statusMessage;
return data;
}
}
class EntityList {
bool allowedClinic;
String category;
String categoryID;
String genderValidation;
String group;
String orderedValidation;
dynamic price;
String procedureId;
String procedureName;
String specialPermission;
String subGroup;
String template;
EntityList(
{this.allowedClinic,
this.category,
this.categoryID,
this.genderValidation,
this.group,
this.orderedValidation,
this.price,
this.procedureId,
this.procedureName,
this.specialPermission,
this.subGroup,
this.template});
EntityList.fromJson(Map<String, dynamic> json) {
allowedClinic = json['allowedClinic'];
category = json['category'];
categoryID = json['categoryID'];
genderValidation = json['genderValidation'];
group = json['group'];
orderedValidation = json['orderedValidation'];
price = json['price'];
procedureId = json['procedureId'];
procedureName = json['procedureName'];
specialPermission = json['specialPermission'];
subGroup = json['subGroup'];
template = json['template'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['allowedClinic'] = this.allowedClinic;
data['category'] = this.category;
data['categoryID'] = this.categoryID;
data['genderValidation'] = this.genderValidation;
data['group'] = this.group;
data['orderedValidation'] = this.orderedValidation;
data['price'] = this.price;
data['procedureId'] = this.procedureId;
data['procedureName'] = this.procedureName;
data['specialPermission'] = this.specialPermission;
data['subGroup'] = this.subGroup;
data['template'] = this.template;
return data;
}
}

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.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_allergy_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_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/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';
@ -30,7 +31,7 @@ class SOAPService extends LookupService {
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async { Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(POST_ALLERGY, await baseAppClient.post(PATCH_ALLERGY,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -42,7 +43,7 @@ class SOAPService extends LookupService {
Future postHistories( Future postHistories(
PostHistoriesRequestModel postHistoriesRequestModel) async { PostHistoriesRequestModel postHistoriesRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(POST_HISTORY, await baseAppClient.post(PATCH_HISTORY,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -54,7 +55,7 @@ class SOAPService extends LookupService {
Future postChiefComplaint( Future postChiefComplaint(
PostChiefComplaintRequestModel postChiefComplaintRequestModel) async { PostChiefComplaintRequestModel postChiefComplaintRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post(POST_CHIEF_COMPLAINT, await baseAppClient.post(PATCH_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -86,4 +87,16 @@ class SOAPService extends LookupService {
super.error = error; super.error = error;
}, body: postProgressNoteRequestModel.toJson()); }, body: postProgressNoteRequestModel.toJson());
} }
Future postAssessment(
PostAssessmentRequestModel postAssessmentRequestModel) async {
hasError = false;
await baseAppClient.post(POST_ASSESSMENT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postAssessmentRequestModel.toJson());
}
} }

@ -1,9 +1,9 @@
import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart'; import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
class BaseService { class BaseService {
String error; String error;
@ -30,10 +30,10 @@ class BaseService {
} }
} }
Future getPatientArrivalList(String date) async{ Future getPatientArrivalList(String date,{String fromDate}) async{
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['From'] = date; body['From'] = fromDate == null ? date : fromDate;
body['To'] = date; body['To'] = date;
body['PageIndex'] = 0; body['PageIndex'] = 0;
body['PageSize'] = 0; body['PageSize'] = 0;

@ -33,6 +33,7 @@ class LookupService extends BaseService {
// List<MasterKeyModel> listOfPhysiotherapyGoals = []; // List<MasterKeyModel> listOfPhysiotherapyGoals = [];
List<MasterKeyModel> listOfDiagnosisType = []; List<MasterKeyModel> listOfDiagnosisType = [];
List<MasterKeyModel> listOfDiagnosisCondition = []; List<MasterKeyModel> listOfDiagnosisCondition = [];
List<MasterKeyModel> listOfICD10 = [];
Future getMasterLookup(MasterKeysService masterKeys) async { Future getMasterLookup(MasterKeysService masterKeys) async {
hasError = false; hasError = false;
@ -120,6 +121,13 @@ class LookupService extends BaseService {
.add(MasterKeyModel.fromJson(v)); .add(MasterKeyModel.fromJson(v));
}); });
break; break;
case MasterKeysService.ICD10:
listOfICD10.clear();
entryList.forEach((v) {
listOfICD10
.add(MasterKeyModel.fromJson(v));
});
break;
} }
} }
} }

@ -162,6 +162,31 @@ class PatientReferralService extends LookupService {
); );
} }
Future responseReferral(PendingReferral pendingReferral, bool isAccepted) async {
hasError = false;
DoctorProfileModel doctorProfile = await getDoctorProfile();
Map<String, dynamic> body = Map();
body['IsAccepted'] = isAccepted;
body['AppointmentNo'] = pendingReferral.sourceAppointmentNo;
body['PatientMRN'] = pendingReferral.patientID;
body['PatientName'] = pendingReferral.patientName;
body['ReferralResponse'] = pendingReferral.remarksFromSource;
body['SetupID'] = pendingReferral.sourceSetupID;
body['DoctorName'] = doctorProfile.doctorName;
await baseAppClient.post(
RESPONSE_PENDING_REFERRAL_PATIENT,
onSuccess: (dynamic response, int statusCode) {
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: body,
);
}
Future makeReferral( Future makeReferral(
PatientArrivalEntity patientArrivalEntity, PatientArrivalEntity patientArrivalEntity,
String isoStringDate, String isoStringDate,

@ -0,0 +1,72 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart';
class VitalSignsService extends BaseService{
List<VitalSignResModel> patientVitalSignList = [];
List<VitalSignResModel> patientVitalSignOrderdSubList = [];
VitalSignData patientVitalSigns;
/*Future getPatientVitalSign(patient) async {
hasError = false;
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) {
patientVitalSignList = [];
response['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignList.add(new VitalSignResModel.fromJson(v));
});
if (patientVitalSignList.length > 0) {
List<VitalSignResModel> patientVitalSignOrderdSubListTemp = [];
patientVitalSignOrderdSubListTemp = patientVitalSignList;
patientVitalSignOrderdSubListTemp
.sort((VitalSignResModel a, VitalSignResModel b) {
return b.vitalSignDate.microsecondsSinceEpoch -
a.vitalSignDate.microsecondsSinceEpoch;
});
patientVitalSignOrderdSubList.clear();
int length = patientVitalSignOrderdSubListTemp.length >= 20
? 20
: patientVitalSignOrderdSubListTemp.length;
for (int x = 0; x < length; x++) {
patientVitalSignOrderdSubList
.add(patientVitalSignOrderdSubListTemp[x]);
}
}
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: patient,
);
} // Vit*/
Future getPatientVitalSign(PatientArrivalEntity patientArrivalEntity) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patientArrivalEntity.patientMRN;
body['AppointmentNo'] = patientArrivalEntity.appointmentNo;
body['EpisodeID'] = patientArrivalEntity.episodeNo;
await baseAppClient.post(
GET_PATIENT_VITAL_SIGN_DATA,
onSuccess: (dynamic response, int statusCode) {
if(response['VitalSignsList'] != null){
if(response['VitalSignsList']['entityList'] = null && (response['VitalSignsList']['entityList'] as List).length > 0){
patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList']['0']);
}
}
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error.toString();
},
body: body,
);
}
}

@ -87,7 +87,7 @@ class PatientService extends BaseService {
ClinicByProjectIdRequest(); ClinicByProjectIdRequest();
ReferToDoctorRequest _referToDoctorRequest; ReferToDoctorRequest _referToDoctorRequest;
Future<dynamic> getPatientList(PatientModel patient, patientType) async { Future<dynamic> getPatientList( patient, patientType) async {
hasError = false; hasError = false;
int val = int.parse(patientType); int val = int.parse(patientType);
@ -101,7 +101,7 @@ class PatientService extends BaseService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, },
body: { body:val ==7?patient: {
"ProjectID": patient.ProjectID, "ProjectID": patient.ProjectID,
"ClinicID": patient.ClinicID, "ClinicID": patient.ClinicID,
"DoctorID": patient.DoctorID, "DoctorID": patient.DoctorID,

@ -30,16 +30,20 @@ class PrescriptionService extends BaseService {
}, body: _prescriptionReqModel.toJson()); }, body: _prescriptionReqModel.toJson());
} }
Future postPrescription() async { Future postPrescription(
PostPrescriptionReqModel postProcedureReqModel) async {
hasError = false; hasError = false;
//_prescriptionList.clear(); //_prescriptionList.clear();
await baseAppClient.post(POST_PRESCRIPTION_LIST, await baseAppClient.post(
POST_PRESCRIPTION_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_prescriptionList print("Success");
.add(PrescriptionModel.fromJson(response['PrescriptionList'])); },
}, onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _postPrescriptionReqModel.toJson()); },
body: postProcedureReqModel.toJson(),
);
} }
} }

@ -1,12 +1,17 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_req_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:flutter/foundation.dart';
class ProcedureService extends BaseService { class ProcedureService extends BaseService {
List<GetProcedureModel> _procedureList = List(); List<GetProcedureModel> _procedureList = List();
List<GetProcedureModel> get procedureList => _procedureList; List<GetProcedureModel> get procedureList => _procedureList;
List<CategoriseProcedureModel> _categoriesList = List();
List<CategoriseProcedureModel> get categoriesList => _categoriesList;
List<Procedures> procedureslist = List();
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel( GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
clinicId: 0, clinicId: 0,
@ -19,8 +24,17 @@ class ProcedureService extends BaseService {
search: ["lab"], search: ["lab"],
); );
GetProcedureReqModel _getProcedureCategoriseReqModel = GetProcedureReqModel(
clinicId: 0,
pageSize: 100,
pageIndex: 1,
patientMRN: 0,
//categoryId: null,
vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI",
PostProcedureReqModel _postProcedureReqModel = PostProcedureReqModel(); search: ["lab"],
);
Future getProcedure() async { Future getProcedure() async {
hasError = false; hasError = false;
@ -34,15 +48,28 @@ class ProcedureService extends BaseService {
}, body: _getProcedureReqModel.toJson()); }, body: _getProcedureReqModel.toJson());
} }
Future postProcedure() async { Future getCategories() async {
hasError = false;
_categoriesList.clear();
await baseAppClient.post(GET_CATEGORISE_PROCEDURE,
onSuccess: (dynamic response, int statusCode) {
_categoriesList
.add(CategoriseProcedureModel.fromJson(response['ProcedureList']));
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _getProcedureCategoriseReqModel.toJson());
}
Future postProcedure(PostProcedureReqModel postProcedureReqModel) async {
hasError = false; hasError = false;
_procedureList.clear(); _procedureList.clear();
await baseAppClient.post(POST_PROCEDURE_LIST, await baseAppClient.post(POST_PROCEDURE_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_procedureList.add(GetProcedureModel.fromJson(response['ProcedureList'])); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _postProcedureReqModel.toJson()); }, body: postProcedureReqModel.toJson());
} }
} }

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/SOAP/Allergy_model.dart';
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.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_allergy_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_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/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';
@ -34,6 +35,7 @@ class SOAPViewModel extends BaseViewModel {
List<MasterKeyModel> get physicalExaminationList => _SOAPService.physicalExaminationList; List<MasterKeyModel> get physicalExaminationList => _SOAPService.physicalExaminationList;
List<MasterKeyModel> get listOfDiagnosisType => _SOAPService.listOfDiagnosisType; List<MasterKeyModel> get listOfDiagnosisType => _SOAPService.listOfDiagnosisType;
List<MasterKeyModel> get listOfDiagnosisCondition => _SOAPService.listOfDiagnosisCondition; List<MasterKeyModel> get listOfDiagnosisCondition => _SOAPService.listOfDiagnosisCondition;
List<MasterKeyModel> get listOfICD10 => _SOAPService.listOfICD10;
@ -107,5 +109,15 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future postAssessment(PostAssessmentRequestModel postAssessmentRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postAssessment(postAssessmentRequestModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
} }

@ -107,12 +107,22 @@ class PatientReferralViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future responseReferral(PendingReferral pendingReferral, bool isAccepted) async {
setState(ViewState.Busy);
await _referralPatientService.responseReferral(pendingReferral, isAccepted);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getPatientArrivalList(String date) async { Future getPatientArrivalList(String date) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _referralPatientService.getPatientArrivalList(date); await _referralPatientService.getPatientArrivalList(date);
if (_referralPatientService.hasError) { if (_referralPatientService.hasError) {
error = _referralPatientService.error; error = _referralPatientService.error;
setState(ViewState.Error); setState(ViewState.ErrorLocal);
} else { } else {
setState(ViewState.Idle); setState(ViewState.Idle);
} }

@ -0,0 +1,100 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/patient-vital-signs-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart';
import '../../locator.dart';
class VitalSignsViewModel extends BaseViewModel {
VitalSignsService _vitalSignService = locator<VitalSignsService>();
List<PatientArrivalEntity> get patientArrivalList =>
_vitalSignService.patientArrivalList;
VitalSignData get patientVitalSigns => _vitalSignService.patientVitalSigns;
Future getPatientArrivalList(String date, PatiantInformtion patient,
{String fromDate}) async {
setState(ViewState.Busy);
await _vitalSignService.getPatientArrivalList(date, fromDate: fromDate);
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
} else {
await getPatientVitalSign(patient);
}
}
PatientArrivalEntity getPatientAppointmentEntity(PatiantInformtion patient) {
String ffName = "${patient.firstName} ${patient.lastName}";
String fmfName =
"${patient.firstName} ${patient.middleName} ${patient.lastName}";
for (var element in patientArrivalList) {
int index = patientArrivalList.indexOf(element);
if (element.patientName == ffName || element.patientName == fmfName) {
return element;
}
// print("patient index: $index");
}
return null;
}
Future getPatientVitalSign(PatiantInformtion patient) async {
setState(ViewState.Busy);
PatientArrivalEntity patientArrivalEntity =
getPatientAppointmentEntity(patient);
if (patientArrivalEntity == null) {
_vitalSignService.hasError = true;
error = "There is no appointments for this patient";
setState(ViewState.Error);
return;
}
await _vitalSignService.getPatientVitalSign(patientArrivalEntity);
// TODO remove (not) from below condition
if (!_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
} else {
if (patientVitalSigns == null) {
_vitalSignService.patientVitalSigns = VitalSignData(
appointmentNo: 2016053265,
bloodPressureCuffLocation: 0,
bloodPressureCuffSize: 0,
bloodPressureHigher: 38,
bloodPressureLower: 32,
bloodPressurePatientPosition: 1,
bodyMassIndex: 31.11,
fio2: 0,
headCircumCm: 0,
heightCm: 150,
idealBodyWeightLbs: -2,
isPainManagementDone: false,
isVitalsRequired: true,
leanBodyWeightLbs: 0,
painCharacter: null,
painDuration: null,
painFrequency: null,
painLocation: null,
painScore: 0,
patientMRN: 3333274,
patientType: 1,
pulseBeatPerMinute: 0,
pulseRhythm: 0,
respirationBeatPerMinute: 0,
respirationPattern: 0,
sao2: 0,
status: 47,
temperatureCelcius: 40,
temperatureCelciusMethod: 1,
waistSizeInch: 39,
weightKg: 70,
);
}
setState(ViewState.Idle);
}
}
}

@ -49,7 +49,7 @@ class PatientViewModel extends BaseViewModel {
List<dynamic> get referralFrequencyList => List<dynamic> get referralFrequencyList =>
_patientService.referalFrequancyList; _patientService.referalFrequancyList;
Future getPatientList(PatientModel patient, patientType, Future getPatientList( patient, patientType,
{bool isBusyLocal = false}) async { {bool isBusyLocal = false}) async {
if (isBusyLocal) { if (isBusyLocal) {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);

@ -24,11 +24,12 @@ class PrescriptionViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future postPrescription() async { Future postPrescription(
PostPrescriptionReqModel postProcedureReqModel) async {
hasError = false; hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionService.postPrescription(); await _prescriptionService.postPrescription(postProcedureReqModel);
if (_prescriptionService.hasError) { if (_prescriptionService.hasError) {
error = _prescriptionService.error; error = _prescriptionService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -1,5 +1,7 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/service/procedure_service.dart'; import 'package:doctor_app_flutter/core/service/procedure_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/locator.dart';
@ -8,6 +10,8 @@ class ProcedureViewModel extends BaseViewModel {
bool hasError = false; bool hasError = false;
ProcedureService _procedureService = locator<ProcedureService>(); ProcedureService _procedureService = locator<ProcedureService>();
List<GetProcedureModel> get procedureList => _procedureService.procedureList; List<GetProcedureModel> get procedureList => _procedureService.procedureList;
List<CategoriseProcedureModel> get categoriesList =>
_procedureService.categoriesList;
Future getProcedure() async { Future getProcedure() async {
hasError = false; hasError = false;
@ -20,4 +24,28 @@ class ProcedureViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getCategories() async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _procedureService.getCategories();
if (_procedureService.hasError) {
error = _procedureService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future postProcedure(PostProcedureReqModel postProcedureReqModel) async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _procedureService.postProcedure(postProcedureReqModel);
if (_procedureService.hasError) {
error = _procedureService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
} }

@ -101,7 +101,7 @@ class ProjectViewModel with ChangeNotifier {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: {}); }, body: Map());
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
@ -111,18 +111,18 @@ class ProjectViewModel with ChangeNotifier {
} }
void getProfile() async { void getProfile() async {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); // Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); // DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile);
ProfileReqModel docInfo = new ProfileReqModel( // ProfileReqModel docInfo = new ProfileReqModel(
doctorID: doctorProfile.doctorID, // doctorID: doctorProfile.doctorID,
clinicID: doctorProfile.clinicID, // clinicID: doctorProfile.clinicID,
license: true, // license: true,
projectID: doctorProfile.projectID, // projectID: doctorProfile.projectID,
tokenID: '', // tokenID: '',
languageID: 2); // languageID: 2);
Provider.of<AuthViewModel>(AppGlobal.CONTEX, listen: false) Provider.of<AuthViewModel>(AppGlobal.CONTEX, listen: false)
.getDocProfiles(docInfo.toJson()) .getDocProfiles(ProfileReqModel().toJson())
.then((res) async { .then((res) async {
sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]);
}).catchError((err) { }).catchError((err) {

@ -13,6 +13,7 @@ import 'package:get_it/get_it.dart';
import 'core/service/SOAP_service.dart'; import 'core/service/SOAP_service.dart';
import 'core/service/doctor_reply_service.dart'; import 'core/service/doctor_reply_service.dart';
import 'core/service/medicine_service.dart'; import 'core/service/medicine_service.dart';
import 'core/service/patient-vital-signs-service.dart';
import 'core/service/patient-doctor-referral-service.dart'; import 'core/service/patient-doctor-referral-service.dart';
import 'core/service/referral_patient_service.dart'; import 'core/service/referral_patient_service.dart';
import 'core/service/referred_patient_service.dart'; import 'core/service/referred_patient_service.dart';
@ -20,7 +21,8 @@ import 'core/service/schedule_service.dart';
import 'core/viewModel/SOAP_view_model.dart'; import 'core/viewModel/SOAP_view_model.dart';
import 'core/viewModel/doctor_replay_view_model.dart'; import 'core/viewModel/doctor_replay_view_model.dart';
import 'core/viewModel/medicine_view_model.dart'; import 'core/viewModel/medicine_view_model.dart';
import 'core/viewModel/patient-doctor-referral-viewModel.dart'; import 'core/viewModel/patient-vital-sign-viewmodel.dart';
import 'core/viewModel/patient-referral-viewmodel.dart';
import 'core/viewModel/referral_view_model.dart'; import 'core/viewModel/referral_view_model.dart';
import 'core/viewModel/referred_view_model.dart'; import 'core/viewModel/referred_view_model.dart';
import 'core/viewModel/schedule_view_model.dart'; import 'core/viewModel/schedule_view_model.dart';
@ -42,6 +44,7 @@ void setupLocator() {
locator.registerLazySingleton(() => PatientReferralService()); locator.registerLazySingleton(() => PatientReferralService());
locator.registerLazySingleton(() => PrescriptionService()); locator.registerLazySingleton(() => PrescriptionService());
locator.registerLazySingleton(() => ProcedureService()); locator.registerLazySingleton(() => ProcedureService());
locator.registerLazySingleton(() => VitalSignsService());
/// View Model /// View Model
locator.registerFactory(() => DoctorReplayViewModel()); locator.registerFactory(() => DoctorReplayViewModel());
@ -56,4 +59,5 @@ void setupLocator() {
locator.registerFactory(() => PatientReferralViewModel()); locator.registerFactory(() => PatientReferralViewModel());
locator.registerFactory(() => PrescriptionViewModel()); locator.registerFactory(() => PrescriptionViewModel());
locator.registerFactory(() => ProcedureViewModel()); locator.registerFactory(() => ProcedureViewModel());
locator.registerFactory(() => VitalSignsViewModel());
} }

@ -10,7 +10,7 @@ const PATIENT_TYPE = const [
}, },
{"text": "Tomorrow Patient", "text_ar": "مريض الغد", "val": "5"}, {"text": "Tomorrow Patient", "text_ar": "مريض الغد", "val": "5"},
{"text": "Referral", "text_ar": "المريض المحول مني", "val": "6"}, {"text": "Referral", "text_ar": "المريض المحول مني", "val": "6"},
{"text": "Arrived", "text_ar": "وصل", "val": "7"}, {"text": "Arrival", "text_ar": "المريض الواصل", "val": "7"},
]; ];
const LOCATIONS = const [ const LOCATIONS = const [

@ -1,18 +1,18 @@
class MasterKeyModel { class MasterKeyModel {
String alias; String alias;
String aliasN; String aliasN;
int code; dynamic code;
Null description; dynamic description;
Null detail1; dynamic detail1;
Null detail2; dynamic detail2;
Null detail3; dynamic detail3;
Null detail4; dynamic detail4;
Null detail5; dynamic detail5;
int groupID; int groupID;
int id; int id;
String nameAr; String nameAr;
String nameEn; String nameEn;
Null remarks; dynamic remarks;
int typeId; int typeId;
String valueList; String valueList;

@ -0,0 +1,69 @@
class PostAssessmentRequestModel {
int patientMRN;
int appointmentNo;
int episodeId;
List<IcdCodeDetails> icdCodeDetails;
PostAssessmentRequestModel(
{this.patientMRN,
this.appointmentNo,
this.episodeId,
this.icdCodeDetails});
PostAssessmentRequestModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo'];
episodeId = json['EpisodeId'];
if (json['icdCodeDetails'] != null) {
icdCodeDetails = new List<IcdCodeDetails>();
json['icdCodeDetails'].forEach((v) {
icdCodeDetails.add(new IcdCodeDetails.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeId'] = this.episodeId;
if (this.icdCodeDetails != null) {
data['icdCodeDetails'] =
this.icdCodeDetails.map((v) => v.toJson()).toList();
}
return data;
}
}
class IcdCodeDetails {
String icdcode10Id;
int conditionId;
int diagnosisTypeId;
bool complexDiagnosis;
String remarks;
IcdCodeDetails(
{this.icdcode10Id,
this.conditionId,
this.diagnosisTypeId,
this.complexDiagnosis,
this.remarks});
IcdCodeDetails.fromJson(Map<String, dynamic> json) {
icdcode10Id = json['icdcode10Id'];
conditionId = json['conditionId'];
diagnosisTypeId = json['diagnosisTypeId'];
complexDiagnosis = json['complexDiagnosis'];
remarks = json['remarks'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['icdcode10Id'] = this.icdcode10Id;
data['conditionId'] = this.conditionId;
data['diagnosisTypeId'] = this.diagnosisTypeId;
data['complexDiagnosis'] = this.complexDiagnosis;
data['remarks'] = this.remarks;
return data;
}
}

@ -1,9 +1,29 @@
// TODO : it have to be changed.
class PatiantInformtion { class PatiantInformtion {
final List<PatiantInformtion> list; final List<PatiantInformtion> list;
int genderInt;
String age;
String appointmentDate;
int appointmentNo;
String appointmentType;
String arrivedOn;
int clinicGroupId;
String companyName;
Null dischargeStatus;
Null doctorDetails;
int doctorId;
String endTime;
int episodeNo;
int fallRiskScore;
bool isSigned;
int medicationOrders;
String mobileNumber;
String nationality;
int projectId; int projectId;
int clinicId; int clinicId;
int doctorId;
int patientId; int patientId;
String doctorName; String doctorName;
String doctorNameN; String doctorNameN;
@ -16,10 +36,10 @@ class PatiantInformtion {
int gender; int gender;
String dateofBirth; String dateofBirth;
String nationalityId; String nationalityId;
String mobileNumber;
String emailAddress; String emailAddress;
String patientIdentificationNo; String patientIdentificationNo;
int patientType; int patientType;
int patientMRN;
String admissionNo; String admissionNo;
String admissionDate; String admissionDate;
String roomId; String roomId;
@ -30,10 +50,8 @@ class PatiantInformtion {
String clinicDescriptionN; String clinicDescriptionN;
String nationalityName; String nationalityName;
String nationalityNameN; String nationalityNameN;
String age;
String genderDescription; String genderDescription;
String nursingStationName; String nursingStationName;
String appointmentDate;
String startTime; String startTime;
PatiantInformtion({ PatiantInformtion({
@ -72,44 +90,72 @@ class PatiantInformtion {
this.nursingStationName, this.nursingStationName,
this.appointmentDate, this.appointmentDate,
this.startTime, this.startTime,
this.appointmentNo,
this.appointmentType,
this.arrivedOn,
this.clinicGroupId,
this.companyName,
this.dischargeStatus,
this.doctorDetails,
this.endTime,
this.episodeNo,
this.fallRiskScore,
this.genderInt,
this.isSigned,
this.medicationOrders,
this.nationality,this.patientMRN
}); });
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion( factory PatiantInformtion.fromJson(Map<String, dynamic> json) =>
projectId: json["ProjectID"], PatiantInformtion(
clinicId: json["ClinicID"], projectId: json["ProjectID"] ?? json["projectID"],
doctorId: json["DoctorID"], clinicId: json["ClinicID"]?? json["clinicID"],
patientId: json["PatientID"], doctorId: json["DoctorID"]?? json["doctorID"],
doctorName: json["DoctorName"], patientId: json["PatientID"]?? json["patientID"],
doctorNameN: json["DoctorNameN"], doctorName: json["DoctorName"]?? json["doctorName"],
firstName: json["FirstName"], doctorNameN: json["DoctorNameN"]?? json["doctorNameN"],
middleName: json["MiddleName"], firstName: json["FirstName"]?? json["firstName"],
lastName: json["LastName"], middleName: json["MiddleName"]?? json["middleName"],
firstNameN: json["FirstNameN"], lastName: json["LastName"]?? json["lastName"],
middleNameN: json["MiddleNameN"], firstNameN: json["FirstNameN"]?? json["firstNameN"],
lastNameN: json["LastNameN"], middleNameN: json["MiddleNameN"]?? json["middleNameN"],
gender: json["Gender"], lastNameN: json["LastNameN"]?? json["lastNameN"],
dateofBirth: json["DateofBirth"], gender: json["Gender"]?? json["gender"],
nationalityId: json["NationalityID"], dateofBirth: json["DateofBirth"]?? json["dob"],
mobileNumber: json["MobileNumber"], nationalityId: json["NationalityID"]?? json["nationalityID"],
emailAddress: json["EmailAddress"], mobileNumber: json["MobileNumber"]?? json["mobileNumber"],
patientIdentificationNo: json["PatientIdentificationNo"], emailAddress: json["EmailAddress"]?? json["emailAddress"],
patientType: json["PatientType"], patientIdentificationNo: json["PatientIdentificationNo"]?? json["patientIdentificationNo"],
admissionNo: json["AdmissionNo"], patientType: json["PatientType"]?? json["patientType"],
admissionDate: json["AdmissionDate"], admissionNo: json["AdmissionNo"]?? json["admissionNo"],
roomId: json["RoomID"], admissionDate: json["AdmissionDate"]?? json["admissionDate"],
bedId: json["BedID"], roomId: json["RoomID"]?? json["roomID"],
nursingStationId: json["NursingStationID"], bedId: json["BedID"]?? json["bedID"],
description: json["Description"], nursingStationId: json["NursingStationID"]?? json["nursingStationID"],
clinicDescription: json["ClinicDescription"], description: json["Description"]?? json["description"],
clinicDescriptionN: json["ClinicDescriptionN"], clinicDescription: json["ClinicDescription"]?? json["clinicDescription"],
nationalityName: json["NationalityName"], clinicDescriptionN: json["ClinicDescriptionN"]?? json["clinicDescriptionN"],
nationalityNameN: json["NationalityNameN"], nationalityName: json["NationalityName"]?? json["nationalityName"],
age: json["Age"], nationalityNameN: json["NationalityNameN"]?? json["nationalityNameN"],
age: json["Age"]?? json["age"],
genderDescription: json["GenderDescription"], genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"], nursingStationName: json["NursingStationName"],
appointmentDate: json["AppointmentDate"]?? '', appointmentDate: json["AppointmentDate"]?? '',
startTime: json["StartTime"], startTime: json["StartTime"],
appointmentNo :json['appointmentNo'],
appointmentType :json['appointmentType'],
arrivedOn :json['arrivedOn'],
clinicGroupId :json['clinicGroupId'],
companyName :json['companyName'],
dischargeStatus :json['dischargeStatus'],
doctorDetails :json['doctorDetails'],
endTime :json['endTime'],
episodeNo :json['episodeNo'],
fallRiskScore :json['fallRiskScore'],
isSigned :json['isSigned'],
medicationOrders :json['medicationOrders'],
nationality :json['nationality'],
patientMRN :json['patientMRN'],
); );

@ -0,0 +1,40 @@
class GetPatientArrivalListRequestModel {
String vidaAuthTokenID;
String from;
String to;
String doctorID;
int pageIndex;
int pageSize;
int clinicID;
GetPatientArrivalListRequestModel(
{this.vidaAuthTokenID,
this.from,
this.to,
this.doctorID,
this.pageIndex,
this.pageSize,
this.clinicID});
GetPatientArrivalListRequestModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID'];
from = json['From'];
to = json['To'];
doctorID = json['DoctorID'];
pageIndex = json['PageIndex'];
pageSize = json['PageSize'];
clinicID = json['ClinicID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['From'] = this.from;
data['To'] = this.to;
data['DoctorID'] = this.doctorID;
data['PageIndex'] = this.pageIndex;
data['PageSize'] = this.pageSize;
data['ClinicID'] = this.clinicID;
return data;
}
}

@ -0,0 +1,136 @@
class VitalSignData {
int appointmentNo;
int bloodPressureCuffLocation;
int bloodPressureCuffSize;
int bloodPressureHigher;
int bloodPressureLower;
int bloodPressurePatientPosition;
double bodyMassIndex;
int fio2;
int headCircumCm;
int heightCm;
int idealBodyWeightLbs;
bool isPainManagementDone;
bool isVitalsRequired;
int leanBodyWeightLbs;
String painCharacter;
String painDuration;
String painFrequency;
String painLocation;
int painScore;
int patientMRN;
int patientType;
int pulseBeatPerMinute;
int pulseRhythm;
int respirationBeatPerMinute;
int respirationPattern;
int sao2;
int status;
int temperatureCelcius;
int temperatureCelciusMethod;
int waistSizeInch;
int weightKg;
VitalSignData(
{this.appointmentNo,
this.bloodPressureCuffLocation,
this.bloodPressureCuffSize,
this.bloodPressureHigher,
this.bloodPressureLower,
this.bloodPressurePatientPosition,
this.bodyMassIndex,
this.fio2,
this.headCircumCm,
this.heightCm,
this.idealBodyWeightLbs,
this.isPainManagementDone,
this.isVitalsRequired,
this.leanBodyWeightLbs,
this.painCharacter,
this.painDuration,
this.painFrequency,
this.painLocation,
this.painScore,
this.patientMRN,
this.patientType,
this.pulseBeatPerMinute,
this.pulseRhythm,
this.respirationBeatPerMinute,
this.respirationPattern,
this.sao2,
this.status,
this.temperatureCelcius,
this.temperatureCelciusMethod,
this.waistSizeInch,
this.weightKg});
VitalSignData.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo'];
bloodPressureCuffLocation = json['bloodPressureCuffLocation'];
bloodPressureCuffSize = json['bloodPressureCuffSize'];
bloodPressureHigher = json['bloodPressureHigher'];
bloodPressureLower = json['bloodPressureLower'];
bloodPressurePatientPosition = json['bloodPressurePatientPosition'];
bodyMassIndex = json['bodyMassIndex'];
fio2 = json['fio2'];
headCircumCm = json['headCircumCm'];
heightCm = json['heightCm'];
idealBodyWeightLbs = json['idealBodyWeightLbs'];
isPainManagementDone = json['isPainManagementDone'];
isVitalsRequired = json['isVitalsRequired'];
leanBodyWeightLbs = json['leanBodyWeightLbs'];
painCharacter = json['painCharacter'];
painDuration = json['painDuration'];
painFrequency = json['painFrequency'];
painLocation = json['painLocation'];
painScore = json['painScore'];
patientMRN = json['patientMRN'];
patientType = json['patientType'];
pulseBeatPerMinute = json['pulseBeatPerMinute'];
pulseRhythm = json['pulseRhythm'];
respirationBeatPerMinute = json['respirationBeatPerMinute'];
respirationPattern = json['respirationPattern'];
sao2 = json['sao2'];
status = json['status'];
temperatureCelcius = json['temperatureCelcius'];
temperatureCelciusMethod = json['temperatureCelciusMethod'];
waistSizeInch = json['waistSizeInch'];
weightKg = json['weightKg'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['appointmentNo'] = this.appointmentNo;
data['bloodPressureCuffLocation'] = this.bloodPressureCuffLocation;
data['bloodPressureCuffSize'] = this.bloodPressureCuffSize;
data['bloodPressureHigher'] = this.bloodPressureHigher;
data['bloodPressureLower'] = this.bloodPressureLower;
data['bloodPressurePatientPosition'] = this.bloodPressurePatientPosition;
data['bodyMassIndex'] = this.bodyMassIndex;
data['fio2'] = this.fio2;
data['headCircumCm'] = this.headCircumCm;
data['heightCm'] = this.heightCm;
data['idealBodyWeightLbs'] = this.idealBodyWeightLbs;
data['isPainManagementDone'] = this.isPainManagementDone;
data['isVitalsRequired'] = this.isVitalsRequired;
data['leanBodyWeightLbs'] = this.leanBodyWeightLbs;
data['painCharacter'] = this.painCharacter;
data['painDuration'] = this.painDuration;
data['painFrequency'] = this.painFrequency;
data['painLocation'] = this.painLocation;
data['painScore'] = this.painScore;
data['patientMRN'] = this.patientMRN;
data['patientType'] = this.patientType;
data['pulseBeatPerMinute'] = this.pulseBeatPerMinute;
data['pulseRhythm'] = this.pulseRhythm;
data['respirationBeatPerMinute'] = this.respirationBeatPerMinute;
data['respirationPattern'] = this.respirationPattern;
data['sao2'] = this.sao2;
data['status'] = this.status;
data['temperatureCelcius'] = this.temperatureCelcius;
data['temperatureCelciusMethod'] = this.temperatureCelciusMethod;
data['waistSizeInch'] = this.waistSizeInch;
data['weightKg'] = this.weightKg;
return data;
}
}

@ -22,7 +22,7 @@ class RootPage extends StatelessWidget {
); );
break; break;
case APP_STATUS.UNAUTHENTICATED: case APP_STATUS.UNAUTHENTICATED:
return Loginsreen(); return LandingPage();
break; break;
case APP_STATUS.AUTHENTICATED: case APP_STATUS.AUTHENTICATED:
return LandingPage(); return LandingPage();

@ -44,6 +44,7 @@ import 'screens/live_care/panding_list.dart';
import 'screens/patients/profile/referral/my-referral-detail-screen.dart'; import 'screens/patients/profile/referral/my-referral-detail-screen.dart';
import 'screens/patients/profile/referral/refer-patient-screen.dart'; import 'screens/patients/profile/referral/refer-patient-screen.dart';
import 'screens/prescription/prescription_screen.dart'; import 'screens/prescription/prescription_screen.dart';
import 'screens/patients/profile/vital_sign/vital-signs-screen.dart';
const String INIT_ROUTE = ROOT; const String INIT_ROUTE = ROOT;
const String ROOT = 'root'; const String ROOT = 'root';
@ -79,6 +80,8 @@ const String PATIENT_INSURANCE_APPROVALS =
'patients/patient_insurance_approvals'; 'patients/patient_insurance_approvals';
const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details'; const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details';
const String CREATE_EPISODE = 'patients/create-episode'; const String CREATE_EPISODE = 'patients/create-episode';
const String PATIENT_VITAL_SIGN = 'patients/vital-sign-data';
const String UPDATE_EPISODE = 'patients/create-episode';
const String BODY_MEASUREMENTS = 'patients/body-measurements'; const String BODY_MEASUREMENTS = 'patients/body-measurements';
const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details'; const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details';
@ -89,6 +92,7 @@ const String ORDER_PROCEDURE = 'procedure/procedure';
// const String LIVECARE_END_DIALOG = 'video-call/EndCallDialogBox'; // const String LIVECARE_END_DIALOG = 'video-call/EndCallDialogBox';
const String PATIENT_SICKLEAVE = 'patients/patient_sickleave'; const String PATIENT_SICKLEAVE = 'patients/patient_sickleave';
const String ADD_SICKLEAVE = 'add-sickleave'; const String ADD_SICKLEAVE = 'add-sickleave';
//todo: change the routing way.
var routes = { var routes = {
ROOT: (_) => RootPage(), ROOT: (_) => RootPage(),
HOME: (_) => LandingPage(), HOME: (_) => LandingPage(),
@ -121,7 +125,9 @@ var routes = {
PATIENT_ORDERS: (_) => PatientsOrdersScreen(), PATIENT_ORDERS: (_) => PatientsOrdersScreen(),
PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(), PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(), VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
PATIENT_VITAL_SIGN: (_) => PatientVitalSignScreen(),
CREATE_EPISODE: (_) => AddSOAPIndex(), CREATE_EPISODE: (_) => AddSOAPIndex(),
UPDATE_EPISODE: (_) => AddSOAPIndex(isUpdate: true,),
BODY_MEASUREMENTS: (_) => VitalSignItemDetailsScreen(), BODY_MEASUREMENTS: (_) => VitalSignItemDetailsScreen(),
IN_PATIENT_PRESCRIPTIONS_DETAILS: (_) => InpatientPrescriptionDetailsScreen(), IN_PATIENT_PRESCRIPTIONS_DETAILS: (_) => InpatientPrescriptionDetailsScreen(),
// VIDEO_CALL: (_) => VideoCallPage(patientData: null), // VIDEO_CALL: (_) => VideoCallPage(patientData: null),

@ -116,68 +116,69 @@ class _DashboardScreenState extends State<DashboardScreen> {
SizedBox( SizedBox(
height: 4, height: 4,
), ),
InkWell( //TODO change it edit By Jammal
onTap: () async { // InkWell(
showCupertinoPicker( // onTap: () async {
decKey: '', // showCupertinoPicker(
context: context, // decKey: '',
actionList: projectsProvider // context: context,
.doctorClinicsList); // actionList: projectsProvider
}, // .doctorClinicsList);
child: Row( // },
mainAxisAlignment: // child: Row(
MainAxisAlignment.spaceBetween, // mainAxisAlignment:
children: <Widget>[ // MainAxisAlignment.spaceBetween,
Container( // children: <Widget>[
child: AppText( // Container(
authProvider.selectedClinicName != // child: AppText(
null // authProvider.selectedClinicName !=
? authProvider // null
.selectedClinicName // ? authProvider
: authProvider.doctorProfile // .selectedClinicName
.clinicDescription, // : authProvider.doctorProfile
fontSize: // .clinicDescription,
SizeConfig.textMultiplier * // fontSize:
1.7, // SizeConfig.textMultiplier *
color: Colors.white, // 1.7,
textAlign: TextAlign.center, // color: Colors.white,
), // textAlign: TextAlign.center,
alignment: projectsProvider.isArabic // ),
? Alignment.topRight // alignment: projectsProvider.isArabic
: Alignment.topLeft, // ? Alignment.topRight
), // : Alignment.topLeft,
Row( // ),
mainAxisAlignment: // Row(
MainAxisAlignment.start, // mainAxisAlignment:
mainAxisSize: MainAxisSize.max, // MainAxisAlignment.start,
crossAxisAlignment: // mainAxisSize: MainAxisSize.max,
CrossAxisAlignment.start, // crossAxisAlignment:
children: <Widget>[ // CrossAxisAlignment.start,
InkWell( // children: <Widget>[
child: Container( // InkWell(
margin: EdgeInsets.only( // child: Container(
left: 5, // margin: EdgeInsets.only(
top: projectsProvider // left: 5,
.isArabic // top: projectsProvider
? 0 // .isArabic
: 5, // ? 0
right: 10, // : 5,
bottom: projectsProvider // right: 10,
.isArabic // bottom: projectsProvider
? 15 // .isArabic
: 7), // ? 15
child: Icon( // : 7),
DoctorApp.sync_icon, // child: Icon(
color: Colors.white, // DoctorApp.sync_icon,
size: SizeConfig // color: Colors.white,
.textMultiplier * // size: SizeConfig
1.8, // .textMultiplier *
)), // 1.8,
), // )),
], // ),
), // ],
]), // ),
), // ]),
// ),
], ],
), ),
]), ]),

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
@ -65,12 +65,9 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
PatientOutSA: false); PatientOutSA: false);
void _validateInputs() async { void _validateInputs() async {
//print("============== _selectedType============"+ _selectedType);
try { try {
//====================
//_selectedType=='3'?
//=====================
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel doctorProfile =
@ -79,25 +76,23 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
_formKey.currentState.save(); _formKey.currentState.save();
sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType); sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType);
print('************_selectedType*************');
print('_selectedType${_selectedType}');
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
_patientSearchFormValues.TokenID = token; _patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID = doctorProfile.projectID; //15 _patientSearchFormValues.ProjectID = doctorProfile.projectID; //15
_patientSearchFormValues.DoctorID = doctorProfile.doctorID; _patientSearchFormValues.DoctorID = doctorProfile.doctorID;
_patientSearchFormValues.ClinicID = doctorProfile.clinicID; _patientSearchFormValues.ClinicID = doctorProfile.clinicID;
//=====================
// _patientSearchFormValues.
//=====================
print("=============doctorProfile.clinicID=" +
doctorProfile.clinicID.toString());
if ((_patientSearchFormValues.From == "0" ||
_patientSearchFormValues.To == "0") &&
_selectedType == "7") {
helpers.showErrorToast("Please Choose The Dates");
} else {
Navigator.of(context).pushNamed(PATIENTS, arguments: { Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues, "patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType "selectedType": _selectedType
}); });
}
} else { } else {
setState(() { setState(() {
_autoValidate = true; _autoValidate = true;
@ -105,7 +100,6 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
} }
} catch (err) { } catch (err) {
error = err; error = err;
// handelCatchErrorCase(err);
} }
} }

@ -9,11 +9,12 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_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'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart'; import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.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/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -48,7 +49,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
final String avatarFemale = 'user_female.svg'; final String avatarFemale = 'user_female.svg';
final String assetName = 'assets/image.svg'; final String assetName = 'assets/image.svg';
// List<String> _locations = ['Today', 'Old Date', 'YESTERDAY'];
List<String> _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week']; List<String> _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week'];
int _activeLocation = 0; int _activeLocation = 0;
@ -66,14 +66,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
PatientModel patient; PatientModel patient;
/*
*@author: Amjad Amireh
*@Date:2/5/2020
*@param:
*@return:PatientsScreen Search textbox filter
*@desc:
*/
searchData(String str) { searchData(String str) {
this.responseModelList = this.responseModelList2; this.responseModelList = this.responseModelList2;
@ -266,27 +258,56 @@ class _PatientsScreenState extends State<PatientsScreen> {
return BaseView<PatientViewModel>( return BaseView<PatientViewModel>(
onModelReady: (model) { onModelReady: (model) {
// TODO : change all the logic here to make it work with the model and remove future // TODO : change all the logic here to make it work with the model and remove future
model.getPatientList(patient, patientType).then((res) { int val2 = int.parse(patientType);
GetPatientArrivalListRequestModel getPatientArrivalListRequestModel;
if (val2 == 7) {
getPatientArrivalListRequestModel = GetPatientArrivalListRequestModel(
from: patient.From, to: patient.To, pageIndex: 0, pageSize: 0);
}
model
.getPatientList(
val2 == 7
? getPatientArrivalListRequestModel.toJson()
: patient,
patientType)
.then((res) {
setState(() { setState(() {
_isLoading = false; _isLoading = false;
if (res['MessageStatus'] == 1) { // if (res['MessageStatus'] == 1) {
int val2 = int.parse(patientType); if (val2 == 7) {
print("Assad");
if (res[SERVICES_PATIANT2[val2]] == null) {
_isError = true;
_isLoading = false;
this.error = error.toString();
} else {
var localList=[];
res["patientArrivalList"]["entityList"].forEach((v) {
Map<String,dynamic> mergedPatient= {...v,...v["patientDetails"]};
localList.add(mergedPatient);
});
print(localList.toString());
lItems = localList;//res[SERVICES_PATIANT2[val2]]["entityList"];
}
} else {
lItems = res[SERVICES_PATIANT2[val2]]; lItems = res[SERVICES_PATIANT2[val2]];
}
parsed = lItems; parsed = lItems;
responseModelList = new ModelResponse.fromJson(parsed).list; responseModelList = new ModelResponse.fromJson(parsed).list;
responseModelList2 = responseModelList; responseModelList2 = responseModelList;
_isError = false; _isError = false;
} else { // } else {
_isError = true; // _isError = true;
error = res['ErrorEndUserMessage'] ?? res['ErrorMessage']; // error = res['ErrorEndUserMessage'] ?? res['ErrorMessage'];
} // }
}); });
}).catchError((error) { }).catchError((error) {
setState(() { setState(() {
_isError = true; _isError = true;
_isLoading = false; _isLoading = false;
this.error = error; this.error = error.toString();
}); });
}); });
}, },

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-doctor-referral-viewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart'; import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.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/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -119,7 +119,9 @@ class MyReferralDetailScreen extends StatelessWidget {
fontSize: 16, fontSize: 16,
hPadding: 8, hPadding: 8,
vPadding: 12, vPadding: 12,
handler: null, handler: (){
model.responseReferral(pendingReferral, true);
},
), ),
), ),
SizedBox( SizedBox(
@ -133,7 +135,9 @@ class MyReferralDetailScreen extends StatelessWidget {
fontSize: 16, fontSize: 16,
hPadding: 8, hPadding: 8,
vPadding: 12, vPadding: 12,
handler: null, handler: (){
model.responseReferral(pendingReferral, false);
},
), ),
), ),
], ],

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-doctor-referral-viewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.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/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';

@ -1,11 +1,13 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-doctor-referral-viewModel.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart'; import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.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/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.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/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -17,7 +19,7 @@ import 'package:hexcolor/hexcolor.dart';
import '../../../QR_reader_screen.dart'; import '../../../QR_reader_screen.dart';
class PatientMakeReferralScreen extends StatefulWidget { class PatientMakeReferralScreen extends StatefulWidget {
// previous design page is: ReferPatientScreen // previous design page is: MyReferralPatient
@override @override
_PatientMakeReferralScreenState createState() => _PatientMakeReferralScreenState createState() =>
_PatientMakeReferralScreenState(); _PatientMakeReferralScreenState();
@ -64,14 +66,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
children: [ children: [
Column( Column(
children: [ children: [
Container( PatientPageHeaderWidget(patient),
height: 75,
child: AppText(
"This is where upper view for avatar.. etc placed",
fontWeight: FontWeight.normal,
fontSize: 16,
),
),
const Divider( const Divider(
color: Color(0xffCCCCCC), color: Color(0xffCCCCCC),
height: 1, height: 1,
@ -336,13 +331,15 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
_selectedClinic == null || _selectedClinic == null ||
_selectedDoctor == null || _selectedDoctor == null ||
_remarksController.text == null) return; _remarksController.text == null) return;
model.makeReferral( model
.makeReferral(
_selectedPatientArrivalEntity, _selectedPatientArrivalEntity,
appointmentDate.toIso8601String(), appointmentDate.toIso8601String(),
_selectedBranch['ID'], _selectedBranch['ID'],
_selectedClinic['ClinicID'], _selectedClinic['ClinicID'],
_selectedDoctor['DoctorID'], _selectedDoctor['DoctorID'],
_remarksController.text).then((_) => Navigator.pop(context)); _remarksController.text)
.then((_) => Navigator.pop(context));
}, },
), ),
) )
@ -360,7 +357,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
final DateTime picked = await showDatePicker( final DateTime picked = await showDatePicker(
context: context, context: context,
initialDate: appointmentDate, initialDate: appointmentDate,
firstDate: appointmentDate.add(Duration(hours: 2)), firstDate: DateTime.now().add(Duration(hours: 2)),
lastDate: DateTime(2040), lastDate: DateTime(2040),
initialEntryMode: DatePickerEntryMode.calendar, initialEntryMode: DatePickerEntryMode.calendar,
); );
@ -370,6 +367,10 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
.getPatientArrivalList(DateUtils.convertStringToDateFormat( .getPatientArrivalList(DateUtils.convertStringToDateFormat(
appointmentDate.toString(), "yyyy-MM-dd")) appointmentDate.toString(), "yyyy-MM-dd"))
.then((_) { .then((_) {
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
return;
}
if (model.patientArrivalList != null && if (model.patientArrivalList != null &&
model.patientArrivalList.length > 0) { model.patientArrivalList.length > 0) {
List<dynamic> appointments = model.getAppointmentsByPatientName( List<dynamic> appointments = model.getAppointmentsByPatientName(

@ -1,4 +1,4 @@
import 'package:doctor_app_flutter/core/viewModel/patient-doctor-referral-viewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.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/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';

@ -0,0 +1,989 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart';
import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-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/expandable-widget-header-body.dart';
import 'package:flutter/material.dart';
class PatientVitalSignScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
return BaseView<VitalSignsViewModel>(
onModelReady: (model) => model.getPatientArrivalList(
DateUtils.convertDateToFormat(DateTime.now(), "yyyy-MM-dd"), patient,
fromDate: DateUtils.convertDateToFormat(
DateTime.now().subtract(Duration(days: 500)), "yyyy-MM-dd")),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).vitalSign,
body: model.patientVitalSigns != null
? SingleChildScrollView(
child: Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
PatientPageHeaderWidget(patient),
SizedBox(
height: 16,
),
Container(
margin:
EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).weight} :",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 8,
),
AppText(
"${model.patientVitalSigns.weightKg} ${TranslationBase.of(context).kg}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).idealBodyWeight} :",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 8,
),
AppText(
"${model.patientVitalSigns.idealBodyWeightLbs} ${TranslationBase.of(context).kg}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
SizedBox(
height: 4,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).height} :",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 8,
),
AppText(
"${model.patientVitalSigns.heightCm} ${TranslationBase.of(context).cm}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
SizedBox(
height: 4,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).waistSize} :",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 8,
),
AppText(
"${model.patientVitalSigns.waistSizeInch} ${TranslationBase.of(context).inch}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).headCircum} :",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 8,
),
AppText(
"${model.patientVitalSigns.headCircumCm} ${TranslationBase.of(context).cm}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
SizedBox(
height: 16,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).leanBodyWeight} :",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 8,
),
AppText(
"${model.patientVitalSigns.leanBodyWeightLbs} ${TranslationBase.of(context).kg}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
SizedBox(
height: 4,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).bodyMassIndex} :",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 8,
),
AppText(
"${model.patientVitalSigns.bodyMassIndex}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
SizedBox(
height: 4,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"G.C.S :",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 8,
),
AppText(
"N/A",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 2,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
TemperatureWidget(model.patientVitalSigns),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 2,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
PulseWidget(model.patientVitalSigns),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 2,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
RespirationWidget(model.patientVitalSigns),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 2,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
BloodPressureWidget(model.patientVitalSigns),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 2,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
OxygenationWidget(model.patientVitalSigns),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 2,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
PainScaleWidget(model.patientVitalSigns),
SizedBox(
height: 16,
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 2,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 16,
),
],
),
)
],
),
),
)
: Container(),
),
);
}
}
class TemperatureWidget extends StatefulWidget {
final VitalSignData vitalSign;
TemperatureWidget(this.vitalSign);
@override
_TemperatureWidgetState createState() => _TemperatureWidgetState();
}
class _TemperatureWidgetState extends State<TemperatureWidget> {
bool isExpand = false;
@override
Widget build(BuildContext context) {
return Container(
child: HeaderBodyExpandableNotifier(
headerWidget: Container(
margin: EdgeInsets.symmetric(vertical: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
"${TranslationBase.of(context).temperature}",
fontSize: SizeConfig.textMultiplier * 2.5,
color: Colors.black,
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
),
InkWell(
onTap: () {
setState(() {
isExpand = !isExpand;
});
},
child: Icon(isExpand ? Icons.remove : Icons.add),
),
],
),
),
bodyWidget: Container(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).temperature} (C):",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.temperatureCelcius}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).temperature} (F):",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.temperatureCelcius * (9 / 5) + 32}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
SizedBox(
height: 4,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).method} :",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.temperatureCelciusMethod}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
],
),
),
isExpand: isExpand,
),
);
}
}
class PulseWidget extends StatefulWidget {
final VitalSignData vitalSign;
PulseWidget(this.vitalSign);
@override
_PulseWidgetState createState() => _PulseWidgetState();
}
class _PulseWidgetState extends State<PulseWidget> {
bool isExpand = false;
@override
Widget build(BuildContext context) {
return Container(
child: HeaderBodyExpandableNotifier(
headerWidget: Container(
margin: EdgeInsets.symmetric(vertical: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
"${TranslationBase.of(context).pulse}",
fontSize: SizeConfig.textMultiplier * 2.5,
color: Colors.black,
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
),
InkWell(
onTap: () {
setState(() {
isExpand = !isExpand;
});
},
child: Icon(isExpand ? Icons.remove : Icons.add),
),
],
),
),
bodyWidget: Container(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).pulseBeats}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.pulseBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).rhythm}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.pulseRhythm}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
],
),
),
isExpand: isExpand,
),
);
}
}
class RespirationWidget extends StatefulWidget {
final VitalSignData vitalSign;
RespirationWidget(this.vitalSign);
@override
_RespirationWidgetState createState() => _RespirationWidgetState();
}
class _RespirationWidgetState extends State<RespirationWidget> {
bool isExpand = false;
@override
Widget build(BuildContext context) {
return Container(
child: HeaderBodyExpandableNotifier(
headerWidget: Container(
margin: EdgeInsets.symmetric(vertical: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
"${TranslationBase.of(context).respiration}",
fontSize: SizeConfig.textMultiplier * 2.5,
color: Colors.black,
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
),
InkWell(
onTap: () {
setState(() {
isExpand = !isExpand;
});
},
child: Icon(isExpand ? Icons.remove : Icons.add),
),
],
),
),
bodyWidget: Container(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).respBeats}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.respirationBeatPerMinute}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).patternOfRespiration}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.respirationPattern}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
],
),
),
isExpand: isExpand,
),
);
}
}
class BloodPressureWidget extends StatefulWidget {
final VitalSignData vitalSign;
BloodPressureWidget(this.vitalSign);
@override
_BloodPressureWidgetState createState() => _BloodPressureWidgetState();
}
class _BloodPressureWidgetState extends State<BloodPressureWidget> {
bool isExpand = false;
@override
Widget build(BuildContext context) {
return Container(
child: HeaderBodyExpandableNotifier(
headerWidget: Container(
margin: EdgeInsets.symmetric(vertical: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
"${TranslationBase.of(context).bloodPressure}",
fontSize: SizeConfig.textMultiplier * 2.5,
color: Colors.black,
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
),
InkWell(
onTap: () {
setState(() {
isExpand = !isExpand;
});
},
child: Icon(isExpand ? Icons.remove : Icons.add),
),
],
),
),
bodyWidget: Container(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).bloodPressureDiastoleAndSystole}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.bloodPressureHigher}, ${widget.vitalSign.bloodPressureLower}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).cuffLocation}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.bloodPressureCuffLocation}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
SizedBox(
height: 4,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).patientPosition}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.bloodPressurePatientPosition}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).cuffSize}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.bloodPressureCuffSize}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
],
),
),
isExpand: isExpand,
),
);
}
}
class OxygenationWidget extends StatefulWidget {
final VitalSignData vitalSign;
OxygenationWidget(this.vitalSign);
@override
_OxygenationWidgetState createState() => _OxygenationWidgetState();
}
class _OxygenationWidgetState extends State<OxygenationWidget> {
bool isExpand = false;
@override
Widget build(BuildContext context) {
return Container(
child: HeaderBodyExpandableNotifier(
headerWidget: Container(
margin: EdgeInsets.symmetric(vertical: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
"${TranslationBase.of(context).oxygenation}",
fontSize: SizeConfig.textMultiplier * 2.5,
color: Colors.black,
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
),
InkWell(
onTap: () {
setState(() {
isExpand = !isExpand;
});
},
child: Icon(isExpand ? Icons.remove : Icons.add),
),
],
),
),
bodyWidget: Container(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).sao2}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.sao2}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).fio2}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.fio2}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
],
),
),
isExpand: isExpand,
),
);
}
}
class PainScaleWidget extends StatefulWidget {
final VitalSignData vitalSign;
PainScaleWidget(this.vitalSign);
@override
_PainScaleWidgetState createState() => _PainScaleWidgetState();
}
class _PainScaleWidgetState extends State<PainScaleWidget> {
bool isExpand = false;
@override
Widget build(BuildContext context) {
return Container(
child: HeaderBodyExpandableNotifier(
headerWidget: Container(
margin: EdgeInsets.symmetric(vertical: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
"${TranslationBase.of(context).painScale}",
fontSize: SizeConfig.textMultiplier * 2.5,
color: Colors.black,
fontWeight: isExpand ? FontWeight.bold : FontWeight.normal,
),
InkWell(
onTap: () {
setState(() {
isExpand = !isExpand;
});
},
child: Icon(isExpand ? Icons.remove : Icons.add),
),
],
),
),
bodyWidget: Container(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).painScale}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.painScore}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).painManagement}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${widget.vitalSign.isPainManagementDone}",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
),
],
),
],
),
),
isExpand: isExpand,
),
);
}
}

@ -1,7 +1,12 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/models/livecare/transfer_to_admin.dart'; import 'package:doctor_app_flutter/models/livecare/transfer_to_admin.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
@ -10,6 +15,8 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
void addPrescriptionForm(context) { void addPrescriptionForm(context) {
TextEditingController durationController = TextEditingController();
TextEditingController doseController = TextEditingController();
final GlobalKey<FormState> _formKey = GlobalKey<FormState>(); final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
final double spaceBetweenTextFileds = 12; final double spaceBetweenTextFileds = 12;
showModalBottomSheet( showModalBottomSheet(
@ -122,6 +129,7 @@ void addPrescriptionForm(context) {
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
controller: doseController,
), ),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(height: spaceBetweenTextFileds),
@ -164,7 +172,14 @@ void addPrescriptionForm(context) {
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
), controller: durationController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
), ),
SizedBox(height: spaceBetweenTextFileds), SizedBox(height: spaceBetweenTextFileds),
Container( Container(
@ -192,8 +207,11 @@ void addPrescriptionForm(context) {
title: title:
TranslationBase.of(context).addMedication, TranslationBase.of(context).addMedication,
onPressed: () { onPressed: () {
//prescriptionWarning(context);
postProcedure(
duration: durationController.text,
dose: doseController.text);
Navigator.pop(context); Navigator.pop(context);
prescriptionWarning(context);
}, },
), ),
], ],
@ -210,3 +228,40 @@ void addPrescriptionForm(context) {
); );
}); });
} }
postProcedure({String duration, String dose}) async {
PrescriptionViewModel model = new PrescriptionViewModel();
PostPrescriptionReqModel postProcedureReqModel =
new PostPrescriptionReqModel();
List<PrescriptionRequestModel> sss = List();
postProcedureReqModel.appointmentNo = 2016055175;
postProcedureReqModel.clinicID = 1;
postProcedureReqModel.episodeID = 200012335;
postProcedureReqModel.patientMRN = 1234;
postProcedureReqModel.vidaAuthTokenID =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiOGFjNDRjZGQtOWE0Mi00M2YxLWE2YTQtMWQ4NzBmZmYwNTUyIiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTU2NDkiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA4NzM2NjY5LCJleHAiOjE2MDk2MDA2NjksImlhdCI6MTYwODczNjY2OX0.9EDgYrbe5fQA2CvgLdFT4s_PL7hD5R_Qggfpv4lDtUY";
sss.add(PrescriptionRequestModel(
covered: true,
dose: int.parse(dose),
itemId: 8,
doseUnitId: 1,
route: 1,
frequency: 1,
remarks: "test2",
approvalRequired: true,
icdcode10Id: "test2",
doseTime: 1,
duration: int.parse(duration),
doseStartDate: "2020-12-20T13:07:41.769Z"));
postProcedureReqModel.prescriptionRequestModel = sss;
//postProcedureReqModel.procedures = controlsProcedure;
await model.postPrescription(postProcedureReqModel);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
DrAppToastMsg.showSuccesToast('Medication has been added');
}
}

@ -76,7 +76,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
width: 20, width: 5.0,
), ),
AppText( AppText(
patient.patientId.toString(), patient.patientId.toString(),
@ -195,6 +195,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
), ),
onTap: () { onTap: () {
addPrescriptionForm(context); addPrescriptionForm(context);
//model.postPrescription();
}, },
), ),
SizedBox( SizedBox(

@ -1,10 +1,14 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
@ -24,6 +28,7 @@ class ProcedureScreen extends StatefulWidget {
class _ProcedureScreenState extends State<ProcedureScreen> { class _ProcedureScreenState extends State<ProcedureScreen> {
int testNum = 1; int testNum = 1;
PatiantInformtion patient; PatiantInformtion patient;
TextEditingController procedureController = TextEditingController();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -72,7 +77,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
width: 20, width: 5.0,
), ),
AppText( AppText(
patient.patientId.toString(), patient.patientId.toString(),
@ -376,11 +381,45 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
} }
} }
postProcedure({ProcedureViewModel model}) async {
model = new ProcedureViewModel();
PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel();
List<Controls> controls = List();
List<Procedures> controlsProcedure = List();
postProcedureReqModel.appointmentNo = 2016054575;
postProcedureReqModel.episodeID = 200012166;
postProcedureReqModel.patientMRN = 3120725;
postProcedureReqModel.vidaAuthTokenID =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI';
controls.add(
Controls(code: 'Remarks', controlValue: 'Testing'),
);
controlsProcedure.add(
Procedures(category: "02", procedure: "02011002", controls: controls));
postProcedureReqModel.procedures = controlsProcedure;
await model.postProcedure(postProcedureReqModel);
DrAppToastMsg.showSuccesToast('Procedure had been added');
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
}
}
void addSelectedProcedure(context) { void addSelectedProcedure(context) {
TextEditingController procedureController = TextEditingController();
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
builder: (BuildContext bc) { builder: (BuildContext bc) {
return SingleChildScrollView( return BaseView(
onModelReady: (model) => model.getCategories(),
builder:
(BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: Container( child: Container(
height: 490, height: 490,
child: Padding( child: Padding(
@ -392,8 +431,22 @@ void addSelectedProcedure(context) {
'Select Procedure'.toUpperCase(), 'Select Procedure'.toUpperCase(),
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
), ),
if (model.categoriesList.length != 0)
Container(
height: 120.0,
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.categoriesList[0].rowcount,
itemBuilder: (BuildContext ctxt, int index) {
return Container(
child: AppText(model.categoriesList[0]
.entityList[index].procedureName),
);
}),
),
SizedBox( SizedBox(
height: 9.0, height: 0.0,
), ),
Column( Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -405,26 +458,30 @@ void addSelectedProcedure(context) {
border: Border.all( border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))), width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField( child: AppTextFormField(
labelText: 'Add Delected Procedures'.toUpperCase(), labelText:
'Add Delected Procedures'.toUpperCase(),
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.text, textInputType: TextInputType.text,
inputFormatter: ONLY_LETTERS, inputFormatter: ONLY_LETTERS,
controller: procedureController,
), ),
), ),
SizedBox( SizedBox(
height: 280.0, height: 80.0,
), ),
Container( Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), margin:
EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap( child: Wrap(
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
title: TranslationBase.of(context).addMedication, title:
// onPressed: () { TranslationBase.of(context).addMedication,
// Navigator.pop(context); onPressed: () {
// prescriptionWarning(context); Navigator.pop(context);
// }, postProcedure();
},
), ),
], ],
), ),
@ -435,6 +492,8 @@ void addSelectedProcedure(context) {
), ),
), ),
), ),
),
),
); );
}); });
} }

@ -2,9 +2,13 @@ import 'package:intl/intl.dart';
class DateUtils { class DateUtils {
static String convertDateToFormat(DateTime dateTime, String dateFormat) {
return DateFormat(dateFormat).format(dateTime);
}
static String convertStringToDateFormat(String date, String dateFormat) { static String convertStringToDateFormat(String date, String dateFormat) {
DateTime dateTime = DateTime.parse(date); DateTime dateTime = DateTime.parse(date);
return DateFormat(dateFormat).format(dateTime); return convertDateToFormat(dateTime, dateFormat);
} }
static convertDateFromServerFormat(String str, dateFormat) { static convertDateFromServerFormat(String str, dateFormat) {

@ -285,7 +285,7 @@ class TranslationBase {
String get transfertoadmin => String get transfertoadmin =>
localizedValues['transfertoadmin'][locale.languageCode]; localizedValues['transfertoadmin'][locale.languageCode];
String get fromDate => localizedValues['toDate'][locale.languageCode]; String get fromDate => localizedValues['fromDate'][locale.languageCode];
String get toDate => localizedValues['toDate'][locale.languageCode]; String get toDate => localizedValues['toDate'][locale.languageCode];
@ -394,6 +394,36 @@ class TranslationBase {
String get route => localizedValues['route'][locale.languageCode]; String get route => localizedValues['route'][locale.languageCode];
String get noReScheduleLeave => String get noReScheduleLeave =>
localizedValues['no-reschedule-leave'][locale.languageCode]; localizedValues['no-reschedule-leave'][locale.languageCode];
String get weight => localizedValues['weight'][locale.languageCode];
String get kg => localizedValues['kg'][locale.languageCode];
String get height => localizedValues['height'][locale.languageCode];
String get cm => localizedValues['cm'][locale.languageCode];
String get idealBodyWeight =>
localizedValues['idealBodyWeight'][locale.languageCode];
String get waistSize => localizedValues['waistSize'][locale.languageCode];
String get inch => localizedValues['inch'][locale.languageCode];
String get headCircum => localizedValues['headCircum'][locale.languageCode];
String get leanBodyWeight =>
localizedValues['leanBodyWeight'][locale.languageCode];
String get bodyMassIndex =>
localizedValues['bodyMassIndex'][locale.languageCode];
String get method => localizedValues['method'][locale.languageCode];
String get pulseBeats => localizedValues['pulseBeats'][locale.languageCode];
String get rhythm => localizedValues['rhythm'][locale.languageCode];
String get respBeats => localizedValues['respBeats'][locale.languageCode];
String get patternOfRespiration =>
localizedValues['patternOfRespiration'][locale.languageCode];
String get bloodPressureDiastoleAndSystole =>
localizedValues['bloodPressureDiastoleAndSystole'][locale.languageCode];
String get cuffLocation =>
localizedValues['cuffLocation'][locale.languageCode];
String get cuffSize => localizedValues['cuffSize'][locale.languageCode];
String get patientPosition =>
localizedValues['patientPosition'][locale.languageCode];
String get fio2 => localizedValues['fio2'][locale.languageCode];
String get sao2 => localizedValues['sao2'][locale.languageCode];
String get painManagement =>
localizedValues['painManagement'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,5 +1,4 @@
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
@ -11,17 +10,17 @@ import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/assessment_page
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/objective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/objective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/plan_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/plan_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/subjective_page.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../patient_profile_widget.dart';
import 'steps_widget.dart'; import 'steps_widget.dart';
class AddSOAPIndex extends StatefulWidget { class AddSOAPIndex extends StatefulWidget {
final bool isUpdate;
const AddSOAPIndex({Key key, this.isUpdate}) : super(key: key);
@override @override
_AddSOAPIndexState createState() => _AddSOAPIndexState(); _AddSOAPIndexState createState() => _AddSOAPIndexState();
} }
@ -63,74 +62,7 @@ class _AddSOAPIndexState extends State<AddSOAPIndex>
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( PatientPageHeaderWidget(patient),
padding: const EdgeInsets.all(8.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AvatarWidget(
Icon(
patient.genderDescription == "Male"
? DoctorApp.male
: DoctorApp.female_icon,
size: 70,
color: Colors.white,
),
),
SizedBox(
width: 20,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 5,
),
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).age,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 20,
),
AppText(
patient.age.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
),
Container(
width: MediaQuery.of(context).size.width *0.65,
child: AppText(
"ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
),
),
],
)
],
),
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
SizedBox(
width: 20,
),
FractionallySizedBox( FractionallySizedBox(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
@ -159,10 +91,28 @@ class _AddSOAPIndexState extends State<AddSOAPIndex>
}, },
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
children: <Widget>[ children: <Widget>[
SubjectivePage(changePageViewIndex: changePageViewIndex,myAllergiesList: myAllergiesList,myHistoryList: myHistoryList,), SubjectivePage(
ObjectivePage(changePageViewIndex: changePageViewIndex,mySelectedExamination:mySelectedExamination), changePageViewIndex: changePageViewIndex,
AssessmentPage(changePageViewIndex: changePageViewIndex,mySelectedAssessment:mySelectedAssessment), myAllergiesList: myAllergiesList,
PlanPage(changePageViewIndex: changePageViewIndex,) myHistoryList: myHistoryList,
patientInfo: patient,
),
ObjectivePage(
changePageViewIndex: changePageViewIndex,
mySelectedExamination:
mySelectedExamination,
patientInfo: patient,
),
AssessmentPage(
changePageViewIndex: changePageViewIndex,
mySelectedAssessment:
mySelectedAssessment,
patientInfo: patient,
),
PlanPage(
changePageViewIndex: changePageViewIndex,
patientInfo: patient,
)
], ],
), ),
), ),

@ -1,8 +1,12 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/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/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_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/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
@ -20,9 +24,10 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class AssessmentPage extends StatefulWidget { class AssessmentPage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final MySelectedAssessment mySelectedAssessment; final MySelectedAssessment mySelectedAssessment;
final PatiantInformtion patientInfo;
AssessmentPage( AssessmentPage(
{Key key, this.changePageViewIndex, this.mySelectedAssessment}); {Key key, this.changePageViewIndex, this.mySelectedAssessment, this.patientInfo});
@override @override
_AssessmentPageState createState() => _AssessmentPageState(); _AssessmentPageState createState() => _AssessmentPageState();
@ -236,7 +241,7 @@ class _AssessmentPageState extends State<AssessmentPage> {
height: 6, height: 6,
), ),
AppText( AppText(
"Some short remark about the allergy", widget.mySelectedAssessment.remark,
fontSize: 10, fontSize: 10,
color: Colors.grey, color: Colors.grey,
), ),
@ -268,7 +273,9 @@ class _AssessmentPageState extends State<AssessmentPage> {
Column( Column(
children: [ children: [
InkWell( InkWell(
onTap: () {}, onTap: () {
openAssessmentDialog(context);
},
child: Icon(EvaIcons child: Icon(EvaIcons
.edit2Outline), .edit2Outline),
) )
@ -286,11 +293,10 @@ class _AssessmentPageState extends State<AssessmentPage> {
height: 30, height: 30,
), ),
AppButton( AppButton(
title: TranslationBase title: TranslationBase.of(context).next,
.of(context) loading: model.state == ViewState.BusyLocal,
.next, onPressed: () async {
onPressed: () { await submitAssessment(model);
widget.changePageViewIndex(3);
}, },
), ),
SizedBox( SizedBox(
@ -303,6 +309,37 @@ class _AssessmentPageState extends State<AssessmentPage> {
))); )));
} }
submitAssessment(SOAPViewModel model) async {
if (widget.mySelectedAssessment.selectedDiagnosisCondition != null &&
widget.mySelectedAssessment.selectedDiagnosisType != null) {
PostAssessmentRequestModel postAssessmentRequestModel =
new PostAssessmentRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
icdCodeDetails: [
new IcdCodeDetails(
remarks: widget.mySelectedAssessment.remark,
complexDiagnosis: true,
conditionId:
widget.mySelectedAssessment.selectedDiagnosisCondition.id,
diagnosisTypeId:
widget.mySelectedAssessment.selectedDiagnosisType.id,
icdcode10Id: "1")
]);
await model.postAssessment(postAssessmentRequestModel);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(3);
}
} else {
helpers.showErrorToast('Please add required field correctly');
}
}
openAssessmentDialog(BuildContext context) { openAssessmentDialog(BuildContext context) {
showModalBottomSheet( showModalBottomSheet(
backgroundColor: Colors.white, backgroundColor: Colors.white,
@ -334,14 +371,15 @@ class AddAssessmentDetails extends StatefulWidget {
} }
class _AddAssessmentDetailsState extends State<AddAssessmentDetails> { class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
MasterKeyModel _selectedDiagnosisCondition; // MasterKeyModel _selectedDiagnosisCondition;
MasterKeyModel _selectedDiagnosisType; // MasterKeyModel _selectedDiagnosisType;
TextEditingController remarkController = TextEditingController(); TextEditingController remarkController = TextEditingController();
TextEditingController appointmentIdController = TextEditingController( TextEditingController appointmentIdController = TextEditingController(
text: "234567"); text: "234567");
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
remarkController.text = widget.mySelectedAssessment.remark??"";
final screenSize = MediaQuery final screenSize = MediaQuery
.of(context) .of(context)
.size; .size;
@ -379,6 +417,9 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
if (model.listOfDiagnosisType.length == 0) { if (model.listOfDiagnosisType.length == 0) {
await model.getMasterLookup(MasterKeysService.DiagnosisType); await model.getMasterLookup(MasterKeysService.DiagnosisType);
} }
// if (model.listOfICD10.length == 0) {
// await model.getMasterLookup(MasterKeysService.ICD10);
// }
}, },
builder: (_, model, w) => builder: (_, model, w) =>
AppScaffold( AppScaffold(
@ -428,21 +469,22 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: InkWell( child: InkWell(
onTap: model.listOfDiagnosisCondition != onTap: model.listOfDiagnosisType != null
null
? () { ? () {
MasterKeyDailog dialog = MasterKeyDailog( MasterKeyDailog dialog = MasterKeyDailog(
list: model.listOfDiagnosisCondition, isICD: true,
list: model.listOfDiagnosisType,
selectedValue: widget
.mySelectedAssessment
.selectedICD,
okText: TranslationBase okText: TranslationBase
.of(context) .of(context)
.ok, .ok,
okFunction: ( okFunction:
MasterKeyModel selectedValue) { (MasterKeyModel selectedValue) {
setState(() { setState(() {
_selectedDiagnosisCondition =
selectedValue;
widget.mySelectedAssessment widget.mySelectedAssessment
.selectedDiagnosisCondition = .selectedICD =
selectedValue; selectedValue;
}); });
}, },
@ -458,10 +500,12 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
: null, : null,
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration: textFieldSelectorDecoration(
"Condition", "Name / ICD",
_selectedDiagnosisCondition != null widget.mySelectedAssessment
? _selectedDiagnosisCondition .selectedICD !=
.nameEn null
? widget.mySelectedAssessment
.selectedICD.nameEn
: null, : null,
true), true),
enabled: false, enabled: false,
@ -485,7 +529,8 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
okFunction: ( okFunction: (
MasterKeyModel selectedValue) { MasterKeyModel selectedValue) {
setState(() { setState(() {
_selectedDiagnosisCondition = widget.mySelectedAssessment
.selectedDiagnosisCondition =
selectedValue; selectedValue;
}); });
}, },
@ -502,8 +547,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration: textFieldSelectorDecoration(
"Condition", "Condition",
_selectedDiagnosisCondition != null widget.mySelectedAssessment
? _selectedDiagnosisCondition .selectedDiagnosisCondition != null
? widget.mySelectedAssessment
.selectedDiagnosisCondition
.nameEn .nameEn
: null, : null,
true), true),
@ -527,11 +574,11 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
okFunction: ( okFunction: (
MasterKeyModel selectedValue) { MasterKeyModel selectedValue) {
setState(() { setState(() {
_selectedDiagnosisType = // _selectedDiagnosisType =
selectedValue; // selectedValue;
widget.mySelectedAssessment widget.mySelectedAssessment
.selectedDiagnosisType = .selectedDiagnosisType =
_selectedDiagnosisType; selectedValue;
}); });
}, },
); );
@ -547,8 +594,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
child: TextField( child: TextField(
decoration: textFieldSelectorDecoration( decoration: textFieldSelectorDecoration(
"Type", "Type",
_selectedDiagnosisType != null widget.mySelectedAssessment
? _selectedDiagnosisType.nameEn .selectedDiagnosisType != null
? widget.mySelectedAssessment
.selectedDiagnosisType.nameEn
: null, : null,
true), true),
enabled: false, enabled: false,

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.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/my_selected_examination.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.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/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/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
@ -23,9 +24,9 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class ObjectivePage extends StatefulWidget { class ObjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final List<MySelectedExamination> mySelectedExamination; final List<MySelectedExamination> mySelectedExamination;
final PatiantInformtion patientInfo;
ObjectivePage( ObjectivePage(
{Key key, this.changePageViewIndex, this.mySelectedExamination}); {Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo});
@override @override
_ObjectivePageState createState() => _ObjectivePageState(); _ObjectivePageState createState() => _ObjectivePageState();
@ -329,9 +330,9 @@ class _ObjectivePageState extends State<ObjectivePage> {
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add( postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
ListHisProgNotePhysicalExaminationVM( ListHisProgNotePhysicalExaminationVM(
patientMRN: 3120690, patientMRN: widget.patientInfo.patientMRN,
episodeId: 200012117, episodeId: widget.patientInfo.episodeNo,
appointmentNo: 2016054573, appointmentNo: widget.patientInfo.appointmentNo,
remarks: exam.remark ?? '', remarks: exam.remark ?? '',
createdBy: 1485, createdBy: 1485,
createdOn: DateTime.now().toIso8601String(), createdOn: DateTime.now().toIso8601String(),
@ -352,12 +353,11 @@ class _ObjectivePageState extends State<ObjectivePage> {
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
} else { } else {
widget.changePageViewIndex(2);
} }
} else {
helpers.showErrorToast('Please add required field correctly');
} }
// TODO move it back to else stat when it work.
widget.changePageViewIndex(2);
} }
removeExamination(MasterKeyModel masterKey) { removeExamination(MasterKeyModel masterKey) {

@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/config/config.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/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/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/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
@ -18,8 +19,9 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class PlanPage extends StatefulWidget { class PlanPage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final PatiantInformtion patientInfo;
PlanPage({Key key, this.changePageViewIndex}); PlanPage({Key key, this.changePageViewIndex, this.patientInfo});
@override @override
_PlanPageState createState() => _PlanPageState(); _PlanPageState createState() => _PlanPageState();
@ -269,9 +271,9 @@ class _PlanPageState extends State<PlanPage> {
submitPlan(SOAPViewModel model) async { submitPlan(SOAPViewModel model) async {
if (progressNoteController.text.isNotEmpty) { if (progressNoteController.text.isNotEmpty) {
PostProgressNoteRequestModel postProgressNoteRequestModel = new PostProgressNoteRequestModel( PostProgressNoteRequestModel postProgressNoteRequestModel = new PostProgressNoteRequestModel(
patientMRN: 3120690, patientMRN: widget.patientInfo.patientMRN,
episodeId: 200012117, episodeId: widget.patientInfo.episodeNo,
appointmentNo: 2016054573, appointmentNo: widget.patientInfo.appointmentNo,
planNote: progressNoteController.text); planNote: progressNoteController.text);

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -70,10 +71,11 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 0 ? 5 : 10, height: index == 0 ? 5 : 10,
), ),
Texts('SUBJECTIVE', AppText(
variant: "bodyText", "SUBJECTIVE",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
], ],
), ),
), ),
@ -82,7 +84,7 @@ class StepsWidget extends StatelessWidget {
top: index == 1 ? 15 : 30, top: index == 1 ? 15 : 30,
left: MediaQuery.of(context).size.width * 0.28, left: MediaQuery.of(context).size.width * 0.28,
child: InkWell( child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null, onTap: () => index >= 1 ? changeCurrentTab(1) : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -119,10 +121,11 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 1 ? 5 : 10, height: index == 1 ? 5 : 10,
), ),
Texts('OBJECTIVE', AppText(
variant: "bodyText", "OBJECTIVE",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
], ],
), ),
), ),
@ -131,7 +134,10 @@ class StepsWidget extends StatelessWidget {
top: index == 2 ? 15 : 30, top: index == 2 ? 15 : 30,
left: MediaQuery.of(context).size.width * 0.52, left: MediaQuery.of(context).size.width * 0.52,
child: InkWell( child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(3) : null, onTap: () {
if(index >= 3)
changeCurrentTab(2);
},
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -168,10 +174,11 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 2 ? 5 : 10, height: index == 2 ? 5 : 10,
), ),
Texts('ASSESSMENT', AppText(
variant: "bodyText", "ASSESSMENT",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
], ],
), ),
), ),
@ -212,15 +219,20 @@ class StepsWidget extends StatelessWidget {
? Colors.white ? Colors.white
: Colors.grey, : Colors.grey,
), ),
), )
), ),
SizedBox( SizedBox(
height: index == 3 ? 5 : 10, height: index == 3 ? 5 : 10,
), ),
Texts('PLAN', Container(
variant: "bodyText", margin: EdgeInsets.only(left: index == 3? 15:0),
bold: true, child: AppText(
color: Colors.black), "PLAN",
fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
fontSize: 14,
),
),
], ],
), ),
), ),
@ -282,10 +294,11 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 0 ? 5 : 10, height: index == 0 ? 5 : 10,
), ),
Texts('SUBJECTIVE', AppText(
variant: "bodyText", "SUBJECTIVE",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 16,
),
], ],
), ),
), ),
@ -331,10 +344,11 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 1 ? 5 : 10, height: index == 1 ? 5 : 10,
), ),
Texts('OBJECTIVE', AppText(
variant: "bodyText", "OBJECTIVE",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
], ],
), ),
), ),
@ -343,7 +357,7 @@ class StepsWidget extends StatelessWidget {
top: index == 2 ? 15 : 30, top: index == 2 ? 15 : 30,
right: MediaQuery.of(context).size.width * 0.52, right: MediaQuery.of(context).size.width * 0.52,
child: InkWell( child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(3) : null, onTap: () => index >= 3 ? changeCurrentTab(2) : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -383,10 +397,11 @@ class StepsWidget extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.only(right: 2), padding: const EdgeInsets.only(right: 2),
child: Texts('ASSESSMENT', child: AppText(
variant: "bodyText", "ASSESSMENT",
bold: true, fontWeight: FontWeight.bold,
color: Colors.black), fontSize: 14,
),
), ),
], ],
), ),
@ -433,10 +448,14 @@ class StepsWidget extends StatelessWidget {
SizedBox( SizedBox(
height: index == 3 ? 5 : 10, height: index == 3 ? 5 : 10,
), ),
Texts('PLAN', Container(
variant: "bodyText", margin: EdgeInsets.only(right:index == 3? 15:0),
bold: true, child: AppText(
color: Colors.black), "PLAN",
fontWeight: FontWeight.bold,
fontSize: 14,
),
),
], ],
), ),
), ),

@ -7,11 +7,11 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_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_chief_complaint_request_model.dart';
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/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/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_allergies_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_history_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_history_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective/add_medication_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
@ -24,9 +24,15 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class SubjectivePage extends StatefulWidget { class SubjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final List<MySelectedAllergy> myAllergiesList; final List<MySelectedAllergy> myAllergiesList;
final List<MasterKeyModel> myHistoryList ; final List<MasterKeyModel> myHistoryList;
final PatiantInformtion patientInfo;
SubjectivePage({Key key, this.changePageViewIndex, this.myAllergiesList, this.myHistoryList}); SubjectivePage(
{Key key,
this.changePageViewIndex,
this.myAllergiesList,
this.myHistoryList,
this.patientInfo});
@override @override
_SubjectivePageState createState() => _SubjectivePageState(); _SubjectivePageState createState() => _SubjectivePageState();
@ -168,11 +174,6 @@ class _SubjectivePageState extends State<SubjectivePage> {
variant: isHistoryExpand ? "bodyText" : '', variant: isHistoryExpand ? "bodyText" : '',
bold: isHistoryExpand ? true : false, bold: isHistoryExpand ? true : false,
color: Colors.black), color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
], ],
), ),
InkWell( InkWell(
@ -214,11 +215,6 @@ class _SubjectivePageState extends State<SubjectivePage> {
variant: isAllergiesExpand ? "bodyText" : '', variant: isAllergiesExpand ? "bodyText" : '',
bold: isAllergiesExpand ? true : false, bold: isAllergiesExpand ? true : false,
color: Colors.black), color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
], ],
), ),
InkWell( InkWell(
@ -277,14 +273,51 @@ class _SubjectivePageState extends State<SubjectivePage> {
{SOAPViewModel model, {SOAPViewModel model,
List<MySelectedAllergy> myAllergiesList, List<MySelectedAllergy> myAllergiesList,
List<MasterKeyModel> myHistoryList}) async { List<MasterKeyModel> myHistoryList}) async {
formKey.currentState.save();
formKey.currentState.validate();
if(complaintsController.text.isNotEmpty && illnessController.text.isNotEmpty && complaintsController.text.length>25) {
await postChiefComplaint(model: model); await postChiefComplaint(model: model);
if (myHistoryList.length != 0) if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
if (myHistoryList.length != 0) {
await postHistories(model: model, myHistoryList: myHistoryList); await postHistories(model: model, myHistoryList: myHistoryList);
if (myAllergiesList.length != 0) if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
if (myAllergiesList.length != 0) {
await postAllergy(myAllergiesList: myAllergiesList, model: model); await postAllergy(myAllergiesList: myAllergiesList, model: model);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(1);
}
} else {
widget.changePageViewIndex(1);
}
}
} else {
if (myAllergiesList.length != 0) {
await postAllergy(myAllergiesList: myAllergiesList, model: model);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(1); widget.changePageViewIndex(1);
} }
} else {
widget.changePageViewIndex(1);
}
}
}
} else {
helpers.showErrorToast('Please add required field correctly');
}
}
postAllergy( postAllergy(
{List<MySelectedAllergy> myAllergiesList, SOAPViewModel model}) async { {List<MySelectedAllergy> myAllergiesList, SOAPViewModel model}) async {
@ -299,9 +332,9 @@ class _SubjectivePageState extends State<SubjectivePage> {
.add(ListHisProgNotePatientAllergyDiseaseVM( .add(ListHisProgNotePatientAllergyDiseaseVM(
allergyDiseaseId: allergy.selectedAllergy.id, allergyDiseaseId: allergy.selectedAllergy.id,
allergyDiseaseType: allergy.selectedAllergy.typeId, allergyDiseaseType: allergy.selectedAllergy.typeId,
patientMRN: 3120690, patientMRN: widget.patientInfo.patientMRN,
episodeId: 200012117, episodeId: widget.patientInfo.episodeNo,
appointmentNo: 2016054573, appointmentNo: widget.patientInfo.appointmentNo,
severity: allergy.selectedAllergySeverity.id, severity: allergy.selectedAllergySeverity.id,
remarks: allergy.remark, remarks: allergy.remark,
createdBy: 1485, createdBy: 1485,
@ -328,9 +361,9 @@ class _SubjectivePageState extends State<SubjectivePage> {
postHistoriesRequestModel.listMedicalHistoryVM = []; postHistoriesRequestModel.listMedicalHistoryVM = [];
//TODO: make static value dynamic //TODO: make static value dynamic
postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM( postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM(
patientMRN: 3120690, patientMRN: widget.patientInfo.patientMRN,
episodeId: 200012117, episodeId: widget.patientInfo.episodeNo,
appointmentNo: 2016054573, appointmentNo: widget.patientInfo.appointmentNo,
remarks: "", remarks: "",
historyId: history.id, historyId: history.id,
historyType: history.typeId, historyType: history.typeId,
@ -350,11 +383,11 @@ class _SubjectivePageState extends State<SubjectivePage> {
PostChiefComplaintRequestModel postChiefComplaintRequestModel = PostChiefComplaintRequestModel postChiefComplaintRequestModel =
//TODO: make static value dynamic //TODO: make static value dynamic
new PostChiefComplaintRequestModel( new PostChiefComplaintRequestModel(
patientMRN: 3120690, patientMRN: widget.patientInfo.patientMRN,
episodeID: 200012117, episodeID: widget.patientInfo.episodeNo,
appointmentNo: 2016054573, appointmentNo: widget.patientInfo.appointmentNo,
chiefComplaint: complaintsController.text, chiefComplaint: complaintsController.text,
currentMedication: "currentMedication", currentMedication: " currentMedication ",
hopi: illnessController.text, hopi: illnessController.text,
isLactation: false, isLactation: false,
ispregnant: false, ispregnant: false,
@ -362,9 +395,6 @@ class _SubjectivePageState extends State<SubjectivePage> {
await model.postChiefComplaint(postChiefComplaintRequestModel); await model.postChiefComplaint(postChiefComplaintRequestModel);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
}
} }
} }

@ -0,0 +1,92 @@
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class PatientPageHeaderWidget extends StatelessWidget {
final PatiantInformtion patient;
PatientPageHeaderWidget(this.patient);
@override
Widget build(BuildContext context) {
return Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
AvatarWidget(
Icon(
patient.genderDescription == "Male"
? DoctorApp.male
: DoctorApp.female_icon,
size: 70,
color: Colors.white,
),
),
SizedBox(
width: 20,
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 5,
),
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).age,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 20,
),
AppText(
patient.age.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
),
AppText(
"ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
),
],
),
)
],
),
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
SizedBox(
width: 20,
),
],
),
);
}
}

@ -168,7 +168,7 @@ class PatientProfileWidget extends StatelessWidget {
height: 4, height: 4,
), ),
AppText( AppText(
patient.genderDescription, patient.gender.toString() == '1' ? 'Male' : 'Female',
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize: 1.8 * SizeConfig.textMultiplier,
), ),

@ -43,7 +43,8 @@ final double height;
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Dr. ${authProvider.doctorProfile.doctorName}', //TODO change it edit By Jammal
'Dr. ',//${authProvider.doctorProfile.doctorName}',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.5,
color: Colors.white, color: Colors.white,
@ -71,7 +72,9 @@ final double height;
height: 50, height: 50,
width: 60, width: 60,
child: Image.network( child: Image.network(
authProvider.doctorProfile.doctorImageURL, //TODO change it edit By Jammal
'https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__340.jpg'
// authProvider.doctorProfile.doctorImageURL,
// fit: BoxFit.fill, // fit: BoxFit.fill,
), ),
), ),

@ -18,6 +18,7 @@ import 'PatientProfileButton.dart';
*@desc: Profile Medical Info Widget *@desc: Profile Medical Info Widget
*/ */
class ProfileMedicalInfoWidget extends StatelessWidget { class ProfileMedicalInfoWidget extends StatelessWidget {
ProfileMedicalInfoWidget({Key key, this.patient}) : super(key: key); ProfileMedicalInfoWidget({Key key, this.patient}) : super(key: key);
PatiantInformtion patient; PatiantInformtion patient;
@override @override
@ -35,12 +36,19 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine2: "Episode", nameLine2: "Episode",
route: CREATE_EPISODE, route: CREATE_EPISODE,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
PatientProfileButton(
key: key,
patient: patient,
nameLine1: "Update",
nameLine2: "Episode",
route: CREATE_EPISODE,
icon: 'heartbeat.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
nameLine1: TranslationBase.of(context).vital, nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs, nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS, route: PATIENT_VITAL_SIGN,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,

@ -2,16 +2,20 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// ignore: must_be_immutable
class MasterKeyDailog extends StatefulWidget { class MasterKeyDailog extends StatefulWidget {
final List<MasterKeyModel> list; final List<MasterKeyModel> list;
final okText; final okText;
final Function(MasterKeyModel) okFunction; final Function(MasterKeyModel) okFunction;
MasterKeyModel selectedValue; MasterKeyModel selectedValue;
final bool isICD;
MasterKeyDailog( MasterKeyDailog(
{@required this.list, {@required this.list,
@required this.okText, @required this.okText,
@required this.okFunction}); @required this.okFunction,
this.selectedValue,
this.isICD = false});
@override @override
_MasterKeyDailogState createState() => _MasterKeyDailogState(); _MasterKeyDailogState createState() => _MasterKeyDailogState();
@ -62,11 +66,17 @@ class _MasterKeyDailogState extends State<MasterKeyDailog> {
children: [ children: [
...widget.list ...widget.list
.map((item) => RadioListTile( .map((item) => RadioListTile(
title: Text(item.nameEn.toString()), title: Text(
groupValue: widget.selectedValue.id.toString(), '${item.nameEn}' + (widget.isICD ? '/${item.code}' : '')),
value: item.id.toString(), groupValue: widget.isICD
? widget.selectedValue.code.toString()
: widget.selectedValue.id.toString(),
value: widget.isICD ? widget.selectedValue.code.toString() : item
.id.toString(),
activeColor: Colors.blue.shade700, activeColor: Colors.blue.shade700,
selected: item.id.toString() == widget.selectedValue.id.toString(), selected: widget.isICD ? item.code.toString() ==
widget.selectedValue.code.toString() : item.id.toString() ==
widget.selectedValue.id.toString(),
onChanged: (val) { onChanged: (val) {
setState(() { setState(() {
widget.selectedValue = item; widget.selectedValue = item;

@ -63,7 +63,7 @@ packages:
name: build name: build
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.5.2" version: "1.6.0"
build_config: build_config:
dependency: transitive dependency: transitive
description: description:
@ -91,21 +91,21 @@ packages:
name: build_resolvers name: build_resolvers
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.4.4" version: "1.5.1"
build_runner: build_runner:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: build_runner name: build_runner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.9" version: "1.10.11"
build_runner_core: build_runner_core:
dependency: transitive dependency: transitive
description: description:
name: build_runner_core name: build_runner_core
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.1.4" version: "6.1.5"
build_web_compilers: build_web_compilers:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -433,7 +433,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.3-nullsafety.1" version: "0.6.2"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:
@ -552,7 +552,7 @@ packages:
name: percent_indicator name: percent_indicator
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.8" version: "2.1.9"
permission_handler: permission_handler:
dependency: "direct main" dependency: "direct main"
description: description:

Loading…
Cancel
Save