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': "تاريخ الموعد"},
'arrived_p': {'en': "Arrived", 'ar': "وصل"},
"open-rad": {"en": "Open Image", "ar": "فتح صور الاشعة"},
'fileNumber': {'en': "File Number: ", 'ar': " :رقم الملف"},
'searchPatient-name': {
'en': 'Search Name, Medical File, Phone Number',

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

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

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

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

@ -31,128 +31,122 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: Center(
child: Container(
color: Colors.white,
child: Column(
// mainAxisAlignment: model.medicalFileList.length != 0 &&
// model.medicalFileList != null
// ? MainAxisAlignment.start
// : MainAxisAlignment.center,
children: [
PatientPageHeaderWidget(patient),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
),
(model.medicalFileList.length != 0 &&
model.medicalFileList != null)
? ListView.builder(
//physics: ,
physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.medicalFileList[0].entityList[0]
.timelines.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 8.0),
child: InkWell(
child: Container(
child: Column(
children: [
Row(
children: [
AppText(
TranslationBase.of(context)
.branch +
": ",
fontWeight: FontWeight.w700,
),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
.doctorName
.toUpperCase() +
": ",
fontWeight: FontWeight.w700,
),
Expanded(
child: AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
fontWeight: FontWeight.w700,
),
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
.clinicName +
": ",
fontWeight: FontWeight.w700,
),
AppText(
child: Container(
color: Colors.white,
child: Column(
// mainAxisAlignment: model.medicalFileList.length != 0 &&
// model.medicalFileList != null
// ? MainAxisAlignment.start
// : MainAxisAlignment.center,
children: [
PatientPageHeaderWidget(patient),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
),
(model.medicalFileList != null &&
model.medicalFileList.length != 0)
? ListView.builder(
//physics: ,
physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.medicalFileList[0].entityList[0]
.timelines.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 8.0),
child: InkWell(
child: Container(
child: Column(
children: [
Row(
children: [
AppText(
TranslationBase.of(context).branch +
": ",
fontWeight: FontWeight.w700,
),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
.doctorName
.toUpperCase() +
": ",
fontWeight: FontWeight.w700,
),
Expanded(
child: AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
.doctorName,
fontWeight: FontWeight.w700,
),
],
),
SizedBox(height: 10.0),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey.shade400,
)
],
),
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
.clinicName +
": ",
fontWeight: FontWeight.w700,
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
),
],
),
SizedBox(height: 10.0),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey.shade400,
)
],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender:
patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
)),
);
},
),
);
})
: Center(
child: Container(
child: AppText(
'THERES NO MEDICAL FILE FOR THIS Patient',
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
)),
);
},
),
),
)
],
),
);
})
: Container(
child: AppText(
'THERES NO MEDICAL FILE FOR THIS Patient',
),
)
],
),
),
),

@ -1,10 +1,10 @@
import 'dart:math';
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/core/model/get_medication_response_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/medicine/pharmacies_list_screen.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/translations_delegate_base.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_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/loader/gif_loader_dialog_utils.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_recognition_result.dart';
@ -117,149 +117,169 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
Widget build(BuildContext context) {
return BaseView<MedicineViewModel>(
onModelReady: (model) async {
if (model.allMedicationList.length == 0)
await model.getMedicationList();
// if (model.allMedicationList.length == 0)
// await model.getMedicationList();
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
appBarTitle: TranslationBase.of(context).searchMedicine,
body: SingleChildScrollView(
child: FractionallySizedBox(
widthFactor: 0.97,
child: SingleChildScrollView(
child: Container(
color: Colors.white,
// height: SizeConfig.screenHeight,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
SizedBox(height: 100),
Column(children: [
FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: <Widget>[
Container(
child: InkWell(
onTap: model.allMedicationList != null
? () {
setState(() {
_selectedMedication = null;
});
}
: 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,
_selectedMedication != null
? _selectedMedication
.description +
(' (${_selectedMedication.genericName} )')
: null,
true,
icon: EvaIcons.search),
enabled: false,
),
builder: (_, model, w) {
myController.text =model.searchText;
return AppScaffold(
// baseViewModel: model,
isShowAppBar: false,
appBarTitle: TranslationBase.of(context).searchMedicine,
body: SingleChildScrollView(
child: FractionallySizedBox(
widthFactor: 0.97,
child: SingleChildScrollView(
child: Container(
// height: SizeConfig.screenHeight,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SizedBox(
height: SizeConfig.screenHeight * .16,
),
FractionallySizedBox(
widthFactor: 0.9,
child: Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
borderColor: Colors.white,
hintText: TranslationBase.of(context)
.searchMedicineNameHere,
controller: myController,
onSaved: (value) {},
onFieldSubmitted: (value) {
searchMedicine(context, model);
},
inputFormatter: ONLY_LETTERS,
),
),
],
),
)
]),
SizedBox(
height: SizeConfig.screenHeight * .55,
),
Column(
children: [
FractionallySizedBox(
widthFactor: 0.97,
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
// TODO change it secondary button and add loading
AppButton(
title: TranslationBase.of(context).search,
onPressed: () async {
await searchMedicine(context, model);
},
),
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).search,
onPressed: () async{
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 {
FocusScope.of(context).unfocus();
if (_selectedMedication.isNullOrEmpty()) {
helpers.showErrorToast(TranslationBase.of(context).typeMedicineName);
if (myController.text.isNullOrEmpty()) {
helpers.showErrorToast(TranslationBase
.of(context)
.typeMedicineName);
//"Type Medicine Name")
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;
}
// GifLoaderDialogUtils.showMyDialog(context);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PharmaciesListScreen(
itemID: _selectedMedication.itemId,
selectedMedication: _selectedMedication,
),
),
);
// await model.getMedicineItem(_selectedMedication.description);
// GifLoaderDialogUtils.hideDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
await model.getMedicineItem(myController.text);
GifLoaderDialogUtils.hideDialog(context);
}
startVoiceSearch() {

@ -2,7 +2,6 @@ import 'dart:convert';
import 'dart:typed_data';
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/project_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -23,11 +22,9 @@ class PharmaciesListScreen extends StatefulWidget {
final int itemID;
final String url;
final GetMedicationResponseModel selectedMedication;
// In the constructor, require a item id.
PharmaciesListScreen(
{Key key, @required this.itemID, this.url, this.selectedMedication})
PharmaciesListScreen({Key key, @required this.itemID, this.url})
: super(key: key);
@override
@ -52,39 +49,31 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
Widget build(BuildContext context) {
projectsProvider = Provider.of(context);
return BaseView<MedicineViewModel>(
onModelReady: (model) async {
await model.getPharmaciesList(widget.selectedMedication.itemId);
await model.getMedicineItem(widget.selectedMedication.description);
},
builder: (_, model, w) =>
AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase
.of(context)
.pharmaciesList,
body: Container(
height: SizeConfig.screenHeight,
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[
model.pharmaciesList.length > 0 && model.pharmacyItemsList.length > 0
onModelReady: (model) => model.getPharmaciesList(widget.itemID),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).pharmaciesList,
body: Container(
height: SizeConfig.screenHeight,
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[
model.pharmaciesList.length > 0
? RoundedContainer(
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(7)),
child: model.pharmacyItemsList[0]
["ImageSRCUrl"]!= null
? Image.network(
model.pharmacyItemsList[0]["ImageSRCUrl"],
height:
SizeConfig.imageSizeMultiplier *
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(7)),
child: widget.url != null
? Image.network(
widget.url,
height:
SizeConfig.imageSizeMultiplier *
21,
width:
SizeConfig.imageSizeMultiplier *
@ -241,8 +230,8 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
}),
),
)
]),
),),);
]),
),),);
}
@ -253,7 +242,7 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
//TODO CHECK THE URL IS NULL OR NOT
Uint8List dataFromBase64String(String base64String) {
if(base64String !=null)
return base64Decode(base64String);
return base64Decode(base64String);
}
String base64String(Uint8List data) {

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

@ -1,37 +1,76 @@
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_texts_widget.dart';
import 'package:flutter/cupertino.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 {
final String reportData;
final String url;
RadiologyReportScreen({Key key, this.reportData});
RadiologyReportScreen({Key key, this.reportData, this.url});
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).radiologyReport,
body: Container(
padding: EdgeInsets.all(10),
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
color: Colors.white,
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),
appBarTitle: TranslationBase.of(context).radiologyReport,
body: SingleChildScrollView(
child: Column(
children: [
Container(
padding: EdgeInsets.all(10),
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
color: Colors.white,
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),
),
),
child: AppText(
reportData,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
),
SizedBox(height:MediaQuery.of(context).size.height * 0.13 ,)
],
),
),
child: AppText(
reportData,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
),
);
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
.patientRadiologyList[index]
.reportData,
url: model
.patientRadiologyList[index].imageURL,
)),
);
},

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

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

@ -59,9 +59,58 @@ class _LabResultWidgetState extends State<LabResultWidget> {
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
),
child: Column(
children: widget.labResult.map((result) {
child: Column(children: [
Container(
child: Row(
children: <Widget>[
Expanded(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context).description,
color: Colors.white,
),
),
height: 60,
),
),
Expanded(
child: Container(
color: HexColor('#515B5D'),
child: Center(
child: Texts(
TranslationBase.of(context).value,
color: Colors.white),
),
height: 60),
),
Expanded(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context).range,
color: Colors.white),
),
height: 60),
),
],
),
),
...widget.labResult.map((result) {
return Container(
padding: EdgeInsets.symmetric(horizontal: 4),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border(
@ -76,53 +125,6 @@ class _LabResultWidgetState extends State<LabResultWidget> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context)
.description,
color: Colors.white,
),
),
height: 60,
),
),
Expanded(
child: Container(
color: HexColor('#515B5D'),
child: Center(
child: Texts(
TranslationBase.of(context).value,
color: Colors.white),
),
height: 60),
),
Expanded(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context).range,
color: Colors.white),
),
height: 60),
),
],
),
Row(
children: <Widget>[
Expanded(
@ -164,7 +166,7 @@ class _LabResultWidgetState extends State<LabResultWidget> {
),
);
}).toList(),
),
]),
),
)
],

@ -36,72 +36,70 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
childAspectRatio: 1.5,
children: [
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
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'),
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 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
isDisable: patient.episodeNo == 0 ? true : false,
nameLine1: TranslationBase.of(context).update,
nameLine2: TranslationBase.of(context).episode,
route: UPDATE_EPISODE,
icon: 'modilfy-episode.png'),
PatientProfileButton(
key: key,
patient: patient,
isDisable: patient.episodeNo == 0 ? true : false,
nameLine1: TranslationBase.of(context).update,
nameLine2: TranslationBase.of(context).episode,
route: UPDATE_EPISODE,
icon: 'modilfy-episode.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
route: RADIOLOGY,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'radiology-1.png'),
PatientProfileButton(
key: key,
patient: patient,
route: RADIOLOGY,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'radiology-1.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_INSURANCE_APPROVALS,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_INSURANCE_APPROVALS,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'lab.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route:
VITAL_SIGN_DETAILS /* PATIENT_VITAL_SIGN
PatientProfileButton(
key: key,
patient: patient,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route:
VITAL_SIGN_DETAILS /* PATIENT_VITAL_SIGN
*/
,
icon: 'heartbeat.png'),
,
icon: 'heartbeat.png'),
if (selectedPatientType != 7)
PatientProfileButton(
key: key,
patient: patient,
route: LAB_ORDERS,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
route: LAB_ORDERS,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
@ -112,26 +110,26 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
if (selectedPatientType != 0 &&
selectedPatientType != 5 &&
selectedPatientType != 7)
PatientProfileButton(
key: key,
patient: patient,
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png'),
PatientProfileButton(
key: key,
patient: patient,
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_ADMISSION_REQUEST,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'heartbeat.png'),
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_ADMISSION_REQUEST,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'heartbeat.png'),
(int.parse(patientType) == 7 || int.parse(patientType) == 6)
? PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PRESCRIPTION_HISTORY,
route: ORDER_PRESCRIPTION,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'lab.png')
@ -151,29 +149,29 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine2: TranslationBase.of(context).procedures,
icon: 'lab.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase.of(context).myReferral,
nameLine2: TranslationBase.of(context).patient,
icon: 'note.png'),
PatientProfileButton(
key: key,
patient: patient,
route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase.of(context).myReferral,
nameLine2: TranslationBase.of(context).patient,
icon: 'note.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'sick_leaves_icons.png'),
PatientProfileButton(
key: key,
patient: patient,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'sick_leaves_icons.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_UCAF_REQUEST,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_UCAF_REQUEST,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'lab.png'),
],
),
);

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

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

@ -573,7 +573,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.4"
mime:
dependency: transitive
description:
@ -844,7 +844,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
stream_channel:
dependency: transitive
description:
@ -986,5 +986,5 @@ packages:
source: hosted
version: "2.2.1"
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"

Loading…
Cancel
Save