Merge branch 'development' into feature-ucaf

# Conflicts:
#	lib/config/localized_values.dart
#	lib/util/translations_delegate_base.dart
merge-requests/246/head
mosazaid 5 years ago
commit 97d05c72c2

@ -132,6 +132,9 @@ 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_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode';
const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies'; const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies';
const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory'; const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory';
const POST_CHIEF_COMPLAINT = const POST_CHIEF_COMPLAINT =

@ -295,7 +295,7 @@ const Map<String, Map<String, String>> localizedValues = {
}, },
'clinicSelect': {'en': "Select Clinic", 'ar': 'اختار عيادة'}, 'clinicSelect': {'en': "Select Clinic", 'ar': 'اختار عيادة'},
'doctorSelect': {'en': "Select Doctor", 'ar': 'اختار طبيب'}, 'doctorSelect': {'en': "Select Doctor", 'ar': 'اختار طبيب'},
"empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الموضوع"}, "empty-message": {"en": "Please enter this field", "ar": "يرجى ادخال هذا الحقل"},
'no-sickleve-applied': { 'no-sickleve-applied': {
'en': "No sick leave applied", 'en': "No sick leave applied",
'ar': 'لم تطبق إجازة مرضية' 'ar': 'لم تطبق إجازة مرضية'
@ -541,6 +541,7 @@ const Map<String, Map<String, String>> localizedValues = {
'physicalSystemExamination': {'en': "Physical/System Examination", 'ar':" الفحص البدني / النظام" }, 'physicalSystemExamination': {'en': "Physical/System Examination", 'ar':" الفحص البدني / النظام" },
'searchExamination': {'en': "Search Examination", 'ar':"فحص البحث" }, 'searchExamination': {'en': "Search Examination", 'ar':"فحص البحث" },
'addExamination': {'en': "Add Examination", 'ar':"اضافه" }, 'addExamination': {'en': "Add Examination", 'ar':"اضافه" },
'doc': {'en': "Doc :", 'ar':" د: " },
'patientNoDetailErrMsg': { 'patientNoDetailErrMsg': {
'en': "There is no detail for this patient", 'en': "There is no detail for this patient",
'ar': "لا توجد تفاصيل لهذا المريض" 'ar': "لا توجد تفاصيل لهذا المريض"

@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetHistoryResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetHistoryResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamListResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamListResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
@ -31,6 +32,7 @@ class SOAPService extends LookupService {
List<GetGetProgressNoteResModel> patientProgressNoteList = []; List<GetGetProgressNoteResModel> patientProgressNoteList = [];
List<GetAssessmentResModel> patientAssessmentList = []; List<GetAssessmentResModel> patientAssessmentList = [];
int episodeID;
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async { Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
await baseAppClient.post( await baseAppClient.post(
GET_ALLERGIES, GET_ALLERGIES,
@ -48,6 +50,20 @@ class SOAPService extends LookupService {
); );
} }
Future postEpisode(PostEpisodeReqModel postEpisodeReqModel) async {
hasError = false;
await baseAppClient.post(POST_EPISODE,
onSuccess: (dynamic response, int statusCode) {
print("Success");
episodeID = response['EpisodeID'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: postEpisodeReqModel.toJson());
}
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async { Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
hasError = false; hasError = false;

@ -13,6 +13,7 @@ import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetHistoryResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetHistoryResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamListResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamListResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart';
@ -78,6 +79,8 @@ class SOAPViewModel extends BaseViewModel {
List<GetAssessmentResModel> get patientAssessmentList => List<GetAssessmentResModel> get patientAssessmentList =>
_SOAPService.patientAssessmentList; _SOAPService.patientAssessmentList;
int get episodeID =>
_SOAPService.episodeID;
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async { Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
setState(ViewState.Busy); setState(ViewState.Busy);
@ -99,6 +102,17 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future postEpisode(PostEpisodeReqModel postEpisodeReqModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.postEpisode(postEpisodeReqModel);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async { Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _SOAPService.postAllergy(postAllergyRequestModel); await _SOAPService.postAllergy(postAllergyRequestModel);
@ -222,6 +236,7 @@ class SOAPViewModel extends BaseViewModel {
Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async { Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _SOAPService.getPatientAllergy(generalGetReqForSOAP); await _SOAPService.getPatientAllergy(generalGetReqForSOAP);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
@ -231,6 +246,14 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
String getAllergicNames(){
String allergiesString='';
patientAllergiesList.forEach((element) {
allergiesString += element.allergyDiseaseName+' , ';
});
return allergiesString;
}
Future getPatientHistories(GetHistoryReqModel getHistoryReqModel, {bool isFirst = false}) async { Future getPatientHistories(GetHistoryReqModel getHistoryReqModel, {bool isFirst = false}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _SOAPService.getPatientHistories(getHistoryReqModel, isFirst: isFirst); await _SOAPService.getPatientHistories(getHistoryReqModel, isFirst: isFirst);

@ -0,0 +1,28 @@
class PostEpisodeReqModel {
int appointmentNo;
int patientMRN;
int doctorID;
String vidaAuthTokenID;
PostEpisodeReqModel(
{this.appointmentNo,
this.patientMRN,
this.doctorID,
this.vidaAuthTokenID});
PostEpisodeReqModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo'];
patientMRN = json['PatientMRN'];
doctorID = json['DoctorID'];
vidaAuthTokenID = json['VidaAuthTokenID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AppointmentNo'] = this.appointmentNo;
data['PatientMRN'] = this.patientMRN;
data['DoctorID'] = this.doctorID;
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
return data;
}
}

@ -9,9 +9,11 @@ import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/hospital_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/hospital_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart';
import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart';
import 'package:doctor_app_flutter/util/date-utils.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';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -77,6 +79,25 @@ class _DashboardScreenState extends State<DashboardScreen> {
if (!currentFocus.hasPrimaryFocus) { if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus(); currentFocus.unfocus();
} }
var _patientSearchFormValues = PatientModel(
FirstName: "0",
MiddleName: "0",
LastName: "0",
PatientMobileNumber: "0",
PatientIdentificationID: "0",
PatientID: 0,
From: DateUtils.convertDateToFormat(DateTime. now(), 'yyyy-MM-dd').toString(),
To: DateUtils.convertDateToFormat(DateTime. now(), 'yyyy-MM-dd').toString(),
LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11",
VersionID: 1.2,
Channel: 9,
TokenID: "2Fi7HoIHB0eDyekVa6tCJg==",
SessionID: "5G0yXn0Jnq",
IsLoginForDoctorApp: true,
PatientOutSA: false);
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getDashboard(), onModelReady: (model) => model.getDashboard(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -957,6 +978,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
height: 20, height: 20,
), ),
Row( Row(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
DashboardItem( DashboardItem(
child: Column( child: Column(
@ -984,6 +1007,30 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
); );
}, },
),
SizedBox(width: 8,),
DashboardItem(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Icon(
DoctorApp.patient,
size: 50,
),
AppText(
TranslationBase.of(context).arrived,
color: Colors.black,
textAlign: TextAlign.center,
)
],
),
hasBorder: true,
onTap: () {
Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues,
"selectedType": "7"
});
},
) )
], ],
), ),

@ -68,21 +68,9 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
try { try {
/* 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);
String token = await sharedPref.getString(TOKEN);
_patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID = doctorProfile.projectID; //15
_patientSearchFormValues.DoctorID = doctorProfile.doctorID;
_patientSearchFormValues.ClinicID = doctorProfile.clinicID;*/
if ((_patientSearchFormValues.From == "0" || if ((_patientSearchFormValues.From == "0" ||
_patientSearchFormValues.To == "0") && _patientSearchFormValues.To == "0") &&
_selectedType == "7") { _selectedType == "7") {

@ -274,7 +274,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
.then((res) { .then((res) {
setState(() { setState(() {
_isLoading = false; _isLoading = false;
if (res['MessageStatus'] == 1) {
if (res != null && res['MessageStatus'] == 1) {
if (val2 == 7) { if (val2 == 7) {
if (res[SERVICES_PATIANT2[val2]] == null) { if (res[SERVICES_PATIANT2[val2]] == null) {
_isError = true; _isError = true;
@ -282,6 +283,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
this.error = error.toString(); this.error = error.toString();
} else { } else {
var localList = []; var localList = [];
if(res["patientArrivalList"]["entityList"] == null){
res["patientArrivalList"]["entityList"] = [];
}
res["patientArrivalList"]["entityList"].forEach((v) { res["patientArrivalList"]["entityList"].forEach((v) {
Map<String, dynamic> mergedPatient = { Map<String, dynamic> mergedPatient = {
...v, ...v,
@ -289,7 +293,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
}; };
localList.add(mergedPatient); localList.add(mergedPatient);
}); });
print(localList.toString());
lItems = localList; lItems = localList;
} }
} else { } else {
@ -301,7 +304,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
_isError = false; _isError = false;
} else { } else {
_isError = true; _isError = true;
error = res['ErrorEndUserMessage'] ?? res['ErrorMessage']; error = model.error; //res['ErrorEndUserMessage'] ?? res['ErrorMessage'];
} }
}); });
}).catchError((error) { }).catchError((error) {

@ -558,6 +558,7 @@ class TranslationBase {
String get physicalSystemExamination => localizedValues['physicalSystemExamination'][locale.languageCode]; String get physicalSystemExamination => localizedValues['physicalSystemExamination'][locale.languageCode];
String get searchExamination => localizedValues['searchExamination'][locale.languageCode]; String get searchExamination => localizedValues['searchExamination'][locale.languageCode];
String get addExamination => localizedValues['addExamination'][locale.languageCode]; String get addExamination => localizedValues['addExamination'][locale.languageCode];
String get doc => localizedValues['doc'][locale.languageCode];
String get patientNoDetailErrMsg => localizedValues['patientNoDetailErrMsg'][locale.languageCode]; String get patientNoDetailErrMsg => localizedValues['patientNoDetailErrMsg'][locale.languageCode];
} }

@ -59,22 +59,49 @@ class _DynamicElementsState extends State<DynamicElements> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery
.of(context)
.size;
InputDecoration textFieldSelectorDecoration({String hintText,
String selectedText, bool isDropDown,IconData icon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null,
hintStyle: TextStyle(
fontSize: 14,
color: Colors.grey.shade600,
),
)
;
}
return LayoutBuilder( return LayoutBuilder(
builder: (ctx, constraints) { builder: (ctx, constraints) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox(
height: 10,
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppTextFormField( AppTextFormField(
textInputType: TextInputType.number, onTap: ()=> _presentDatePicker('_selectedFromDate'),
hintText: TranslationBase.of(context).fromDate, hintText: TranslationBase.of(context).fromDate,
controller: _fromDateController, controller: _fromDateController,
inputFormatter: ONLY_DATE, inputFormatter: ONLY_DATE,
onTap: () {
_presentDatePicker('_selectedFromDate');
},
onSaved: (value) { onSaved: (value) {
if (_fromDateController.text.toString().trim().isEmpty) { if (_fromDateController.text.toString().trim().isEmpty) {
widget._patientSearchFormValues.From = "0"; widget._patientSearchFormValues.From = "0";
@ -82,12 +109,14 @@ class _DynamicElementsState extends State<DynamicElements> {
widget._patientSearchFormValues.From = _fromDateController.text.replaceAll("/", "-"); widget._patientSearchFormValues.From = _fromDateController.text.replaceAll("/", "-");
} }
}, },
readOnly: true,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppTextFormField( AppTextFormField(
textInputType: TextInputType.number, readOnly: true,
hintText: TranslationBase hintText: TranslationBase
.of(context) .of(context)
.toDate, .toDate,

@ -1,92 +1,109 @@
import 'package:doctor_app_flutter/core/viewModel/SOAP_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/SOAP/GeneralGetReqForSOAP.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class PatientPageHeaderWidget extends StatelessWidget { class PatientPageHeaderWidget extends StatelessWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
PatientPageHeaderWidget(this.patient); PatientPageHeaderWidget(this.patient);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return BaseView<SOAPViewModel>(
child: Column( onModelReady: (model) async {
mainAxisAlignment: MainAxisAlignment.start, GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
children: [ patientMRN: patient.patientMRN,
Padding( episodeId: patient.episodeNo,
padding: const EdgeInsets.all(8.0), appointmentNo: patient.appointmentNo,
child: Row( doctorID: '',
crossAxisAlignment: CrossAxisAlignment.start, editedBy: '');
mainAxisSize: MainAxisSize.min, await model.getPatientAllergy(generalGetReqForSOAP);
children: <Widget>[
AvatarWidget( },
Icon( builder: (_, model, w) => Container(
patient.genderDescription == "Male" child: Column(
? DoctorApp.male mainAxisAlignment: MainAxisAlignment.start,
: DoctorApp.female_icon, children: [
size: 70, Padding(
color: Colors.white, padding: const EdgeInsets.all(8.0),
), child: Row(
), crossAxisAlignment: CrossAxisAlignment.start,
SizedBox( mainAxisSize: MainAxisSize.min,
width: 20, children: <Widget>[
), AvatarWidget(
Expanded( Icon(
child: Column( patient.genderDescription == "Male"
crossAxisAlignment: CrossAxisAlignment.start, ? DoctorApp.male
mainAxisAlignment: MainAxisAlignment.start, : DoctorApp.female_icon,
children: [ size: 70,
SizedBox( color: Colors.white,
height: 5,
),
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).age,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 20,
), ),
AppText( ),
patient.age.toString(), SizedBox(
color: Colors.black, width: 20,
fontWeight: FontWeight.normal, ),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 5,
),
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).age,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 20,
),
AppText(
patient.age.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
),
NetworkBaseView(
baseViewModel: model,
child: model.patientAllergiesList.isNotEmpty ?AppText(
"ALLERGIC TO: "+model.getAllergicNames(),
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
) : AppText(''),
),
],
), ),
], )
), ],
AppText( ),
"ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE", ),
color: Color(0xFFB9382C), Container(
fontWeight: FontWeight.bold, width: double.infinity,
), height: 1,
], color: Color(0xffCCCCCC),
),
SizedBox(
width: 20,
), ),
) ],
], ),
), ));
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
SizedBox(
width: 20,
),
],
),
);
} }
} }

@ -1,7 +1,13 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.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/routes.dart'; import 'package:doctor_app_flutter/routes.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/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -22,26 +28,46 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
String patientType; String patientType;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SliverGrid.count( return BaseView<SOAPViewModel>(
onModelReady: (model) async {},
builder: (_, model, w) => SliverGrid.count(
crossAxisSpacing: 10, crossAxisSpacing: 10,
mainAxisSpacing: 20, mainAxisSpacing: 20,
crossAxisCount: 2, crossAxisCount: 2,
childAspectRatio: 1.5, childAspectRatio: 1.5,
children: [ children: [
if (int.parse(patientType) == 7)
PatientProfileButton(
key: key,
patient: patient,
isDisable: patient.episodeNo != 0 ? true : false,
nameLine1: TranslationBase.of(context).createNew,
nameLine2: TranslationBase.of(context).episode,
route: CREATE_EPISODE,
onTap: () async {
PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(
appointmentNo: patient.appointmentNo,
patientMRN: patient.patientMRN);
await model.postEpisode(postEpisodeReqModel);
patient.episodeNo = model.episodeID;
Navigator.of(context).pushNamed(CREATE_EPISODE, arguments: {'patient': patient});
},
isLoading: model.state == ViewState.BusyLocal,
icon: 'create-episod.png'
),
if(int.parse(patientType) ==7) if(int.parse(patientType) ==7)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
nameLine1: TranslationBase.of(context).createNew, isDisable: patient.episodeNo == 0 ? true : false,
nameLine2: TranslationBase.of(context).episode, nameLine1: TranslationBase
route: CREATE_EPISODE, .of(context)
icon: 'create-episod.png'), .update,
if(int.parse(patientType) ==7) nameLine2: TranslationBase
PatientProfileButton( .of(context)
key: key, .episode,
patient: patient,
nameLine1: TranslationBase.of(context).update,
nameLine2: TranslationBase.of(context).episode,
route: UPDATE_EPISODE, route: UPDATE_EPISODE,
icon: 'modilfy-episode.png'), icon: 'modilfy-episode.png'),
PatientProfileButton( PatientProfileButton(
@ -67,7 +93,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).previewHealth, nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport, nameLine2: TranslationBase.of(context).summaryReport,
icon: 'radiology-1.png'), icon: 'radiology-1.png'),
if (selectedPatientType != 0 && selectedPatientType != 5) if (selectedPatientType != 0 && selectedPatientType != 5 && selectedPatientType != 7)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -145,7 +171,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
.of(context) .of(context)
.ucaf, .ucaf,
icon: 'lab.png'), icon: 'lab.png'),
]); ],),);
} }
} }
@ -205,20 +231,25 @@ class PatientProfileButton extends StatelessWidget {
final dynamic route; final dynamic route;
final PatiantInformtion patient; final PatiantInformtion patient;
final String url = "assets/images/"; final String url = "assets/images/";
PatientProfileButton( final bool isDisable;
{Key key, final bool isLoading;
this.patient, final Function onTap;
this.nameLine1,
this.nameLine2,
this.icon, PatientProfileButton({Key key,
this.route}) this.patient,
this.nameLine1,
this.nameLine2,
this.icon,
this.route, this.isDisable = false, this.onTap, this.isLoading = false})
: super(key: key); : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Container( return new Container(
margin: new EdgeInsets.symmetric(horizontal: 4.0), margin: new EdgeInsets.symmetric(horizontal: 4.0),
child: InkWell( child: InkWell(
onTap: () { onTap: isDisable?null:onTap != null ? onTap : () {
navigator(context, this.route); navigator(context, this.route);
}, },
child: Column(children: <Widget>[ child: Column(children: <Widget>[
@ -242,6 +273,8 @@ class PatientProfileButton extends StatelessWidget {
textAlign: TextAlign.left, textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 2,
), ),
if(isLoading)
DrAppCircularProgressIndeicator()
], ],
), ),
), ),
@ -260,7 +293,7 @@ class PatientProfileButton extends StatelessWidget {
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
// border: Border.all(), // border: Border.all(),
color: Colors.white, color: isDisable ? Colors.grey.withOpacity(0.4) : Colors.white,
borderRadius: BorderRadius.all(Radius.circular(10)), borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border.fromBorderSide(BorderSide( border: Border.fromBorderSide(BorderSide(
color: Color(0xffBBBBBB), color: Color(0xffBBBBBB),

@ -41,7 +41,6 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
bool isAssessmentExpand = false; bool isAssessmentExpand = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async{ onModelReady: (model) async{
@ -152,12 +151,10 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
model: model); model: model);
}, },
readOnly: true, readOnly: true,
// hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline, suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal suffixIconColor: AppGlobal
.appPrimaryColor, .appPrimaryColor,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// controller: messageController,
validator: (value) { validator: (value) {
if (value == null) if (value == null)
return TranslationBase return TranslationBase
@ -217,7 +214,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
"Appointment #: ", TranslationBase.of(context).appointmentNo,
fontWeight: FontWeight fontWeight: FontWeight
.bold, .bold,
fontSize: 16, fontSize: 16,
@ -250,7 +247,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
"Type : ", TranslationBase.of(context).type +':',
fontWeight: FontWeight fontWeight: FontWeight
.bold, .bold,
fontSize: 16, fontSize: 16,
@ -270,7 +267,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
"Doc : ", TranslationBase.of(context).doc,
fontWeight: FontWeight fontWeight: FontWeight
.bold, .bold,
fontSize: 16, fontSize: 16,
@ -671,7 +668,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
height: 10, height: 10,
), ),
AppButton( AppButton(
title: "Add".toUpperCase(), title: (widget.isUpdate?TranslationBase.of(context).update:TranslationBase.of(context).add).toUpperCase(),
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
widget.mySelectedAssessment.remark = widget.mySelectedAssessment.remark =

@ -397,10 +397,10 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
widget.changePageViewIndex(2); widget.changePageViewIndex(2);
} }
} else { } else {
helpers.showErrorToast(TranslationBase.of(context).requiredMsg); widget.changePageViewIndex(2);
}
widget.changePageViewIndex(2); // helpers.showErrorToast(TranslationBase.of(context).requiredMsg);
}
} }
removeExamination(MasterKeyModel masterKey) { removeExamination(MasterKeyModel masterKey) {

@ -51,8 +51,6 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel = GetGetProgressNoteReqModel getGetProgressNoteReqModel =
@ -287,13 +285,13 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: widget.patientInfo.appointmentNo,
planNote: progressNoteController.text, doctorID: '', editedBy: ''); planNote: progressNoteController.text, doctorID: '', editedBy: '');
// if(model.patientProgressNoteList.isEmpty){ if(model.patientProgressNoteList.isEmpty){
await model.postProgressNote(postProgressNoteRequestModel); await model.postProgressNote(postProgressNoteRequestModel);
// }else { }else {
// await model.patchProgressNote(postProgressNoteRequestModel); await model.patchProgressNote(postProgressNoteRequestModel);
//
// } }
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);

@ -4,10 +4,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
// OWNER : Ibrahim albitar
// DATE : 19-04-2020
// DESCRIPTION : Custom Text Form Field for app.
class AppTextFormField extends FormField<String> { class AppTextFormField extends FormField<String> {
AppTextFormField( AppTextFormField(
{FormFieldSetter<String> onSaved, {FormFieldSetter<String> onSaved,
@ -41,6 +37,7 @@ class AppTextFormField extends FormField<String> {
obscureText: obscureText, obscureText: obscureText,
focusNode: focusNode, focusNode: focusNode,
keyboardType: textInputType, keyboardType: textInputType,
readOnly: readOnly,
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow( FilteringTextInputFormatter.allow(
RegExp(inputFormatter)), RegExp(inputFormatter)),

Loading…
Cancel
Save