Merge branches 'development' and 'patinet_profile_with_all_service' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into patinet_profile_with_all_service
Conflicts: lib/screens/patients/patients_screen.dartmerge-requests/349/head
commit
a40bec844b
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,130 @@
|
||||
import 'dart:ui';
|
||||
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/doctor/my_referral_patient_screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/doctor/my_referred_patient_screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/patients_screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart';
|
||||
import 'package:doctor_app_flutter/screens/reschedule-leaves/reschedule_leave.dart';
|
||||
import 'package:doctor_app_flutter/util/date-utils.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_texts_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PatientArrivalScreen extends StatefulWidget {
|
||||
@override
|
||||
_PatientArrivalScreen createState() => _PatientArrivalScreen();
|
||||
}
|
||||
|
||||
class _PatientArrivalScreen extends State<PatientArrivalScreen>
|
||||
with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
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);
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tabController = TabController(length: 2, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_tabController.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).arrivalpatient,
|
||||
body: Scaffold(
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(65.0),
|
||||
child: Center(
|
||||
child: Container(
|
||||
height: 60.0,
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
width: MediaQuery.of(context).size.width * 0.92, // 0.9,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 0.9), //width: 0.7
|
||||
),
|
||||
color: Colors.white),
|
||||
child: Center(
|
||||
child: TabBar(
|
||||
isScrollable: true,
|
||||
controller: _tabController,
|
||||
indicatorWeight: 5.0,
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
labelColor: Theme.of(context).primaryColor,
|
||||
labelPadding:
|
||||
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
|
||||
unselectedLabelColor: Colors.grey[800],
|
||||
tabs: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.30,
|
||||
child: Center(
|
||||
child: AppText(
|
||||
TranslationBase.of(context).arrivalpatient),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.30,
|
||||
child: Center(
|
||||
child: AppText(
|
||||
TranslationBase.of(context).rescheduleLeaves),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
controller: _tabController,
|
||||
children: <Widget>[
|
||||
PatientsScreen(
|
||||
patientSearchForm: _patientSearchFormValues,
|
||||
selectedType: "7",
|
||||
isAppbar: false,
|
||||
),
|
||||
AddRescheduleLeavScreen(),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
import 'dart:ui';
|
||||
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/doctor/my_referral_patient_screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/doctor/my_referred_patient_screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/patient_search_screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/patients_screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart';
|
||||
import 'package:doctor_app_flutter/screens/reschedule-leaves/reschedule_leave.dart';
|
||||
import 'package:doctor_app_flutter/util/date-utils.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_texts_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SearchMedicinePatientScreen extends StatefulWidget {
|
||||
@override
|
||||
_SearchMedicinePatientScreen createState() => _SearchMedicinePatientScreen();
|
||||
}
|
||||
|
||||
class _SearchMedicinePatientScreen extends State<SearchMedicinePatientScreen>
|
||||
with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tabController = TabController(length: 2, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_tabController.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).searchmedicinepatient,
|
||||
body: Scaffold(
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(65.0),
|
||||
child: Center(
|
||||
child: Container(
|
||||
height: 60.0,
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
width: MediaQuery.of(context).size.width * 0.92, // 0.9,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 0.9), //width: 0.7
|
||||
),
|
||||
color: Colors.white),
|
||||
child: Center(
|
||||
child: TabBar(
|
||||
isScrollable: true,
|
||||
controller: _tabController,
|
||||
indicatorWeight: 5.0,
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
labelColor: Theme.of(context).primaryColor,
|
||||
labelPadding:
|
||||
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
|
||||
unselectedLabelColor: Colors.grey[800],
|
||||
tabs: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.30,
|
||||
child: Center(
|
||||
child: AppText(
|
||||
TranslationBase.of(context).searchPatient),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.30,
|
||||
child: Center(
|
||||
child: AppText(
|
||||
TranslationBase.of(context).searchMedicine),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
controller: _tabController,
|
||||
children: <Widget>[
|
||||
PatientSearchScreen(),
|
||||
MedicineSearchScreen()
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,101 @@
|
||||
import 'dart:ui';
|
||||
import 'package:doctor_app_flutter/screens/doctor/my_referral_patient_screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/doctor/my_referred_patient_screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.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_texts_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PatientReferralScreen extends StatefulWidget {
|
||||
@override
|
||||
_PatientReferralScreen createState() => _PatientReferralScreen();
|
||||
}
|
||||
|
||||
class _PatientReferralScreen extends State<PatientReferralScreen>
|
||||
with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tabController = TabController(length: 2, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_tabController.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).patientsreferral,
|
||||
body: Scaffold(
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(65.0),
|
||||
child: Center(
|
||||
child: Container(
|
||||
height: 60.0,
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
width: MediaQuery.of(context).size.width * 0.92, // 0.9,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 0.9), //width: 0.7
|
||||
),
|
||||
color: Colors.white),
|
||||
child: Center(
|
||||
child: TabBar(
|
||||
isScrollable: true,
|
||||
controller: _tabController,
|
||||
indicatorWeight: 5.0,
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
labelColor: Theme.of(context).primaryColor,
|
||||
labelPadding:
|
||||
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
|
||||
unselectedLabelColor: Colors.grey[800],
|
||||
tabs: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.30,
|
||||
child: Center(
|
||||
child:
|
||||
AppText(TranslationBase.of(context).myReferral),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.30,
|
||||
child: Center(
|
||||
child: AppText(
|
||||
TranslationBase.of(context).myReferredPatient),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
controller: _tabController,
|
||||
children: <Widget>[
|
||||
MyReferralPatientScreen(),
|
||||
MyReferredPatient(),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,517 @@
|
||||
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||
import 'package:doctor_app_flutter/screens/prescription/add_prescription_form.dart';
|
||||
import 'package:doctor_app_flutter/screens/prescription/update_prescription_form.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/patients/profile/patient-page-header-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/network_base_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class NewPrescriptionHistoryScreen extends StatefulWidget {
|
||||
@override
|
||||
_NewPrescriptionHistoryScreenState createState() =>
|
||||
_NewPrescriptionHistoryScreenState();
|
||||
}
|
||||
|
||||
class _NewPrescriptionHistoryScreenState
|
||||
extends State<NewPrescriptionHistoryScreen> {
|
||||
PersistentBottomSheetController _controller;
|
||||
final _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
TextEditingController strengthController = TextEditingController();
|
||||
int testNum = 0;
|
||||
int strengthChar;
|
||||
PatiantInformtion patient;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
final screenSize = MediaQuery.of(context).size;
|
||||
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||
patient = routeArgs['patient'];
|
||||
return BaseView<PrescriptionViewModel>(
|
||||
onModelReady: (model) => model.getPrescription(mrn: patient.patientId),
|
||||
builder:
|
||||
(BuildContext context, PrescriptionViewModel model, Widget child) =>
|
||||
AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).prescription,
|
||||
body: NetworkBaseView(
|
||||
baseViewModel: model,
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
child: Column(
|
||||
children: [
|
||||
PatientPageHeaderWidget(patient),
|
||||
Divider(
|
||||
height: 1.0,
|
||||
thickness: 1.0,
|
||||
color: Colors.grey,
|
||||
),
|
||||
(model.prescriptionList.length != 0)
|
||||
? SizedBox(
|
||||
height:
|
||||
model.prescriptionList[0].rowcount == 0
|
||||
? 200.0
|
||||
: 10.0)
|
||||
: SizedBox(height: 200.0),
|
||||
//model.prescriptionList == null
|
||||
(model.prescriptionList.length != 0)
|
||||
? model.prescriptionList[0].rowcount == 0
|
||||
? Container(
|
||||
child: AppText(
|
||||
'Sorry , Theres no prescriptions for this patient',
|
||||
color: Color(0xFFB9382C),
|
||||
),
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.all(14.0),
|
||||
child: NetworkBaseView(
|
||||
baseViewModel: model,
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
...List.generate(
|
||||
model.prescriptionList[0]
|
||||
.rowcount,
|
||||
(index) => Container(
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: MediaQuery.of(
|
||||
context)
|
||||
.size
|
||||
.height *
|
||||
0.022,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.spaceBetween,
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
height: MediaQuery.of(
|
||||
context)
|
||||
.size
|
||||
.height *
|
||||
0.21,
|
||||
width: MediaQuery.of(
|
||||
context)
|
||||
.size
|
||||
.width *
|
||||
0.1,
|
||||
child: Column(
|
||||
children: [
|
||||
AppText(
|
||||
(DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) !=
|
||||
null
|
||||
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn).year)
|
||||
.toString()
|
||||
: DateTime.now()
|
||||
.year)
|
||||
.toString(),
|
||||
color: Colors
|
||||
.green,
|
||||
fontSize:
|
||||
13.5,
|
||||
),
|
||||
AppText(
|
||||
Helpers.getMonth(model.prescriptionList[0].entityList[index].createdOn !=
|
||||
null
|
||||
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn)
|
||||
.month)
|
||||
: DateTime.now()
|
||||
.month)
|
||||
.toUpperCase(),
|
||||
color: Colors
|
||||
.green,
|
||||
),
|
||||
AppText(
|
||||
DateTime.parse(model
|
||||
.prescriptionList[
|
||||
0]
|
||||
.entityList[
|
||||
index]
|
||||
.createdOn)
|
||||
.day
|
||||
.toString(),
|
||||
color: Colors
|
||||
.green,
|
||||
),
|
||||
AppText(
|
||||
Helpers.getTimeFormated(DateTime.parse(model
|
||||
.prescriptionList[
|
||||
0]
|
||||
.entityList[
|
||||
index]
|
||||
.createdOn))
|
||||
.toString(),
|
||||
color: Colors
|
||||
.green,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
// height: MediaQuery.of(
|
||||
// context)
|
||||
// .size
|
||||
// .height *
|
||||
// 0.3499,
|
||||
width: MediaQuery.of(
|
||||
context)
|
||||
.size
|
||||
.width *
|
||||
0.77,
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
AppText(
|
||||
'Start Date:',
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w700,
|
||||
fontSize:
|
||||
14.0,
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
AppText(
|
||||
Helpers.getDateFormatted(DateTime.parse(model
|
||||
.prescriptionList[0]
|
||||
.entityList[index]
|
||||
.startDate)),
|
||||
fontSize:
|
||||
13.5,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width:
|
||||
6.0,
|
||||
),
|
||||
AppText(
|
||||
'Order Type:',
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w700,
|
||||
fontSize:
|
||||
14.0,
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
AppText(
|
||||
model
|
||||
.prescriptionList[0]
|
||||
.entityList[index]
|
||||
.orderTypeDescription,
|
||||
fontSize:
|
||||
13.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.5,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
child:
|
||||
Expanded(
|
||||
child:
|
||||
AppText(
|
||||
model
|
||||
.prescriptionList[0]
|
||||
.entityList[index]
|
||||
.medicationName,
|
||||
fontWeight:
|
||||
FontWeight.w700,
|
||||
fontSize:
|
||||
15.0,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.5,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child:
|
||||
AppText(
|
||||
model
|
||||
.prescriptionList[0]
|
||||
.entityList[index]
|
||||
.doseDetail,
|
||||
fontSize:
|
||||
15.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
AppText(
|
||||
'Indication: ',
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w700,
|
||||
fontSize:
|
||||
17.0,
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
RichText(
|
||||
maxLines:
|
||||
3,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
strutStyle:
|
||||
StrutStyle(fontSize: 12.0),
|
||||
text: TextSpan(
|
||||
style:
|
||||
TextStyle(color: Colors.black),
|
||||
text: model.prescriptionList[0].entityList[index].indication),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
AppText(
|
||||
'UOM: ',
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w700,
|
||||
fontSize:
|
||||
17.0,
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
RichText(
|
||||
maxLines:
|
||||
3,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
strutStyle:
|
||||
StrutStyle(fontSize: 12.0),
|
||||
text: TextSpan(
|
||||
style:
|
||||
TextStyle(color: Colors.black),
|
||||
text: model.prescriptionList[0].entityList[index].uom),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
AppText(
|
||||
'BOX Quantity: ',
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w700,
|
||||
fontSize:
|
||||
17.0,
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
RichText(
|
||||
maxLines:
|
||||
3,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
strutStyle:
|
||||
StrutStyle(fontSize: 12.0),
|
||||
text: TextSpan(
|
||||
style:
|
||||
TextStyle(color: Colors.black),
|
||||
text: model.prescriptionList[0].entityList[index].quantity.toString() == null ? "" : model.prescriptionList[0].entityList[index].quantity.toString()),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
AppText(
|
||||
'pharmacy Intervention ',
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w700,
|
||||
fontSize:
|
||||
17.0,
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
RichText(
|
||||
maxLines:
|
||||
3,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
strutStyle:
|
||||
StrutStyle(fontSize: 12.0),
|
||||
text: TextSpan(
|
||||
style:
|
||||
TextStyle(color: Colors.black),
|
||||
text: model.prescriptionList[0].entityList[index].pharmacyInervention == null ? "" : model.prescriptionList[0].entityList[index].pharmacyInervention.toString()),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height:
|
||||
5.0),
|
||||
Row(
|
||||
children: [
|
||||
AppText(
|
||||
'pharmacist Remarks : ',
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w700,
|
||||
fontSize:
|
||||
15.0,
|
||||
),
|
||||
Expanded(
|
||||
child: AppText(
|
||||
// commening below code because there is an error coming in the model please fix it before pushing it
|
||||
model.prescriptionList[0].entityList[index].pharmacistRemarks == null ? "" : model.prescriptionList[0].entityList[index].pharmacistRemarks,
|
||||
fontSize: 15.0),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.0,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
AppText(
|
||||
TranslationBase.of(context)
|
||||
.doctorName +
|
||||
": ",
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w600,
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
AppText(
|
||||
model
|
||||
.prescriptionList[0]
|
||||
.entityList[index]
|
||||
.doctorName,
|
||||
fontWeight:
|
||||
FontWeight.w700,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
AppText(
|
||||
'Doctor Remarks : ',
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w700,
|
||||
fontSize:
|
||||
13.0,
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
Container(
|
||||
// height: MediaQuery.of(context).size.height *
|
||||
// 0.038,
|
||||
child:
|
||||
RichText(
|
||||
// maxLines:
|
||||
// 2,
|
||||
// overflow:
|
||||
// TextOverflow.ellipsis,
|
||||
strutStyle:
|
||||
StrutStyle(fontSize: 10.0),
|
||||
text:
|
||||
TextSpan(
|
||||
style:
|
||||
TextStyle(color: Colors.black),
|
||||
text: model.prescriptionList[0].entityList[index].remarks != null
|
||||
? model.prescriptionList[0].entityList[index].remarks
|
||||
: "",
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
|
||||
// SizedBox(
|
||||
// height: 40,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Divider(
|
||||
height: 0,
|
||||
thickness: 1.0,
|
||||
color: Colors.grey,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
child: AppText(
|
||||
'Sorry , theres no prescriptions listed for this patient',
|
||||
color: Color(0xFFB9382C),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
selectDate(BuildContext context, PrescriptionViewModel model) async {
|
||||
DateTime selectedDate;
|
||||
selectedDate = DateTime.now();
|
||||
final DateTime picked = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: selectedDate,
|
||||
firstDate: DateTime.now().add(Duration(hours: 2)),
|
||||
lastDate: DateTime(2040),
|
||||
initialEntryMode: DatePickerEntryMode.calendar,
|
||||
);
|
||||
if (picked != null && picked != selectedDate) {
|
||||
setState(() {
|
||||
selectedDate = picked;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue