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

merge-requests/837/head
Elham Rababh 4 years ago
commit 28140b6ca4

@ -42,6 +42,7 @@ const Map<String, Map<String, String>> localizedValues = {
"referral": {"en": "Referral", "ar": "الإحالة"}, "referral": {"en": "Referral", "ar": "الإحالة"},
"inPatient": {"en": "InPatients", "ar": "مرضاي"}, "inPatient": {"en": "InPatients", "ar": "مرضاي"},
"myInPatient": {"en": "My\nInPatients", "ar": "مرضاي\nالمنومين"}, "myInPatient": {"en": "My\nInPatients", "ar": "مرضاي\nالمنومين"},
"myInPatientTitle": {"en": "My InPatients", "ar": "مرضاي المنومين"},
"inPatientLabel": {"en": "InPatients", "ar": "المريض المنوم"}, "inPatientLabel": {"en": "InPatients", "ar": "المريض المنوم"},
"inPatientAll": {"en": "All InPatients", "ar": "جميع المرضى المنومين"}, "inPatientAll": {"en": "All InPatients", "ar": "جميع المرضى المنومين"},
"operations": {"en": "Operations", "ar": "عمليات"}, "operations": {"en": "Operations", "ar": "عمليات"},

@ -194,7 +194,7 @@ class PrescriptionsService extends BaseService {
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
admissionNo: int.parse(patient.admissionNo), admissionNo: int.parse(patient.admissionNo),
tokenID: "@dm!n", tokenID: "@dm!n",
projectID: 15, projectID: patient.projectId,
); );
await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT, patient: patient, await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT, patient: patient,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -460,7 +460,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
if (authMethodType == AuthMethodTypes.SMS || if (authMethodType == AuthMethodTypes.SMS ||
authMethodType == AuthMethodTypes.WhatsApp) { authMethodType == AuthMethodTypes.WhatsApp) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
this.startSMSService(authMethodType); this.startSMSService(authMethodType,isSilentLogin: true);
} else { } else {
checkActivationCode(isSilentLogin: true); checkActivationCode(isSilentLogin: true);
} }
@ -503,7 +503,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
} }
} }
startSMSService(AuthMethodTypes type) { startSMSService(AuthMethodTypes type,{isSilentLogin: false}) {
new SMSOTP( new SMSOTP(
context, context,
type, type,
@ -515,7 +515,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
return AppLoaderWidget(); return AppLoaderWidget();
}); });
this.checkActivationCode(value: value,isSilentLogin: false); this.checkActivationCode(value: value,isSilentLogin: isSilentLogin);
}, },
() => () =>
{ {

@ -323,7 +323,11 @@ class _DischargedPatientState extends State<DischargedPatient> {
), ),
], ],
), ),
) ),
Icon(
Icons.arrow_forward,
size: 24,
),
], ],
) )
], ],

@ -0,0 +1,42 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class InPatientHeader extends StatelessWidget with PreferredSizeWidget{
const InPatientHeader() : super();
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
child: Row(children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
Expanded(
child: AppText(
TranslationBase
.of(context)
.inPatient,
fontSize: SizeConfig.textMultiplier * 2.8,
fontWeight: FontWeight.bold,
color: Color(0xFF2B353E),
),
),
]),
),
);
}
@override
Size get preferredSize => Size(double.maxFinite,85);
}

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.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/dashboard/get_special_clinical_care_List_Respose_Model.dart'; import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_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/In_patient/InPatientHeader.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -33,7 +34,6 @@ class _InPatientScreenState extends State<InPatientScreen>
int selectedMapId; int selectedMapId;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -55,170 +55,114 @@ class _InPatientScreenState extends State<InPatientScreen>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery final screenSize = MediaQuery.of(context).size;
.of(context)
.size;
PatientSearchRequestModel requestModel = PatientSearchRequestModel(); PatientSearchRequestModel requestModel = PatientSearchRequestModel();
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context); ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context);
return BaseView<PatientSearchViewModel>( return BaseView<PatientSearchViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
model.clearPatientList(); model.clearPatientList();
if (widget.specialClinic != null) { if (widget.specialClinic != null) {
await model.getSpecialClinicalCareMappingList(widget.specialClinic.clinicID); await model
.getSpecialClinicalCareMappingList(widget.specialClinic.clinicID);
requestModel.nursingStationID = requestModel.nursingStationID =
model.specialClinicalCareMappingList[0].nursingStationID; model.specialClinicalCareMappingList[0].nursingStationID;
} }
requestModel.clinicID = 0; requestModel.clinicID = 0;
await model.getInPatientList(requestModel); await model.getInPatientList(requestModel);
}, },
builder: (_, model, w) => builder: (_, model, w) => AppScaffold(
AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: true,
appBar: InPatientHeader(),
body: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( if (model.specialClinicalCareMappingList.isNotEmpty &&
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), widget.specialClinic != null &&
decoration: BoxDecoration( _activeTab != 2)
color: Colors.white, Container(
), width: MediaQuery.of(context).size.width * .3,
child: Container( child: DropdownButtonHideUnderline(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), child: DropdownButton(
margin: EdgeInsets.only(top: 50), dropdownColor: Colors.white,
child: Row(children: [ iconEnabledColor: Colors.black,
IconButton( isExpanded: true,
icon: Icon(Icons.arrow_back_ios), value: selectedMapId == null
color: Colors.black, //Colors.black, ? model.specialClinicalCareMappingList[0].nursingStationID
onPressed: () => Navigator.pop(context), : selectedMapId,
), iconSize: 25,
Expanded( elevation: 16,
child: AppText( selectedItemBuilder: (BuildContext context) {
TranslationBase return model.specialClinicalCareMappingList.map((item) {
.of(context) return Row(
.inPatient, mainAxisSize: MainAxisSize.max,
fontSize: SizeConfig.textMultiplier * 2.8, mainAxisAlignment: MainAxisAlignment.end,
fontWeight: FontWeight.bold, children: <Widget>[
color: Color(0xFF2B353E), Column(
), mainAxisAlignment: MainAxisAlignment.center,
), children: [
if (model.specialClinicalCareMappingList.isNotEmpty && Container(
widget.specialClinic != null && padding: EdgeInsets.all(2),
_activeTab != 2) margin: EdgeInsets.all(2),
Container( decoration: new BoxDecoration(
width: MediaQuery.of(context).size.width * .3, color: Colors.red[800],
child: DropdownButtonHideUnderline( borderRadius: BorderRadius.circular(20),
child: DropdownButton( ),
dropdownColor: Colors.white, constraints: BoxConstraints(
iconEnabledColor: Colors.black, minWidth: 20,
isExpanded: true, minHeight: 20,
value: selectedMapId == null ? model ),
.specialClinicalCareMappingList[0] child: Center(
.nursingStationID : selectedMapId, child: AppText(
iconSize: 25, model
elevation: 16, .specialClinicalCareMappingList.length
selectedItemBuilder: .toString(),
(BuildContext context) { color: Colors.white,
return model fontSize:
.specialClinicalCareMappingList projectsProvider.isArabic ? 10 : 11,
.map((item) { textAlign: TextAlign.center,
return Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.end,
children: <Widget>[
Column(
mainAxisAlignment:
MainAxisAlignment
.center,
children: [
Container(
padding:
EdgeInsets.all(2),
margin:
EdgeInsets.all(2),
decoration:
new BoxDecoration(
color:
Colors.red[800],
borderRadius:
BorderRadius
.circular(
20),
),
constraints:
BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: Center(
child: AppText(
model
.specialClinicalCareMappingList
.length
.toString(),
color:
Colors.white,
fontSize:
projectsProvider
.isArabic
? 10
: 11,
textAlign:
TextAlign
.center,
),
)),
],
), ),
AppText(item.description, )),
fontSize: 12, ],
color: Colors.black, ),
fontWeight: AppText(item.description,
FontWeight.bold, fontSize: 12,
textAlign: TextAlign.end), color: Colors.black,
], fontWeight: FontWeight.bold,
); textAlign: TextAlign.end),
}).toList(); ],
}, );
onChanged: (newValue) async { }).toList();
setState(() { },
selectedMapId = newValue; onChanged: (newValue) async {
}); setState(() {
model.clearPatientList(); selectedMapId = newValue;
GifLoaderDialogUtils.showMyDialog( });
context); model.clearPatientList();
GifLoaderDialogUtils.showMyDialog(context);
PatientSearchRequestModel requestModel = PatientSearchRequestModel( PatientSearchRequestModel requestModel =
nursingStationID: selectedMapId, clinicID: 0); PatientSearchRequestModel(
await model.getInPatientList(requestModel, isLocalBusy: true); nursingStationID: selectedMapId, clinicID: 0);
GifLoaderDialogUtils.hideDialog( await model.getInPatientList(requestModel,
context); isLocalBusy: true);
if (model.state == GifLoaderDialogUtils.hideDialog(context);
ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(model.error);
model.error); }
} },
}, items: model.specialClinicalCareMappingList.map((item) {
items: model return DropdownMenuItem(
.specialClinicalCareMappingList child: AppText(
.map((item) { item.description,
return DropdownMenuItem( textAlign: TextAlign.left,
child: AppText( ),
item.description, value: item.nursingStationID,
textAlign: TextAlign.left, );
), }).toList(),
value: item.nursingStationID, )),
);
}).toList(),
)),
)
]),
), ),
),
Expanded( Expanded(
child: Scaffold( child: Scaffold(
extendBodyBehindAppBar: false, extendBodyBehindAppBar: false,
@ -249,8 +193,8 @@ class _InPatientScreenState extends State<InPatientScreen>
tabWidget(screenSize, _activeTab == 0, tabWidget(screenSize, _activeTab == 0,
TranslationBase.of(context).inPatientAll, TranslationBase.of(context).inPatientAll,
counter: model.inPatientList.length), counter: model.inPatientList.length),
tabWidget( tabWidget(screenSize, _activeTab == 1,
screenSize, _activeTab == 1, TranslationBase.of(context).inPatient, TranslationBase.of(context).myInPatientTitle,
counter: model.myIinPatientList.length), counter: model.myIinPatientList.length),
tabWidget(screenSize, _activeTab == 2, tabWidget(screenSize, _activeTab == 2,
TranslationBase.of(context).discharged), TranslationBase.of(context).discharged),
@ -267,7 +211,7 @@ class _InPatientScreenState extends State<InPatientScreen>
controller: _tabController, controller: _tabController,
children: [ children: [
InPatientListPage(false, model), InPatientListPage(false, model),
InPatientListPage(true,model), InPatientListPage(true, model),
DischargedPatient(), DischargedPatient(),
], ],
), ),

@ -38,6 +38,5 @@ class PatientSearchHeader extends StatelessWidget with PreferredSizeWidget {
} }
@override @override
Size get preferredSize => Size(double.maxFinite,65); Size get preferredSize => Size(double.maxFinite,65);
} }

@ -121,43 +121,6 @@ class LabResultWidget extends StatelessWidget {
(index) => Column( (index) => Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
// child: AppText(
// " (show details)",
// color: Colors.blue,
// fontSize: 12,
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
fontSize: 12,
),
],
),
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -191,20 +154,67 @@ class LabResultWidget extends StatelessWidget {
), ),
), ),
Expanded( Expanded(
child: Container( child: Column(
padding: EdgeInsets.all(10), children: [
color: Colors.white, Container(
child: Center( padding: EdgeInsets.all(10),
child: AppText( color: Colors.white,
patientLabResultList[index].referanceRange, child: Center(
textAlign: TextAlign.center, child: AppText(
isCopyable: true, patientLabResultList[index].referanceRange,
textAlign: TextAlign.center,
isCopyable: true,
),
),
), ),
), SizedBox(
height: 12,
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
// child: AppText(
// " (show details)",
// color: Colors.blue,
// fontSize: 12,
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
fontSize: 12,
),
],
),
)
],
), ),
), ),
], ],
), ),
// SizedBox(
// height: 12,
// ),
Divider(), Divider(),
], ],
)) ))

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrde
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -136,37 +137,44 @@ class _LabsHomePageState extends State<LabsHomePage> {
Radius.circular(8.0), Radius.circular(8.0),
), ),
color: Colors.white), color: Colors.white),
child: Row( child: Stack(
children: [ children: [
Container( Positioned(
width: 20, bottom: 1,
height: 160, top: 1,
decoration: BoxDecoration( left: 1,
color: model.patientLabOrdersList[index].isLiveCareAppointment child: Container(
? Colors.red[900] width: 20,
: !model.patientLabOrdersList[index].isInOutPatient decoration: BoxDecoration(
? Colors.black color: model.patientLabOrdersList[index].isLiveCareAppointment
: Color(0xffa9a089), ? Colors.red[900]
borderRadius: BorderRadius.only( : !model.patientLabOrdersList[index].isInOutPatient
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), ? Colors.black
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), : Color(0xffa9a089),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0), borderRadius: BorderRadius.only(
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)), topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.patientLabOrdersList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !model.patientLabOrdersList[index].isInOutPatient
? TranslationBase.of(context).inPatientLabel.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
), ),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.patientLabOrdersList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !model.patientLabOrdersList[index].isInOutPatient
? TranslationBase.of(context).inPatientLabel.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
), ),
Expanded( Container(
color: Colors.white,
padding: EdgeInsets.all(0),
margin: EdgeInsets.only(left: 20),
child: DoctorCard( child: DoctorCard(
isNoMargin: true, isNoMargin: true,
onTap: () => Navigator.push( onTap: () => Navigator.push(

@ -91,6 +91,7 @@ class TranslationBase {
String get inPatient => localizedValues['inPatient'][locale.languageCode]; String get inPatient => localizedValues['inPatient'][locale.languageCode];
String get myInPatient => localizedValues['myInPatient'][locale.languageCode]; String get myInPatient => localizedValues['myInPatient'][locale.languageCode];
String get myInPatientTitle => localizedValues['myInPatientTitle'][locale.languageCode];
String get inPatientLabel => localizedValues['inPatientLabel'][locale.languageCode]; String get inPatientLabel => localizedValues['inPatientLabel'][locale.languageCode];
String get inPatientAll => localizedValues['inPatientAll'][locale.languageCode]; String get inPatientAll => localizedValues['inPatientAll'][locale.languageCode];

@ -352,9 +352,8 @@ class PatientCard extends StatelessWidget {
), ),
if (patientInfo.admissionDate != null) if (patientInfo.admissionDate != null)
CustomRow( CustomRow(
// TODO Elham* add translation
label: label:
"Clinic Name" + TranslationBase.of(context).clinicName +
" : ", " : ",
value: "${patientInfo.clinicDescription}", value: "${patientInfo.clinicDescription}",
), ),

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -26,7 +25,7 @@ class CardWithBgWidget extends StatelessWidget {
Radius.circular(10.0), Radius.circular(10.0),
), ),
border: Border.all( border: Border.all(
color: hasBorder ? HexColor('#707070') : Colors.transparent, color: hasBorder ? Color(0xFF707070) : Colors.transparent,
width: hasBorder ? 0.30 : 0), width: hasBorder ? 0.30 : 0),
), ),
child: Material( child: Material(
@ -37,8 +36,7 @@ class CardWithBgWidget extends StatelessWidget {
Positioned( Positioned(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: bgColor ?? HexColor('#58434F'), color: bgColor ?? Color(0xFF58434F),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10), topRight: Radius.circular(10),
bottomRight: Radius.circular(10),),), bottomRight: Radius.circular(10),),),
@ -52,8 +50,7 @@ class CardWithBgWidget extends StatelessWidget {
Positioned( Positioned(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: bgColor ?? HexColor('#58434F'), color: bgColor ?? Color(0xFF58434F),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10), topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),),), bottomLeft: Radius.circular(10),),),

@ -157,6 +157,7 @@ class DoctorCard extends StatelessWidget {
), ),
if (branch != null) if (branch != null)
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context).branch + TranslationBase.of(context).branch +
@ -164,9 +165,11 @@ class DoctorCard extends StatelessWidget {
fontSize: 14, fontSize: 14,
color: Colors.grey[500], color: Colors.grey[500],
), ),
AppText( Expanded(
branch, child: AppText(
fontSize: 14, branch,
fontSize: 14,
),
) )
], ],
) )

Loading…
Cancel
Save