Merge branch 'development' into feature-ucaf

merge-requests/227/head
mosazaid 4 years ago
commit a51239447b

File diff suppressed because it is too large Load Diff

@ -9,12 +9,13 @@ class MedicalFileService extends BaseService {
List<MedicalFileModel> get medicalFileList => _medicalFileList; List<MedicalFileModel> get medicalFileList => _medicalFileList;
MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel( MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel(
patientMRN: 1231755, //patientMRN: 1231755,
vidaAuthTokenID: vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU",
); );
Future getMedicalFile() async { Future getMedicalFile({int mrn}) async {
_fileRequestModel = MedicalFileRequestModel(patientMRN: mrn);
hasError = false; hasError = false;
_medicalFileList.clear(); _medicalFileList.clear();
await baseAppClient.post(GET_MEDICAL_FILE, await baseAppClient.post(GET_MEDICAL_FILE,

@ -12,11 +12,11 @@ class MedicalFileViewModel extends BaseViewModel {
List<MedicalFileModel> get medicalFileList => List<MedicalFileModel> get medicalFileList =>
_medicalFileService.medicalFileList; _medicalFileService.medicalFileList;
Future getMedicalFile() async { Future getMedicalFile({int mrn}) async {
hasError = false; hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
await _medicalFileService.getMedicalFile(); await _medicalFileService.getMedicalFile(mrn: mrn);
if (_medicalFileService.hasError) { if (_medicalFileService.hasError) {
error = _medicalFileService.error; error = _medicalFileService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/widgets/shared/Text.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:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -16,21 +17,42 @@ class MedicalFileDetails extends StatefulWidget {
String firstName; String firstName;
String lastName; String lastName;
String gender; String gender;
MedicalFileDetails({this.age, this.firstName, this.lastName, this.gender}); int encounterNumber;
int pp;
MedicalFileDetails(
{this.age,
this.firstName,
this.lastName,
this.gender,
this.encounterNumber,
this.pp});
@override @override
_MedicalFileDetailsState createState() => _MedicalFileDetailsState( _MedicalFileDetailsState createState() => _MedicalFileDetailsState(
firstName: firstName, age: age, lastName: lastName, gender: gender); firstName: firstName,
age: age,
lastName: lastName,
gender: gender,
encounterNumber: encounterNumber,
pp: pp);
} }
class _MedicalFileDetailsState extends State<MedicalFileDetails> { class _MedicalFileDetailsState extends State<MedicalFileDetails> {
int encounterNumber;
String age; String age;
String firstName; String firstName;
String lastName; String lastName;
String gender; String gender;
int pp;
_MedicalFileDetailsState( _MedicalFileDetailsState(
{this.age, this.firstName, this.lastName, this.gender}); {this.age,
this.firstName,
this.lastName,
this.gender,
this.encounterNumber,
this.pp});
bool isPhysicalExam = false; bool isPhysicalExam = false;
bool isProcedureExpand = false; bool isProcedureExpand = false;
bool isHistoryExpand = false; bool isHistoryExpand = false;
@ -39,13 +61,15 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<MedicalFileViewModel>( return BaseView<MedicalFileViewModel>(
//onModelReady: (model) => model.getMedicalFile(), onModelReady: (model) => model.getMedicalFile(mrn: pp),
builder: builder:
(BuildContext context, MedicalFileViewModel model, Widget child) => (BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'medical file'.toUpperCase(), appBarTitle: 'medical file'.toUpperCase(),
body: SingleChildScrollView( body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
@ -111,17 +135,23 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Visit Date : ', 'Visit Date : ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( if (model.medicalFileList.length != 0)
'23/12/2020', AppText(model
), .medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.appointmentDate
.toString()),
SizedBox(width: 35.0), SizedBox(width: 35.0),
AppText( // AppText(
'Appt Date : ', // 'Appt Date : ',
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
AppText( // AppText(
'23/12/2020', // '23/12/2020',
), // ),
], ],
), ),
Row( Row(
@ -130,20 +160,36 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Doctor : '.toUpperCase(), 'Doctor : '.toUpperCase(),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
if (model.medicalFileList.length != 0)
AppText( AppText(
'Muhammad assad'.toUpperCase(), model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.doctorName
.toUpperCase(),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
], ],
), ),
if (model.medicalFileList.length != 0)
Row( Row(
children: [ children: [
AppText( AppText(
'Clinic : ', 'Clinic : ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
if (model.medicalFileList.length != 0)
AppText( AppText(
'Gastroenterology', model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.clinicName,
), ),
], ],
), ),
@ -153,8 +199,16 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Episode Number : ', 'Episode Number : ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
if (model.medicalFileList.length != 0)
AppText( AppText(
'200012334', model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.episodeID
.toString(),
), ),
], ],
), ),
@ -165,9 +219,11 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
color: Colors.grey.shade400, color: Colors.grey.shade400,
), ),
SizedBox(height: 25.0), SizedBox(height: 25.0),
if (model.medicalFileList.length != 0)
HeaderBodyExpandableNotifier( HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
@ -191,12 +247,51 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
: EvaIcons.plus)) : EvaIcons.plus))
], ],
), ),
bodyWidget: Column( bodyWidget: ListView.builder(
//physics: ,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstMedicalHistory
.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [ children: [
Texts( Row(
'Ms J. K. is an 83 year old retired nurse with a long history of hypertension that was previously well controlled on diuretic therapy. She was first admitted to CPMC in 1995 when she presented with a complaint of intermittent midsternal chest pain.') children: [
Expanded(
child: AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstMedicalHistory[
index]
.history
.trim(),
),
),
SizedBox(width: 35.0),
],
),
], ],
), ),
),
);
}),
isExpand: isHistoryExpand, isExpand: isHistoryExpand,
), ),
SizedBox( SizedBox(
@ -210,23 +305,28 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0)
HeaderBodyExpandableNotifier( HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Texts('assessment'.toUpperCase(), Texts('assessment'.toUpperCase(),
variant: variant: isAssessmentExpand
isAssessmentExpand ? "bodyText" : '', ? "bodyText"
bold: isAssessmentExpand ? true : false, : '',
bold:
isAssessmentExpand ? true : false,
color: Colors.black), color: Colors.black),
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isAssessmentExpand = !isAssessmentExpand; isAssessmentExpand =
!isAssessmentExpand;
}); });
}, },
child: Icon(isAssessmentExpand child: Icon(isAssessmentExpand
@ -234,11 +334,122 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
: EvaIcons.plus)) : EvaIcons.plus))
], ],
), ),
bodyWidget: Column( bodyWidget: ListView.builder(
//physics: ,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments
.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Row(
children: [ children: [
Texts('ssss'), AppText(
'ICD',
fontWeight: FontWeight.w700,
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[index]
.iCD10
.trim(),
),
SizedBox(width: 35.0),
AppText(
'Condition: ',
fontWeight: FontWeight.w700,
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[index]
.condition
.trim(),
),
],
),
Row(
children: [
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[index]
.description,
fontWeight: FontWeight.w700,
)
], ],
), ),
Row(
children: [
AppText(
'Type: ',
fontWeight: FontWeight.w700,
),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[index]
.type),
],
),
SizedBox(
height: 15.0,
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[index]
.remarks
.trim(),
),
Divider(
height: 1,
color: Colors.grey,
thickness: 1.0,
),
SizedBox(
height: 8.0,
),
],
),
),
);
}),
isExpand: isAssessmentExpand, isExpand: isAssessmentExpand,
), ),
SizedBox( SizedBox(
@ -252,23 +463,28 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0)
HeaderBodyExpandableNotifier( HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Texts('Test / procedures'.toUpperCase(), Texts('Test / procedures'.toUpperCase(),
variant: variant: isProcedureExpand
isProcedureExpand ? "bodyText" : '', ? "bodyText"
bold: isProcedureExpand ? true : false, : '',
bold:
isProcedureExpand ? true : false,
color: Colors.black), color: Colors.black),
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isProcedureExpand = !isProcedureExpand; isProcedureExpand =
!isProcedureExpand;
}); });
}, },
child: Icon(isProcedureExpand child: Icon(isProcedureExpand
@ -276,52 +492,111 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
: EvaIcons.plus)) : EvaIcons.plus))
], ],
), ),
bodyWidget: Column( bodyWidget: ListView.builder(
//physics: ,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure
.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [ children: [
SizedBox(
height: 20.0,
),
Row( Row(
children: [ children: [
AppText( AppText(
'Exam Type : ', 'Procedure ID: ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(
'59', model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure[index]
.procedureId
.trim(),
), ),
], SizedBox(width: 35.0),
),
Row(
children: [
AppText( AppText(
'ABDOMEN', 'Order Date: ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[0]
// .timeLineEvents[0]
// .consulations[0]
// .lstProcedure[index]
// .orderDate
// .trim(),
// ),
], ],
), ),
Row( Row(
children: [ children: [
AppText( AppText(
'Abnormal: ', model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure[index]
.procName,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), )
AppText(
'no',
),
], ],
), ),
SizedBox(height: 15.0),
Row( Row(
children: [ children: [
AppText( AppText(
'Some short remark about the allergy', 'CPT Code : ',
fontWeight: FontWeight.w300, fontWeight: FontWeight.w700,
), ),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure[index]
.patientID
.toString()),
], ],
), ),
SizedBox(
height: 15.0,
),
Divider(
height: 1,
color: Colors.grey,
thickness: 1.0,
),
SizedBox(
height: 8.0,
),
], ],
), ),
),
);
}),
isExpand: isProcedureExpand, isExpand: isProcedureExpand,
), ),
SizedBox( SizedBox(
@ -335,14 +610,17 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0)
HeaderBodyExpandableNotifier( HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
Texts('physical exam'.toUpperCase(), Texts('physical exam'.toUpperCase(),
variant: isPhysicalExam ? "bodyText" : '', variant:
isPhysicalExam ? "bodyText" : '',
bold: isPhysicalExam ? true : false, bold: isPhysicalExam ? true : false,
color: Colors.black), color: Colors.black),
], ],
@ -358,28 +636,54 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
: EvaIcons.plus)) : EvaIcons.plus))
], ],
), ),
bodyWidget: Column( bodyWidget: ListView.builder(
//physics: ,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam
.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Container(
child: Column(
children: [ children: [
SizedBox(
height: 20.0,
),
Row( Row(
children: [ children: [
AppText( AppText(
'Exam Type: ', 'Exam Type: ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(model
'59', .medicalFileList[0]
), .entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam[index]
.examType),
], ],
), ),
Row( Row(
children: [ children: [
AppText( AppText(
'ABDOMEN', model
.medicalFileList[0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam[index]
.examDesc,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), )
], ],
), ),
Row( Row(
@ -388,22 +692,42 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Abnormal: ', 'Abnormal: ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(model
'no', .medicalFileList[0]
), .entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam[index]
.abnormal),
], ],
), ),
SizedBox(height: 15.0), SizedBox(
Row( height: 15.0,
children: [ ),
AppText( AppText(
'Some short remark about the allergy', model
fontWeight: FontWeight.w300, .medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam[index]
.remarks,
), ),
], Divider(
height: 1,
color: Colors.grey,
thickness: 1.0,
),
SizedBox(
height: 8.0,
), ),
], ],
), ),
),
);
}),
isExpand: isPhysicalExam, isExpand: isPhysicalExam,
), ),
SizedBox( SizedBox(
@ -423,6 +747,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
), ),
), ),
), ),
),
); );
} }
} }

@ -22,7 +22,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
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<MedicalFileViewModel>( return BaseView<MedicalFileViewModel>(
onModelReady: (model) => model.getMedicalFile(), onModelReady: (model) => model.getMedicalFile(mrn: patient.patientMRN),
builder: builder:
(BuildContext context, MedicalFileViewModel model, Widget child) => (BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold( AppScaffold(
@ -30,6 +30,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
appBarTitle: 'medical Report'.toUpperCase(), appBarTitle: 'medical Report'.toUpperCase(),
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
@ -89,10 +90,13 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
thickness: 1.0, thickness: 1.0,
color: Colors.grey, color: Colors.grey,
), ),
if (model.medicalFileList.length != 0)
ListView.builder( ListView.builder(
//physics: ,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: 2, itemCount: model
.medicalFileList[0].entityList[0].timelines.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
return Padding( return Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
@ -107,10 +111,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
'Branch : ', 'Branch : ',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(model
model.medicalFileList[0].entityList[0] .medicalFileList[0]
.admissions[index].projectName, .entityList[0]
), .timelines[index]
.projectName),
], ],
), ),
Row( Row(
@ -121,8 +126,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
AppText( AppText(
model.medicalFileList[0].entityList[0] model.medicalFileList[0].entityList[0]
.admissions[index].doctor .timelines[index].doctorName,
.toUpperCase(),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
], ],
@ -135,7 +139,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
AppText( AppText(
model.medicalFileList[0].entityList[0] model.medicalFileList[0].entityList[0]
.admissions[index].clinic, .timelines[index].clinicName,
), ),
], ],
), ),
@ -157,6 +161,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
firstName: patient.firstName, firstName: patient.firstName,
lastName: patient.lastName, lastName: patient.lastName,
gender: patient.genderDescription, gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientMRN,
)), )),
); );
}, },
@ -168,6 +174,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
), ),
), ),
),
); );
} }
} }

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/screens/prescription/prescription_screen.dart
import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.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/patients/dynamic_elements.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.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_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
@ -17,14 +18,51 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
void addPrescriptionForm(context, PrescriptionViewModel model) { class AddPrescriptionFormScreen extends StatefulWidget {
@override
_AddPrescriptionFormScreenState createState() =>
_AddPrescriptionFormScreenState();
}
class _AddPrescriptionFormScreenState extends State<AddPrescriptionFormScreen> {
PrescriptionViewModel model = PrescriptionViewModel();
// PostPrescriptionReqModel addPrescriptionModel = PostPrescriptionReqModel();
// List<PrescriptionRequestModel> sss = List();
// void _presentDatePicker(id) {
// showDatePicker(
// context: context,
// initialDate: DateTime.now(),
// firstDate: DateTime(2019),
// lastDate: DateTime(2050),
// ).then((pickedDate) {
// if (pickedDate == null) {
// return;
// }
// setState(() {
// // var selectedDate = DateFormat.yMd().format(pickedDate);
// final df = new DateFormat('yyyy-MM-dd');
// model.startDate = df.format(pickedDate);
//
// strengthController.text = sss.add(PrescriptionRequestModel(doseStartDate: ''));
// //addSickLeave.startDate = selectedDate;
// });
// });
// }
@override
Widget build(BuildContext context) {
return addPrescriptionForm(context, model);
}
}
addPrescriptionForm(context, PrescriptionViewModel model) {
TextEditingController durationController = TextEditingController(); TextEditingController durationController = TextEditingController();
TextEditingController strengthController = TextEditingController(); TextEditingController strengthController = TextEditingController();
TextEditingController routeController = TextEditingController(); TextEditingController routeController = TextEditingController();
TextEditingController frequencyController = TextEditingController(); TextEditingController frequencyController = TextEditingController();
TextEditingController indicationController = TextEditingController(); TextEditingController indicationController = TextEditingController();
TextEditingController instructions = TextEditingController(); TextEditingController instructionController = TextEditingController();
TextEditingController drugIdController = TextEditingController(); TextEditingController drugIdController = TextEditingController();
TextEditingController doseController = TextEditingController(); TextEditingController doseController = TextEditingController();
@ -267,10 +305,12 @@ void addPrescriptionForm(context, PrescriptionViewModel model) {
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"))),
child: TextFields( child: TextFields(
maxLines: 6,
minLines: 4,
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context)
.instruction, .instruction,
controller: indicationController, controller: instructionController,
keyboardType: TextInputType.number, //keyboardType: TextInputType.number,
validator: (value) { validator: (value) {
if (value.isEmpty) if (value.isEmpty)
return TranslationBase.of(context) return TranslationBase.of(context)

@ -461,7 +461,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.2" version: "0.6.3-nullsafety.1"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:
@ -503,7 +503,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:
@ -760,7 +760,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:
@ -895,5 +895,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