|
|
|
|
@ -18,7 +18,6 @@ class NewPrescriptionScreen extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
PersistentBottomSheetController _controller;
|
|
|
|
|
final _scaffoldKey = GlobalKey<ScaffoldState>();
|
|
|
|
|
TextEditingController strengthController = TextEditingController();
|
|
|
|
|
int testNum = 0;
|
|
|
|
|
int strengthChar;
|
|
|
|
|
@ -35,9 +34,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
patient = routeArgs['patient'];
|
|
|
|
|
return BaseView<PrescriptionViewModel>(
|
|
|
|
|
onModelReady: (model) => model.getPrescription(mrn: patient.patientId),
|
|
|
|
|
builder:
|
|
|
|
|
(BuildContext context, PrescriptionViewModel model, Widget child) =>
|
|
|
|
|
AppScaffold(
|
|
|
|
|
builder: (BuildContext context, PrescriptionViewModel model, Widget child) => AppScaffold(
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBarTitle: TranslationBase.of(context).prescription,
|
|
|
|
|
body: NetworkBaseView(
|
|
|
|
|
@ -54,34 +51,23 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
),
|
|
|
|
|
(model.prescriptionList.length != 0)
|
|
|
|
|
? SizedBox(
|
|
|
|
|
height:
|
|
|
|
|
model.prescriptionList[0].rowcount == 0
|
|
|
|
|
? 200.0
|
|
|
|
|
: 10.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
|
|
|
|
|
? Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.stretch,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
addPrescriptionForm(
|
|
|
|
|
context,
|
|
|
|
|
model,
|
|
|
|
|
patient,
|
|
|
|
|
model.prescriptionList);
|
|
|
|
|
addPrescriptionForm(context, model, patient, model.prescriptionList);
|
|
|
|
|
//model.postPrescription();
|
|
|
|
|
},
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
radius: 65,
|
|
|
|
|
backgroundColor:
|
|
|
|
|
Color(0XFFB8382C),
|
|
|
|
|
backgroundColor: Color(0XFFB8382C),
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
radius: 60,
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
@ -97,24 +83,20 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
height: 15.0,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.noPrescriptionListed,
|
|
|
|
|
TranslationBase.of(context).noPrescriptionListed,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.addNow,
|
|
|
|
|
TranslationBase.of(context).addNow,
|
|
|
|
|
color: Color(0XFFB8382C),
|
|
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
|
),
|
|
|
|
|
@ -127,8 +109,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
child: NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Container(
|
|
|
|
|
@ -136,41 +117,29 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
width: 450.0,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Colors.grey),
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(
|
|
|
|
|
10.0),
|
|
|
|
|
border: Border.all(color: Colors.grey),
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.all(8.0),
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.spaceBetween,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
' Add more medication',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w100,
|
|
|
|
|
fontWeight: FontWeight.w100,
|
|
|
|
|
fontSize: 12.5,
|
|
|
|
|
),
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.add,
|
|
|
|
|
color:
|
|
|
|
|
Color(0XFFB8382C),
|
|
|
|
|
color: Color(0XFFB8382C),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
addPrescriptionForm(
|
|
|
|
|
context,
|
|
|
|
|
model,
|
|
|
|
|
patient,
|
|
|
|
|
model.prescriptionList);
|
|
|
|
|
addPrescriptionForm(context, model, patient, model.prescriptionList);
|
|
|
|
|
//model.postPrescription();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
@ -178,86 +147,61 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
height: 10.0,
|
|
|
|
|
),
|
|
|
|
|
...List.generate(
|
|
|
|
|
model.prescriptionList[0]
|
|
|
|
|
.rowcount,
|
|
|
|
|
model.prescriptionList[0].rowcount,
|
|
|
|
|
(index) => Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: MediaQuery.of(
|
|
|
|
|
context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.022,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.022,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.spaceBetween,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
// crossAxisAlignment:
|
|
|
|
|
// CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
height: MediaQuery.of(
|
|
|
|
|
context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.21,
|
|
|
|
|
width: MediaQuery.of(
|
|
|
|
|
context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.1,
|
|
|
|
|
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) !=
|
|
|
|
|
(DateTime.parse(model.prescriptionList[0].entityList[index]
|
|
|
|
|
.createdOn) !=
|
|
|
|
|
null
|
|
|
|
|
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn).year)
|
|
|
|
|
.toString()
|
|
|
|
|
: DateTime.now()
|
|
|
|
|
? (DateTime.parse(model.prescriptionList[0]
|
|
|
|
|
.entityList[index].createdOn)
|
|
|
|
|
.year)
|
|
|
|
|
.toString()
|
|
|
|
|
: DateTime.now().year)
|
|
|
|
|
.toString(),
|
|
|
|
|
color: Colors
|
|
|
|
|
.green,
|
|
|
|
|
fontSize:
|
|
|
|
|
13.5,
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
AppDateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn !=
|
|
|
|
|
AppDateUtils.getMonth(model.prescriptionList[0]
|
|
|
|
|
.entityList[index].createdOn !=
|
|
|
|
|
null
|
|
|
|
|
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn)
|
|
|
|
|
.month)
|
|
|
|
|
: DateTime.now()
|
|
|
|
|
? (DateTime.parse(model.prescriptionList[0]
|
|
|
|
|
.entityList[index].createdOn)
|
|
|
|
|
.month)
|
|
|
|
|
: DateTime.now().month)
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
color: Colors
|
|
|
|
|
.green,
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
DateTime.parse(model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.createdOn)
|
|
|
|
|
DateTime.parse(
|
|
|
|
|
model.prescriptionList[0].entityList[index].createdOn)
|
|
|
|
|
.day
|
|
|
|
|
.toString(),
|
|
|
|
|
color: Colors
|
|
|
|
|
.green,
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
AppDateUtils.getTimeFormated(DateTime.parse(model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.createdOn))
|
|
|
|
|
.prescriptionList[0].entityList[index].createdOn))
|
|
|
|
|
.toString(),
|
|
|
|
|
color: Colors
|
|
|
|
|
.green,
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -269,55 +213,36 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
// .size
|
|
|
|
|
// .height *
|
|
|
|
|
// 0.3499,
|
|
|
|
|
width: MediaQuery.of(
|
|
|
|
|
context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.77,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.77,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Start Date:',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
14.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 14.0,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
AppText(
|
|
|
|
|
child: AppText(
|
|
|
|
|
AppDateUtils.getDateFormatted(DateTime.parse(model
|
|
|
|
|
.prescriptionList[0]
|
|
|
|
|
.entityList[index]
|
|
|
|
|
.startDate)),
|
|
|
|
|
fontSize:
|
|
|
|
|
13.5,
|
|
|
|
|
.prescriptionList[0].entityList[index].startDate)),
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width:
|
|
|
|
|
6.0,
|
|
|
|
|
width: 6.0,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'Order Type:',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
14.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 14.0,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
AppText(
|
|
|
|
|
model
|
|
|
|
|
.prescriptionList[0]
|
|
|
|
|
.entityList[index]
|
|
|
|
|
child: AppText(
|
|
|
|
|
model.prescriptionList[0].entityList[index]
|
|
|
|
|
.orderTypeDescription,
|
|
|
|
|
fontSize:
|
|
|
|
|
13.0,
|
|
|
|
|
fontSize: 13.0,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -328,20 +253,13 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors
|
|
|
|
|
.white,
|
|
|
|
|
child:
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
AppText(
|
|
|
|
|
model
|
|
|
|
|
.prescriptionList[0]
|
|
|
|
|
.entityList[index]
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
model.prescriptionList[0].entityList[index]
|
|
|
|
|
.medicationName,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
15.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
@ -353,14 +271,9 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
AppText(
|
|
|
|
|
model
|
|
|
|
|
.prescriptionList[0]
|
|
|
|
|
.entityList[index]
|
|
|
|
|
.doseDetail,
|
|
|
|
|
fontSize:
|
|
|
|
|
15.0,
|
|
|
|
|
child: AppText(
|
|
|
|
|
model.prescriptionList[0].entityList[index].doseDetail,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
@ -372,25 +285,18 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Indication: ',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
17.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 17.0,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
RichText(
|
|
|
|
|
maxLines:
|
|
|
|
|
3,
|
|
|
|
|
overflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
strutStyle:
|
|
|
|
|
StrutStyle(fontSize: 12.0),
|
|
|
|
|
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),
|
|
|
|
|
style: TextStyle(color: Colors.black),
|
|
|
|
|
text: model.prescriptionList[0].entityList[index]
|
|
|
|
|
.indication),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -399,25 +305,18 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'UOM: ',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
17.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 17.0,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
RichText(
|
|
|
|
|
maxLines:
|
|
|
|
|
3,
|
|
|
|
|
overflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
strutStyle:
|
|
|
|
|
StrutStyle(fontSize: 12.0),
|
|
|
|
|
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),
|
|
|
|
|
style: TextStyle(color: Colors.black),
|
|
|
|
|
text: model
|
|
|
|
|
.prescriptionList[0].entityList[index].uom),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -426,25 +325,24 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'BOX Quantity: ',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
17.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 17.0,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
RichText(
|
|
|
|
|
maxLines:
|
|
|
|
|
3,
|
|
|
|
|
overflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
strutStyle:
|
|
|
|
|
StrutStyle(fontSize: 12.0),
|
|
|
|
|
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()),
|
|
|
|
|
style: TextStyle(color: Colors.black),
|
|
|
|
|
text: model.prescriptionList[0].entityList[index]
|
|
|
|
|
.quantity
|
|
|
|
|
.toString() ==
|
|
|
|
|
null
|
|
|
|
|
? ""
|
|
|
|
|
: model.prescriptionList[0].entityList[index]
|
|
|
|
|
.quantity
|
|
|
|
|
.toString()),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -453,46 +351,43 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'pharmacy Intervention ',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
17.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 17.0,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
RichText(
|
|
|
|
|
maxLines:
|
|
|
|
|
3,
|
|
|
|
|
overflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
strutStyle:
|
|
|
|
|
StrutStyle(fontSize: 12.0),
|
|
|
|
|
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()),
|
|
|
|
|
style: TextStyle(color: Colors.black),
|
|
|
|
|
text: model.prescriptionList[0].entityList[index]
|
|
|
|
|
.pharmacyInervention ==
|
|
|
|
|
null
|
|
|
|
|
? ""
|
|
|
|
|
: model.prescriptionList[0].entityList[index]
|
|
|
|
|
.pharmacyInervention
|
|
|
|
|
.toString()),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height:
|
|
|
|
|
5.0),
|
|
|
|
|
SizedBox(height: 5.0),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'pharmacist Remarks : ',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
15.0,
|
|
|
|
|
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,
|
|
|
|
|
model.prescriptionList[0].entityList[index]
|
|
|
|
|
.pharmacistRemarks ==
|
|
|
|
|
null
|
|
|
|
|
? ""
|
|
|
|
|
: model.prescriptionList[0].entityList[index]
|
|
|
|
|
.pharmacistRemarks,
|
|
|
|
|
fontSize: 15.0),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
@ -503,22 +398,13 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.doctorName +
|
|
|
|
|
": ",
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w600,
|
|
|
|
|
TranslationBase.of(context).doctorName + ": ",
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
AppText(
|
|
|
|
|
model
|
|
|
|
|
.prescriptionList[0]
|
|
|
|
|
.entityList[index]
|
|
|
|
|
.doctorName,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w700,
|
|
|
|
|
child: AppText(
|
|
|
|
|
model.prescriptionList[0].entityList[index].doctorName,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
@ -530,33 +416,27 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Doctor Remarks : ',
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
fontSize:
|
|
|
|
|
13.0,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 13.0,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors
|
|
|
|
|
.white,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
// height: MediaQuery.of(context).size.height *
|
|
|
|
|
// 0.038,
|
|
|
|
|
child:
|
|
|
|
|
RichText(
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
: "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -576,66 +456,37 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
height: MediaQuery.of(
|
|
|
|
|
context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.16,
|
|
|
|
|
width: MediaQuery.of(
|
|
|
|
|
context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.06,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.16,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.06,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons
|
|
|
|
|
.edit),
|
|
|
|
|
child: Icon(Icons.edit),
|
|
|
|
|
onTap: () {
|
|
|
|
|
updatePrescriptionForm(
|
|
|
|
|
box: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.quantity,
|
|
|
|
|
uom: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.uom,
|
|
|
|
|
drugNameGeneric: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.medicationName,
|
|
|
|
|
doseUnit: model.prescriptionList[0].entityList[index].doseDailyUnitID
|
|
|
|
|
.prescriptionList[0].entityList[index].quantity,
|
|
|
|
|
uom: model.prescriptionList[0].entityList[index].uom,
|
|
|
|
|
drugNameGeneric: model.prescriptionList[0]
|
|
|
|
|
.entityList[index].medicationName,
|
|
|
|
|
doseUnit: model.prescriptionList[0].entityList[index]
|
|
|
|
|
.doseDailyUnitID
|
|
|
|
|
.toString(),
|
|
|
|
|
doseStreangth: model.prescriptionList[0].entityList[index].doseDailyQuantity
|
|
|
|
|
doseStreangth: model.prescriptionList[0]
|
|
|
|
|
.entityList[index].doseDailyQuantity
|
|
|
|
|
.toString(),
|
|
|
|
|
duration:
|
|
|
|
|
model.prescriptionList[0].entityList[index].doseDurationDays
|
|
|
|
|
duration: model.prescriptionList[0].entityList[index]
|
|
|
|
|
.doseDurationDays
|
|
|
|
|
.toString(),
|
|
|
|
|
startDate:
|
|
|
|
|
model.prescriptionList[0].entityList[index].startDate
|
|
|
|
|
startDate: model
|
|
|
|
|
.prescriptionList[0].entityList[index].startDate
|
|
|
|
|
.toString(),
|
|
|
|
|
dose: model
|
|
|
|
|
.prescriptionList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.doseTimingID
|
|
|
|
|
dose: model.prescriptionList[0].entityList[index].doseTimingID
|
|
|
|
|
.toString(),
|
|
|
|
|
frequency:
|
|
|
|
|
model.prescriptionList[0].entityList[index].frequencyID
|
|
|
|
|
frequency: model
|
|
|
|
|
.prescriptionList[0].entityList[index].frequencyID
|
|
|
|
|
.toString(),
|
|
|
|
|
rouat: model
|
|
|
|
|
.prescriptionList[0]
|
|
|
|
|
.entityList[index]
|
|
|
|
|
.routeID
|
|
|
|
|
rouat: model.prescriptionList[0].entityList[index].routeID
|
|
|
|
|
.toString(),
|
|
|
|
|
patient: patient,
|
|
|
|
|
drugId: model.prescriptionList[0].entityList[index].medicineCode,
|
|
|
|
|
@ -667,13 +518,11 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
)
|
|
|
|
|
: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.stretch,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
addPrescriptionForm(context, model,
|
|
|
|
|
patient, model.prescriptionList);
|
|
|
|
|
addPrescriptionForm(context, model, patient, model.prescriptionList);
|
|
|
|
|
//model.postPrescription();
|
|
|
|
|
},
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
@ -694,20 +543,17 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
|
|
|
|
|
height: 15.0,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.noPrescriptionListed,
|
|
|
|
|
TranslationBase.of(context).noPrescriptionListed,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).addNow,
|
|
|
|
|
|