fix obj page

pull/206/head
Elham Rababah 5 years ago
parent 49f7dab008
commit 05e7762533

@ -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.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyM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pdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.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';

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

@ -39,6 +39,7 @@ class PatiantInformtion {
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;
@ -102,7 +103,7 @@ class PatiantInformtion {
this.genderInt, this.genderInt,
this.isSigned, this.isSigned,
this.medicationOrders, this.medicationOrders,
this.nationality, this.nationality,this.patientMRN
}); });
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => factory PatiantInformtion.fromJson(Map<String, dynamic> json) =>
@ -154,6 +155,7 @@ class PatiantInformtion {
isSigned :json['isSigned'], isSigned :json['isSigned'],
medicationOrders :json['medicationOrders'], medicationOrders :json['medicationOrders'],
nationality :json['nationality'], nationality :json['nationality'],
patientMRN :json['patientMRN'],
); );

@ -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';
@ -83,11 +83,16 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
_patientSearchFormValues.DoctorID = doctorProfile.doctorID; _patientSearchFormValues.DoctorID = doctorProfile.doctorID;
_patientSearchFormValues.ClinicID = doctorProfile.clinicID; _patientSearchFormValues.ClinicID = doctorProfile.clinicID;
if ((_patientSearchFormValues.From == "0" ||
Navigator.of(context).pushNamed(PATIENTS, arguments: { _patientSearchFormValues.To == "0") &&
"patientSearchForm": _patientSearchFormValues, _selectedType == "7") {
"selectedType": _selectedType helpers.showErrorToast("Please Choose The Dates");
}); } else {
Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType
});
}
} else { } else {
setState(() { setState(() {
_autoValidate = true; _autoValidate = true;

@ -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,35 +310,34 @@ 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); widget.changePageViewIndex(3);
// } }
// } else { } else {
// helpers.showErrorToast('Please add required field correctly'); helpers.showErrorToast('Please add required field correctly');
// } }
widget.changePageViewIndex(3);
} }
openAssessmentDialog(BuildContext context) { openAssessmentDialog(BuildContext context) {

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

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