Merge branch 'development' into feature_admission_request

merge-requests/210/head
mosazaid 5 years ago
commit ae6cd0e5f8

@ -64,7 +64,8 @@ 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'] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU"; body['VidaAuthTokenID'] =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU";
//await sharedPref.getString(VIDA_AUTH_TOKEN_ID); //await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
body['VidaRefreshTokenID'] ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU"; body['VidaRefreshTokenID'] ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU";
//await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); //await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);

@ -123,12 +123,12 @@ const GET_PATIENT_ARRIVAL_LIST =
const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies'; const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies';
const GET_MASTER_LOOKUP_LIST = const GET_MASTER_LOOKUP_LIST =
'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies'; const PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies';
const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory'; const PATCH_HISTORY = 'Services/DoctorApplication.svc/REST/PatchHistory';
const POST_CHIEF_COMPLAINT = const PATCH_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/PostChiefcomplaint'; 'Services/DoctorApplication.svc/REST/PatchChiefcomplaint';
const POST_PHYSICAL_EXAM = const POST_PHYSICAL_EXAM =
'Services/DoctorApplication.svc/REST/PostPhysicalExam'; 'Services/DoctorApplication.svc/REST/PatchPhysicalExam';
const POST_PROGRESS_NOTE = const POST_PROGRESS_NOTE =
'Services/DoctorApplication.svc/REST/PostProgressNote'; 'Services/DoctorApplication.svc/REST/PostProgressNote';
@ -136,7 +136,7 @@ const POST_ASSESSMENT =
'Services/DoctorApplication.svc/REST/PostAssessment'; 'Services/DoctorApplication.svc/REST/PostAssessment';
const GET_CATEGORISE_PROCEDURE = const GET_CATEGORISE_PROCEDURE =
'Services/DoctorApplication.svc/REST/GetCategories'; 'Services/DoctorApplication.svc/REST/GetProcedure';
var selectedPatientType = 1; var selectedPatientType = 1;
@ -158,7 +158,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",
@ -168,7 +169,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 = [
"المريض الخارجي", "المريض الخارجي",
@ -178,7 +179,7 @@ var SERVICES_PATIANT_HEADER_AR = [
"المريض المحال المعافى", "المريض المحال المعافى",
"مريض الغد", "مريض الغد",
"المريض المحول مني", "المريض المحول مني",
"وصل المريض" "المريض الواصل"
]; ];
//****************** //******************

@ -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'];

@ -1,18 +1,90 @@
class CategoriseProcedureModel { class CategoriseProcedureModel {
String categoryID; List<EntityList> entityList;
String categoryName; int rowcount;
dynamic statusMessage;
CategoriseProcedureModel({this.categoryID, this.categoryName}); CategoriseProcedureModel(
{this.entityList, this.rowcount, this.statusMessage});
CategoriseProcedureModel.fromJson(Map<String, dynamic> json) { CategoriseProcedureModel.fromJson(Map<String, dynamic> json) {
categoryID = json['CategoryID']; if (json['entityList'] != null) {
categoryName = json['CategoryName']; 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() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['CategoryID'] = this.categoryID; data['allowedClinic'] = this.allowedClinic;
data['CategoryName'] = this.categoryName; 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; return data;
} }
} }

@ -31,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) {
@ -43,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) {
@ -55,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) {

@ -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,19 +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( await baseAppClient.post(
GET_CATEGORISE_PROCEDURE, 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: postProcedureReqModel.toJson(),
); );
} }
} }

@ -13,11 +13,6 @@ class ProcedureService extends BaseService {
List<CategoriseProcedureModel> get categoriesList => _categoriesList; List<CategoriseProcedureModel> get categoriesList => _categoriesList;
List<Procedures> procedureslist = List(); List<Procedures> procedureslist = List();
Procedures t1 = Procedures(
category: '02',
procedure: '02011002',
);
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel( GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
clinicId: 0, clinicId: 0,
pageSize: 10, pageSize: 10,
@ -29,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;
@ -47,17 +51,14 @@ class ProcedureService extends BaseService {
Future getCategories() async { Future getCategories() async {
hasError = false; hasError = false;
_categoriesList.clear(); _categoriesList.clear();
await baseAppClient.post( await baseAppClient.post(GET_CATEGORISE_PROCEDURE,
GET_CATEGORISE_PROCEDURE,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_categoriesList _categoriesList
.add(CategoriseProcedureModel.fromJson(response['listCategories'])); .add(CategoriseProcedureModel.fromJson(response['ProcedureList']));
}, }, onFailure: (String error, int statusCode) {
onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, }, body: _getProcedureCategoriseReqModel.toJson());
);
} }
Future postProcedure(PostProcedureReqModel postProcedureReqModel) async { Future postProcedure(PostProcedureReqModel postProcedureReqModel) async {

@ -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);

@ -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,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;
}
}

@ -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,39 +65,34 @@ 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);
//===================== DoctorProfileModel doctorProfile =
// new DoctorProfileModel.fromJson(profile);
// Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
// DoctorProfileModel doctorProfile =
// new DoctorProfileModel.fromJson(profile);
if (_formKey.currentState.validate()) { if (_formKey.currentState.validate()) {
_formKey.currentState.save(); _formKey.currentState.save();
// sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType); sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType);
// print('************_selectedType*************'); String token = await sharedPref.getString(TOKEN);
// print('_selectedType${_selectedType}');
// String token = await sharedPref.getString(TOKEN);
//
// _patientSearchFormValues.TokenID = token;
// _patientSearchFormValues.ProjectID = doctorProfile.projectID; //15
// _patientSearchFormValues.DoctorID = doctorProfile.doctorID;
// _patientSearchFormValues.ClinicID = doctorProfile.clinicID;
// //=====================
// // _patientSearchFormValues.
// //=====================
//
// print("=============doctorProfile.clinicID=" +
// doctorProfile.clinicID.toString());
_patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID = doctorProfile.projectID; //15
_patientSearchFormValues.DoctorID = doctorProfile.doctorID;
_patientSearchFormValues.ClinicID = doctorProfile.clinicID;
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,23 +258,52 @@ 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;

@ -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');
}
}

@ -111,7 +111,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
InkWell( InkWell(
onTap: () { onTap: () {
addPrescriptionForm(context); addPrescriptionForm(context);
model.postPrescription(); //model.postPrescription();
}, },
child: CircleAvatar( child: CircleAvatar(
radius: 65, radius: 65,
@ -195,7 +195,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
), ),
onTap: () { onTap: () {
addPrescriptionForm(context); addPrescriptionForm(context);
model.postPrescription(); //model.postPrescription();
}, },
), ),
SizedBox( SizedBox(

@ -414,10 +414,12 @@ void addSelectedProcedure(context) {
context: context, context: context,
builder: (BuildContext bc) { builder: (BuildContext bc) {
return BaseView( return BaseView(
//onModelReady: (model) => model.getCategories(), onModelReady: (model) => model.getCategories(),
builder: builder:
(BuildContext context, ProcedureViewModel model, Widget child) => (BuildContext context, ProcedureViewModel model, Widget child) =>
SingleChildScrollView( NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: Container( child: Container(
height: 490, height: 490,
child: Padding( child: Padding(
@ -429,9 +431,22 @@ void addSelectedProcedure(context) {
'Select Procedure'.toUpperCase(), 'Select Procedure'.toUpperCase(),
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
), ),
// Text(model.categoriesList[0].categoryName), 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,
@ -443,7 +458,8 @@ 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,
@ -451,7 +467,7 @@ void addSelectedProcedure(context) {
), ),
), ),
SizedBox( SizedBox(
height: 280.0, height: 80.0,
), ),
Container( Container(
margin: margin:
@ -477,6 +493,7 @@ void addSelectedProcedure(context) {
), ),
), ),
), ),
),
); );
}); });
} }

@ -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];

@ -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';
@ -12,14 +11,10 @@ import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/objective_page.
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/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.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 {
@ -96,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,
)
], ],
), ),
), ),

@ -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_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/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';
@ -23,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();
@ -308,36 +310,35 @@ class _AssessmentPageState extends State<AssessmentPage> {
} }
submitAssessment(SOAPViewModel model) async { submitAssessment(SOAPViewModel model) async {
// if (widget.mySelectedAssessment.selectedDiagnosisCondition != null && if (widget.mySelectedAssessment.selectedDiagnosisCondition != null &&
// widget.mySelectedAssessment.selectedDiagnosisType != null) { widget.mySelectedAssessment.selectedDiagnosisType != null) {
// PostAssessmentRequestModel postAssessmentRequestModel = PostAssessmentRequestModel postAssessmentRequestModel =
// new PostAssessmentRequestModel( new PostAssessmentRequestModel(
// patientMRN: 3120690, patientMRN: widget.patientInfo.patientMRN,
// episodeId: 200012117, episodeId: widget.patientInfo.episodeNo,
// appointmentNo: 2016054573, appointmentNo: widget.patientInfo.appointmentNo,
// icdCodeDetails: [ icdCodeDetails: [
// new IcdCodeDetails( new IcdCodeDetails(
// remarks: widget.mySelectedAssessment.remark, remarks: widget.mySelectedAssessment.remark,
// complexDiagnosis: true, complexDiagnosis: true,
// conditionId: conditionId:
// widget.mySelectedAssessment.selectedDiagnosisCondition.id, widget.mySelectedAssessment.selectedDiagnosisCondition.id,
// diagnosisTypeId: diagnosisTypeId:
// widget.mySelectedAssessment.selectedDiagnosisType.id, widget.mySelectedAssessment.selectedDiagnosisType.id,
// icdcode10Id: "1") icdcode10Id: "1")
// ]); ]);
//
// await model.postAssessment(postAssessmentRequestModel); await model.postAssessment(postAssessmentRequestModel);
//
// if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
// helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
// } else { } else {
// widget.changePageViewIndex(3);
// }
// } else {
// helpers.showErrorToast('Please add required field correctly');
// }
widget.changePageViewIndex(3); widget.changePageViewIndex(3);
} }
} else {
helpers.showErrorToast('Please add required field correctly');
}
}
openAssessmentDialog(BuildContext context) { openAssessmentDialog(BuildContext context) {
showModalBottomSheet( showModalBottomSheet(
@ -416,9 +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) { // if (model.listOfICD10.length == 0) {
await model.getMasterLookup(MasterKeysService.ICD10); // await model.getMasterLookup(MasterKeysService.ICD10);
} // }
}, },
builder: (_, model, w) => builder: (_, model, w) =>
AppScaffold( AppScaffold(
@ -468,11 +469,11 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
Container( Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,
child: InkWell( child: InkWell(
onTap: model.listOfICD10 != null onTap: model.listOfDiagnosisType != null
? () { ? () {
MasterKeyDailog dialog = MasterKeyDailog( MasterKeyDailog dialog = MasterKeyDailog(
isICD: true, isICD: true,
list: model.listOfICD10, list: model.listOfDiagnosisType,
selectedValue: widget selectedValue: widget
.mySelectedAssessment .mySelectedAssessment
.selectedICD, .selectedICD,

@ -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();
@ -320,48 +321,43 @@ class _ObjectivePageState extends State<ObjectivePage> {
} }
submitObjectivePage(SOAPViewModel model) async { submitObjectivePage(SOAPViewModel model) async {
// if(widget.mySelectedExamination.isNotEmpty){ if(widget.mySelectedExamination.isNotEmpty){
// PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel(); PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
// widget.mySelectedExamination.forEach((exam) { widget.mySelectedExamination.forEach((exam) {
// if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
// null) null)
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = []; postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
//
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
// ListHisProgNotePhysicalExaminationVM(
// patientMRN: 3120690,
// episodeId: 200012117,
// appointmentNo: 2016054573,
// remarks: exam.remark ?? '',
// createdBy: 1485,
// createdOn: DateTime.now().toIso8601String(),
// editedBy: 1485,
// editedOn: DateTime.now().toIso8601String(),
// examId: exam.selectedExamination.id,
// examType: exam.selectedExamination.typeId,
// isAbnormal: exam.isAbnormal,
// isNormal: exam.isNormal,
// masterDescription: exam.selectedExamination,
// notExamined: false
//
// ));
// });
//
// await model.postPhysicalExam(postPhysicalExamRequestModel);
//
// if (model.state == ViewState.ErrorLocal) {
// helpers.showErrorToast(model.error);
// } else {
// widget.changePageViewIndex(2);
// }
// } else {
// helpers.showErrorToast('Please add required field correctly');
// }
widget.changePageViewIndex(2); postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
ListHisProgNotePhysicalExaminationVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: exam.remark ?? '',
createdBy: 1485,
createdOn: DateTime.now().toIso8601String(),
editedBy: 1485,
editedOn: DateTime.now().toIso8601String(),
examId: exam.selectedExamination.id,
examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal,
masterDescription: exam.selectedExamination,
notExamined: false
));
});
await model.postPhysicalExam(postPhysicalExamRequestModel);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(2);
}
} else {
helpers.showErrorToast('Please add required field correctly');
}
} }
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);

@ -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';
@ -25,8 +25,14 @@ 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();
@ -270,44 +276,46 @@ class _SubjectivePageState extends State<SubjectivePage> {
formKey.currentState.save(); formKey.currentState.save();
formKey.currentState.validate(); formKey.currentState.validate();
if(complaintsController.text.isNotEmpty && illnessController.text.isNotEmpty && complaintsController.text.length>25) {
await postChiefComplaint(model: model);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
if (myHistoryList.length != 0) {
await postHistories(model: model, myHistoryList: myHistoryList);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
if (myAllergiesList.length != 0) {
await postAllergy(myAllergiesList: myAllergiesList, model: model);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(1);
}
} else {
widget.changePageViewIndex(1); widget.changePageViewIndex(1);
// if(complaintsController.text.isNotEmpty && illnessController.text.isNotEmpty && complaintsController.text.length>25) { }
// await postChiefComplaint(model: model);
// if (model.state == ViewState.ErrorLocal) { }
// helpers.showErrorToast(model.error); } else {
// } else { if (myAllergiesList.length != 0) {
// if (myHistoryList.length != 0) { await postAllergy(myAllergiesList: myAllergiesList, model: model);
// await postHistories(model: model, myHistoryList: myHistoryList); if (model.state == ViewState.ErrorLocal) {
// if (model.state == ViewState.ErrorLocal) { helpers.showErrorToast(model.error);
// helpers.showErrorToast(model.error); } else {
// } else { widget.changePageViewIndex(1);
// if (myAllergiesList.length != 0) { }
// await postAllergy(myAllergiesList: myAllergiesList, model: model); } else {
// if (model.state == ViewState.ErrorLocal) { widget.changePageViewIndex(1);
// helpers.showErrorToast(model.error); }
// } else { }
// widget.changePageViewIndex(1); }
// } } else {
// } helpers.showErrorToast('Please add required field correctly');
// }
// }
// } else {
// if (myAllergiesList.length != 0) {
// await postAllergy(myAllergiesList: myAllergiesList, model: model);
// if (model.state == ViewState.ErrorLocal) {
// helpers.showErrorToast(model.error);
// } else {
// widget.changePageViewIndex(1);
// }
// } else {
// widget.changePageViewIndex(1);
// }
// }
// }
// } else {
// helpers.showErrorToast('Please add required field correctly');
// }
} }
@ -324,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,
@ -353,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,
@ -375,9 +383,9 @@ 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,

@ -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,
), ),

Loading…
Cancel
Save