medical file fix

merge-requests/240/head
hussam al-habibeh 5 years ago
parent ebc09db053
commit a3fa8ef839

@ -135,7 +135,15 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Visit Date : ',
fontWeight: FontWeight.w700,
),
if (model.medicalFileList.length != 0)
if (model.medicalFileList.length != 0 &&
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
AppText(model
.medicalFileList[0]
.entityList[0]
@ -160,7 +168,15 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Doctor : '.toUpperCase(),
fontWeight: FontWeight.w700,
),
if (model.medicalFileList.length != 0)
if (model.medicalFileList.length != 0 &&
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
AppText(
model
.medicalFileList[0]
@ -181,7 +197,15 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Clinic : ',
fontWeight: FontWeight.w700,
),
if (model.medicalFileList.length != 0)
if (model.medicalFileList.length != 0 &&
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
AppText(
model
.medicalFileList[0]
@ -199,7 +223,15 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Episode Number : ',
fontWeight: FontWeight.w700,
),
if (model.medicalFileList.length != 0)
if (model.medicalFileList.length != 0 &&
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
AppText(
model
.medicalFileList[0]
@ -219,7 +251,15 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
color: Colors.grey.shade400,
),
SizedBox(height: 25.0),
if (model.medicalFileList.length != 0)
if (model.medicalFileList.length != 0 &&
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment:
@ -305,7 +345,15 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox(
height: 30,
),
if (model.medicalFileList.length != 0)
if (model.medicalFileList.length != 0 &&
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment:
@ -463,7 +511,15 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox(
height: 30,
),
if (model.medicalFileList.length != 0)
if (model.medicalFileList.length != 0 &&
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment:
@ -610,7 +666,15 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox(
height: 30,
),
if (model.medicalFileList.length != 0)
if (model.medicalFileList.length != 0 &&
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment:

@ -112,12 +112,15 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
dynamic frequency;
dynamic duration;
dynamic doseTime;
dynamic indication;
List<dynamic> strengthList;
List<dynamic> routeList;
List<dynamic> frequencyList;
List<dynamic> durationList;
List<dynamic> doseTimeList;
List<dynamic> indicationList;
//PatiantInformtion patient;
dynamic _strength;
dynamic _selectedBranch;
@ -130,6 +133,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
frequencyList = List();
durationList = List();
doseTimeList = List();
indicationList = List();
dynamic regularOrder = {"id": 1, "name": "regular Order"};
dynamic urgentOrder = {"id": 2, "name": "urgent Order"};
@ -176,6 +180,30 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
dynamic doseTime10 = {"id": 10, "name": "While wake"};
dynamic doseTime11 = {"id": 12, "name": "Any Time"};
dynamic doseTime12 = {"id": 21, "name": "Bed Time"};
dynamic indication1 = {"id": 545, "name": "Gingival Hyperplasia"};
dynamic indication2 = {"id": 546, "name": "Mild Drowsiness"};
dynamic indication3 = {"id": 547, "name": "Hypertrichosis"};
dynamic indication4 = {"id": 548, "name": "Mild Dizziness"};
dynamic indication5 = {"id": 549, "name": "Enlargement of Facial Features"};
dynamic indication6 = {
"id": 550,
"name": "Phenytoin Hypersensitivity Syndrome"
};
dynamic indication7 = {"id": 551, "name": "Asterixis"};
dynamic indication8 = {"id": 552, "name": "Bullous Dermatitis"};
dynamic indication9 = {"id": 554, "name": "Purpuric Dermatitis"};
dynamic indication10 = {"id": 555, "name": "Systemic Lupus Erythematosus"};
indicationList.add(indication1);
indicationList.add(indication2);
indicationList.add(indication3);
indicationList.add(indication4);
indicationList.add(indication5);
indicationList.add(indication6);
indicationList.add(indication7);
indicationList.add(indication8);
indicationList.add(indication9);
indicationList.add(indication10);
doseTimeList.add(doseTime1);
doseTimeList.add(doseTime2);
@ -521,24 +549,46 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: TranslationBase.of(context)
.indication,
controller: indicationController,
keyboardType: TextInputType.number,
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
},
height: screenSize.height * 0.070,
child: InkWell(
onTap: indicationList != null
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: indicationList,
attributeName: 'name',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
indicationList =
selectedValue;
_selectedBranch = null;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context)
.indication,
indication != null
? indication['name']
: null,
true),
enabled: false,
),
),
),
SizedBox(height: spaceBetweenTextFileds),

Loading…
Cancel
Save