merge-requests/364/head
Sultan Khan 5 years ago
commit 075ae0dcaa

@ -748,6 +748,8 @@ const Map<String, Map<String, String>> localizedValues = {
}, },
'appointmentDate': {'en': "Appointment Date", 'ar': "تاريخ الموعد"}, 'appointmentDate': {'en': "Appointment Date", 'ar': "تاريخ الموعد"},
'arrived_p': {'en': "Arrived", 'ar': "وصل"}, 'arrived_p': {'en': "Arrived", 'ar': "وصل"},
"open-rad": {"en": "Open Image", "ar": "فتح صور الاشعة"},
'fileNumber': {'en': "File Number: ", 'ar': " :رقم الملف"}, 'fileNumber': {'en': "File Number: ", 'ar': " :رقم الملف"},
'searchPatient-name': { 'searchPatient-name': {
'en': 'Search Name, Medical File, Phone Number', 'en': 'Search Name, Medical File, Phone Number',

@ -1,18 +1,21 @@
class PrescriptionReqModel { class PrescriptionReqModel {
String vidaAuthTokenID; String vidaAuthTokenID;
dynamic patientMRN; dynamic patientMRN;
dynamic appNo;
PrescriptionReqModel({this.vidaAuthTokenID, this.patientMRN}); PrescriptionReqModel({this.vidaAuthTokenID, this.patientMRN, this.appNo});
PrescriptionReqModel.fromJson(Map<String, dynamic> json) { PrescriptionReqModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID']; vidaAuthTokenID = json['VidaAuthTokenID'];
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
appNo = json['AppointmentNo'];
} }
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['VidaAuthTokenID'] = this.vidaAuthTokenID; data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['PatientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appNo;
return data; return data;
} }
} }

@ -11,7 +11,7 @@ class MedicineService extends BaseService {
var _pharmaciesList = []; var _pharmaciesList = [];
get pharmacyItemsList => _pharmacyItemsList; get pharmacyItemsList => _pharmacyItemsList;
get pharmaciesList => _pharmaciesList; get pharmaciesList => _pharmaciesList;
String searchText='';
List<GetAssessmentResModel> patientAssessmentList = []; List<GetAssessmentResModel> patientAssessmentList = [];
PharmaciesItemsRequestModel _itemsRequestModel = PharmaciesItemsRequestModel _itemsRequestModel =
@ -20,6 +20,7 @@ class MedicineService extends BaseService {
Future getMedicineItem(String itemName) async { Future getMedicineItem(String itemName) async {
_itemsRequestModel.pHRItemName = itemName; _itemsRequestModel.pHRItemName = itemName;
searchText =itemName;
await baseAppClient.post( await baseAppClient.post(
PHARMACY_ITEMS_URL, PHARMACY_ITEMS_URL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -82,7 +82,9 @@ class PrescriptionService extends LookupService {
} }
Future getPrescription({int mrn}) async { Future getPrescription({int mrn}) async {
_prescriptionReqModel = PrescriptionReqModel(patientMRN: mrn); _prescriptionReqModel = PrescriptionReqModel(
patientMRN: mrn,
);
hasError = false; hasError = false;
_prescriptionList.clear(); _prescriptionList.clear();
await baseAppClient.post(GET_PRESCRIPTION_LIST, await baseAppClient.post(GET_PRESCRIPTION_LIST,

@ -15,7 +15,7 @@ class MedicineViewModel extends BaseViewModel {
PrescriptionService _prescriptionService = locator<PrescriptionService>(); PrescriptionService _prescriptionService = locator<PrescriptionService>();
get pharmacyItemsList => _medicineService.pharmacyItemsList; get pharmacyItemsList => _medicineService.pharmacyItemsList;
get searchText=>_medicineService.searchText;
get pharmaciesList => _medicineService.pharmaciesList; get pharmaciesList => _medicineService.pharmaciesList;
get medicationStrengthList => _prescriptionService.medicationStrengthList; get medicationStrengthList => _prescriptionService.medicationStrengthList;
@ -34,6 +34,7 @@ class MedicineViewModel extends BaseViewModel {
List<GetAssessmentResModel> get patientAssessmentList => List<GetAssessmentResModel> get patientAssessmentList =>
_prescriptionService.patientAssessmentList; _prescriptionService.patientAssessmentList;
List<GetMedicationResponseModel> get allMedicationList => List<GetMedicationResponseModel> get allMedicationList =>
_prescriptionService.allMedicationList; _prescriptionService.allMedicationList;
List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList; List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList;
@ -41,6 +42,7 @@ class MedicineViewModel extends BaseViewModel {
_prescriptionService.itemMedicineListRoute; _prescriptionService.itemMedicineListRoute;
List<dynamic> get itemMedicineListUnit => List<dynamic> get itemMedicineListUnit =>
_prescriptionService.itemMedicineListUnit; _prescriptionService.itemMedicineListUnit;
Future getItem({int itemID}) async { Future getItem({int itemID}) async {
//hasError = false; //hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();

@ -31,7 +31,6 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Center(
child: Container( child: Container(
color: Colors.white, color: Colors.white,
child: Column( child: Column(
@ -46,8 +45,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
thickness: 1.0, thickness: 1.0,
color: Colors.grey, color: Colors.grey,
), ),
(model.medicalFileList.length != 0 && (model.medicalFileList != null &&
model.medicalFileList != null) model.medicalFileList.length != 0)
? ListView.builder( ? ListView.builder(
//physics: , //physics: ,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
@ -66,8 +65,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).branch +
.branch +
": ", ": ",
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
@ -134,8 +132,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
age: patient.age, age: patient.age,
firstName: patient.firstName, firstName: patient.firstName,
lastName: patient.lastName, lastName: patient.lastName,
gender: gender: patient.genderDescription,
patient.genderDescription,
encounterNumber: index, encounterNumber: index,
pp: patient.patientId, pp: patient.patientId,
)), )),
@ -144,12 +141,10 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
); );
}) })
: Center( : Container(
child: Container(
child: AppText( child: AppText(
'THERES NO MEDICAL FILE FOR THIS Patient', 'THERES NO MEDICAL FILE FOR THIS Patient',
), ),
),
) )
], ],
), ),
@ -157,7 +152,6 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
), ),
), ),
),
); );
} }
} }

@ -1,10 +1,10 @@
import 'dart:math'; import 'dart:math';
import 'package:autocomplete_textfield/autocomplete_textfield.dart'; import 'package:autocomplete_textfield/autocomplete_textfield.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/model/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/medicine/pharmacies_list_screen.dart'; import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
@ -12,13 +12,13 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.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';
import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart'; import 'package:doctor_app_flutter/widgets/medicine/medicine_item_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_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_text_form_field.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/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_recognition_result.dart'; import 'package:speech_to_text/speech_recognition_result.dart';
@ -117,11 +117,13 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<MedicineViewModel>( return BaseView<MedicineViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (model.allMedicationList.length == 0) // if (model.allMedicationList.length == 0)
await model.getMedicationList(); // await model.getMedicationList();
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) {
baseViewModel: model, myController.text =model.searchText;
return AppScaffold(
// baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,
appBarTitle: TranslationBase.of(context).searchMedicine, appBarTitle: TranslationBase.of(context).searchMedicine,
body: SingleChildScrollView( body: SingleChildScrollView(
@ -129,137 +131,155 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
widthFactor: 0.97, widthFactor: 0.97,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
color: Colors.white,
// height: SizeConfig.screenHeight, // height: SizeConfig.screenHeight,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox(height: 100), SizedBox(
Column(children: [ height: SizeConfig.screenHeight * .16,
),
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.9, widthFactor: 0.9,
child: Column( child: Container(
children: <Widget>[ decoration: BoxDecoration(
Container( borderRadius:
child: InkWell( BorderRadius.all(Radius.circular(6.0)),
onTap: model.allMedicationList != null border: Border.all(
? () { width: 1.0, color: HexColor("#CCCCCC"))),
setState(() { padding: EdgeInsets.all(10),
_selectedMedication = null; child: AppTextFormField(
}); borderColor: Colors.white,
} hintText: TranslationBase.of(context)
: null,
child: _selectedMedication == null
? AutoCompleteTextField<
GetMedicationResponseModel>(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context)
.searchMedicineNameHere,
_selectedMedication != null
? _selectedMedication.genericName
: null,
true,
icon: EvaIcons.search),
itemSubmitted: (item) => setState(
() => _selectedMedication = item),
key: key,
suggestions: model.allMedicationList,
itemBuilder: (context, suggestion) =>
new Padding(
child: Texts(
suggestion.description +
'/' +
suggestion.genericName),
padding: EdgeInsets.all(10.0)),
itemSorter: (a, b) => 1,
itemFilter: (suggestion, input) =>
suggestion.genericName
.toLowerCase()
.startsWith(
input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(
input.toLowerCase()) ||
suggestion.keywords
.toLowerCase()
.startsWith(input.toLowerCase()),
)
: TextField(
minLines: 2,
maxLines: 2,
decoration: textFieldSelectorDecoration(
TranslationBase.of(context)
.searchMedicineNameHere, .searchMedicineNameHere,
_selectedMedication != null controller: myController,
? _selectedMedication onSaved: (value) {},
.description + onFieldSubmitted: (value) {
(' (${_selectedMedication.genericName} )') searchMedicine(context, model);
: null, },
true, inputFormatter: ONLY_LETTERS,
icon: EvaIcons.search),
enabled: false,
),
),
), ),
],
), ),
)
]),
SizedBox(
height: SizeConfig.screenHeight * .55,
), ),
Column(
children: [
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.97, widthFactor: 0.9,
child: Container(
child: Wrap( child: Wrap(
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
// TODO change it secondary button and add loading // TODO change it secondary button and add loading
AppButton( AppButton(
title: TranslationBase.of(context).search, title: TranslationBase.of(context).search,
onPressed: () async { onPressed: () async{
await searchMedicine(context, model); await searchMedicine(context, model);
}, },
), ),
], ],
), ),
) ),
),
Container(
margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase
.of(context)
.youCanFind +
(myController.text !=''?model.pharmacyItemsList.length
.toString():'0' )+
" " +
TranslationBase
.of(context)
.itemsInSearch,
fontWeight: FontWeight.bold,
),
], ],
) ),
),
SizedBox(
height:10,
),
if(myController.text !='')
Container(
height: MediaQuery
.of(context)
.size
.height * 0.5,
child: ListView.builder(
padding: const EdgeInsets.only(top:20),
scrollDirection: Axis.vertical,
// shrinkWrap: true,
itemCount:
model.pharmacyItemsList ==
null
? 0
: model
.pharmacyItemsList.length,
itemBuilder:
(BuildContext context, int index) {
return InkWell(
child: MedicineItemWidget(
label: model
.pharmacyItemsList[index]
["ItemDescription"],
url: model
.pharmacyItemsList[index]
["ImageSRCUrl"],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PharmaciesListScreen(
itemID: model
.pharmacyItemsList[
index]["ItemID"],
url: model
.pharmacyItemsList[
index]["ImageSRCUrl"]),
),
);
},
);
},
),
),
], ],
), ),
)), )),
), ),
), ),
), );}
); );
} }
searchMedicine(context, MedicineViewModel model) async { searchMedicine(context, MedicineViewModel model) async {
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
if (_selectedMedication.isNullOrEmpty()) { if (myController.text.isNullOrEmpty()) {
helpers.showErrorToast(TranslationBase.of(context).typeMedicineName); helpers.showErrorToast(TranslationBase
.of(context)
.typeMedicineName);
//"Type Medicine Name") //"Type Medicine Name")
return; return;
} else if (_selectedMedication.description.length < 3) { }
helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter); if (myController.text.length < 3) {
helpers.showErrorToast(TranslationBase
.of(context)
.moreThan3Letter);
return; return;
} }
// GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
Navigator.push(
context, await model.getMedicineItem(myController.text);
MaterialPageRoute( GifLoaderDialogUtils.hideDialog(context);
builder: (context) => PharmaciesListScreen(
itemID: _selectedMedication.itemId,
selectedMedication: _selectedMedication,
),
),
);
// await model.getMedicineItem(_selectedMedication.description);
// GifLoaderDialogUtils.hideDialog(context);
} }
startVoiceSearch() { startVoiceSearch() {

@ -2,7 +2,6 @@ import 'dart:convert';
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medicine_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/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -23,11 +22,9 @@ class PharmaciesListScreen extends StatefulWidget {
final int itemID; final int itemID;
final String url; final String url;
final GetMedicationResponseModel selectedMedication;
// In the constructor, require a item id. // In the constructor, require a item id.
PharmaciesListScreen( PharmaciesListScreen({Key key, @required this.itemID, this.url})
{Key key, @required this.itemID, this.url, this.selectedMedication})
: super(key: key); : super(key: key);
@override @override
@ -52,17 +49,10 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectsProvider = Provider.of(context); projectsProvider = Provider.of(context);
return BaseView<MedicineViewModel>( return BaseView<MedicineViewModel>(
onModelReady: (model) async { onModelReady: (model) => model.getPharmaciesList(widget.itemID),
await model.getPharmaciesList(widget.selectedMedication.itemId); builder: (_, model, w) => AppScaffold(
await model.getMedicineItem(widget.selectedMedication.description);
},
builder: (_, model, w) =>
AppScaffold(
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase appBarTitle: TranslationBase.of(context).pharmaciesList,
.of(context)
.pharmaciesList,
body: Container( body: Container(
height: SizeConfig.screenHeight, height: SizeConfig.screenHeight,
child: ListView( child: ListView(
@ -70,7 +60,7 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[ children: <Widget>[
model.pharmaciesList.length > 0 && model.pharmacyItemsList.length > 0 model.pharmaciesList.length > 0
? RoundedContainer( ? RoundedContainer(
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -79,10 +69,9 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
child: ClipRRect( child: ClipRRect(
borderRadius: borderRadius:
BorderRadius.all(Radius.circular(7)), BorderRadius.all(Radius.circular(7)),
child: model.pharmacyItemsList[0] child: widget.url != null
["ImageSRCUrl"]!= null
? Image.network( ? Image.network(
model.pharmacyItemsList[0]["ImageSRCUrl"], widget.url,
height: height:
SizeConfig.imageSizeMultiplier * SizeConfig.imageSizeMultiplier *
21, 21,

@ -516,6 +516,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
.getFrom, .getFrom,
"to": "to":
patient.getTo, patient.getTo,
"isSearch":isSearch
}); });
}, },
); );

@ -1,20 +1,26 @@
import 'package:doctor_app_flutter/config/size_config.dart'; 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_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:url_launcher/url_launcher.dart';
class RadiologyReportScreen extends StatelessWidget { class RadiologyReportScreen extends StatelessWidget {
final String reportData; final String reportData;
final String url;
RadiologyReportScreen({Key key, this.reportData}); RadiologyReportScreen({Key key, this.reportData, this.url});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).radiologyReport, appBarTitle: TranslationBase.of(context).radiologyReport,
body: Container( body: SingleChildScrollView(
child: Column(
children: [
Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -32,6 +38,39 @@ class RadiologyReportScreen extends StatelessWidget {
fontSize: 2.5 * SizeConfig.textMultiplier, fontSize: 2.5 * SizeConfig.textMultiplier,
), ),
), ),
); SizedBox(height:MediaQuery.of(context).size.height * 0.13 ,)
],
),
),
bottomSheet: url == null
? Container(
height: MediaQuery.of(context).size.height * 0,
)
: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.1,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
FractionallySizedBox(
widthFactor: 0.9,
child: Container(
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
// TODO change it secondary button and add loading
AppButton(
title: TranslationBase.of(context).openRad,
onPressed: () async {
launch(url);
},
),
],
),
),
),
],
),
));
} }
} }

@ -102,6 +102,8 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
reportData: model reportData: model
.patientRadiologyList[index] .patientRadiologyList[index]
.reportData, .reportData,
url: model
.patientRadiologyList[index].imageURL,
)), )),
); );
}, },

@ -35,7 +35,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient']; patient = routeArgs['patient'];
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) => model.getPrescription(mrn: 0), onModelReady: (model) => model.getPrescription(mrn: patient.patientId),
builder: builder:
(BuildContext context, PrescriptionViewModel model, Widget child) => (BuildContext context, PrescriptionViewModel model, Widget child) =>
AppScaffold( AppScaffold(

@ -1141,6 +1141,8 @@ class TranslationBase {
String get fileNumber => localizedValues['fileNumber'][locale.languageCode]; String get fileNumber => localizedValues['fileNumber'][locale.languageCode];
String get reschedule => localizedValues['reschedule'][locale.languageCode]; String get reschedule => localizedValues['reschedule'][locale.languageCode];
String get leaves => localizedValues['leaves'][locale.languageCode]; String get leaves => localizedValues['leaves'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -59,24 +59,9 @@ class _LabResultWidgetState extends State<LabResultWidget> {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)), borderRadius: BorderRadius.all(Radius.circular(10)),
), ),
child: Column( child: Column(children: [
children: widget.labResult.map((result) { Container(
return Container( child: Row(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border(
bottom:
BorderSide(color: Colors.grey, width: 0.5),
top: BorderSide(color: Colors.grey, width: 0.5),
left: BorderSide(color: Colors.grey, width: 0.5),
right: BorderSide(color: Colors.grey, width: 0.5),
),
),
margin: EdgeInsets.only(top: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Container( child: Container(
@ -88,8 +73,7 @@ class _LabResultWidgetState extends State<LabResultWidget> {
), ),
child: Center( child: Center(
child: Texts( child: Texts(
TranslationBase.of(context) TranslationBase.of(context).description,
.description,
color: Colors.white, color: Colors.white,
), ),
), ),
@ -123,6 +107,24 @@ class _LabResultWidgetState extends State<LabResultWidget> {
), ),
], ],
), ),
),
...widget.labResult.map((result) {
return Container(
padding: EdgeInsets.symmetric(horizontal: 4),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border(
bottom:
BorderSide(color: Colors.grey, width: 0.5),
top: BorderSide(color: Colors.grey, width: 0.5),
left: BorderSide(color: Colors.grey, width: 0.5),
right: BorderSide(color: Colors.grey, width: 0.5),
),
),
margin: EdgeInsets.only(top: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -164,7 +166,7 @@ class _LabResultWidgetState extends State<LabResultWidget> {
), ),
); );
}).toList(), }).toList(),
), ]),
), ),
) )
], ],

@ -49,8 +49,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
patientMRN: patient.patientMRN); patientMRN: patient.patientMRN);
await model.postEpisode(postEpisodeReqModel); await model.postEpisode(postEpisodeReqModel);
patient.episodeNo = model.episodeID; patient.episodeNo = model.episodeID;
Navigator.of(context) Navigator.of(context).pushNamed(CREATE_EPISODE,
.pushNamed(CREATE_EPISODE, arguments: {'patient': patient}); arguments: {'patient': patient});
}, },
isLoading: model.state == ViewState.BusyLocal, isLoading: model.state == ViewState.BusyLocal,
icon: 'create-episod.png'), icon: 'create-episod.png'),
@ -63,7 +63,6 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine2: TranslationBase.of(context).episode, nameLine2: TranslationBase.of(context).episode,
route: UPDATE_EPISODE, route: UPDATE_EPISODE,
icon: 'modilfy-episode.png'), icon: 'modilfy-episode.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
@ -80,7 +79,6 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).insurance, nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
icon: 'lab.png'), icon: 'lab.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
@ -131,7 +129,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
? PatientProfileButton( ? PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: ORDER_PRESCRIPTION_HISTORY, route: ORDER_PRESCRIPTION,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
icon: 'lab.png') icon: 'lab.png')

@ -26,7 +26,6 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
crossAxisCount: 2, crossAxisCount: 2,
childAspectRatio: 1.5, childAspectRatio: 1.5,
children: [ children: [
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -66,16 +65,15 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
// nameLine1: TranslationBase.of(context).admission, // nameLine1: TranslationBase.of(context).admission,
// nameLine2: TranslationBase.of(context).request, // nameLine2: TranslationBase.of(context).request,
// icon: 'heartbeat.png'), // icon: 'heartbeat.png'),
// (int.parse(patientType) == 7 || int.parse(patientType) == 6) (int.parse(patientType) == 7 || int.parse(patientType) == 6)
// ? PatientProfileButton( ? PatientProfileButton(
// key: key, key: key,
// patient: patient, patient: patient,
// route: ORDER_PRESCRIPTION, route: ORDER_PRESCRIPTION,
// nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
// nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
// icon: 'lab.png') icon: 'lab.png')
// : : PatientProfileButton(
PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: ORDER_PRESCRIPTION_HISTORY, route: ORDER_PRESCRIPTION_HISTORY,

@ -17,13 +17,13 @@ class AppScaffold extends StatelessWidget {
final bool isLoading; final bool isLoading;
final bool isShowAppBar; final bool isShowAppBar;
final BaseViewModel baseViewModel; final BaseViewModel baseViewModel;
final Widget bottomSheet;
AppScaffold( AppScaffold(
{this.appBarTitle = '', {this.appBarTitle = '',
this.body, this.body,
this.isLoading = false, this.isLoading = false,
this.isShowAppBar = true, this.isShowAppBar = true,
this.baseViewModel}); this.baseViewModel, this.bottomSheet});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -59,6 +59,8 @@ class AppScaffold extends StatelessWidget {
], ],
) )
: null, : null,
bottomSheet: bottomSheet,
body: projectProvider.isInternetConnection body: projectProvider.isInternetConnection
? baseViewModel != null ? baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(

@ -573,7 +573,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -844,7 +844,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -986,5 +986,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0 <2.11.0" dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save