|
|
|
|
@ -44,183 +44,183 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
|
|
|
|
|
// patientLabOrder: widget.patientLabOrder,
|
|
|
|
|
// patient: widget.patient,
|
|
|
|
|
// isInpatient: widget.isInpatient),
|
|
|
|
|
builder: (_, model, w) => NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(15),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
builder: (_, model, w) => SingleChildScrollView(
|
|
|
|
|
child: NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: SafeArea(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(15),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
if (model.labResultLists.isNotEmpty)
|
|
|
|
|
Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(
|
|
|
|
|
() {
|
|
|
|
|
_isShowMoreGeneral = !_isShowMoreGeneral;
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
|
|
if (model.labResultLists.isNotEmpty)
|
|
|
|
|
Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(
|
|
|
|
|
() {
|
|
|
|
|
_isShowMoreGeneral = !_isShowMoreGeneral;
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
margin: EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(5.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
margin: EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(5.0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 0, right: 0),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).generalResult,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier! * 2.3,
|
|
|
|
|
bold: false,
|
|
|
|
|
))),
|
|
|
|
|
Container(
|
|
|
|
|
width: 25,
|
|
|
|
|
height: 25,
|
|
|
|
|
child: Icon(
|
|
|
|
|
_isShowMoreGeneral ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
|
|
|
|
color: Colors.grey[800],
|
|
|
|
|
size: 22,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 0, right: 0),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).generalResult,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier! * 2.3,
|
|
|
|
|
bold: false,
|
|
|
|
|
))),
|
|
|
|
|
Container(
|
|
|
|
|
width: 25,
|
|
|
|
|
height: 25,
|
|
|
|
|
child: Icon(
|
|
|
|
|
_isShowMoreGeneral ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
|
|
|
|
color: Colors.grey[800],
|
|
|
|
|
size: 22,
|
|
|
|
|
if (_isShowMoreGeneral)
|
|
|
|
|
AnimatedContainer(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
margin: EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
bottomLeft: Radius.circular(5.0),
|
|
|
|
|
bottomRight: Radius.circular(5.0),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (_isShowMoreGeneral)
|
|
|
|
|
AnimatedContainer(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
margin: EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
bottomLeft: Radius.circular(5.0),
|
|
|
|
|
bottomRight: Radius.circular(5.0),
|
|
|
|
|
),
|
|
|
|
|
duration: Duration(milliseconds: 7000),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ListView.builder(
|
|
|
|
|
itemCount: model.labResultLists.length,
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return LabResultWidget(
|
|
|
|
|
patientLabOrder: widget.patientLabOrder!,
|
|
|
|
|
filterName: model.labResultLists[index].filterName,
|
|
|
|
|
patientLabResultList: model.labResultLists[index].patientLabResultList,
|
|
|
|
|
patient: widget.patient!,
|
|
|
|
|
isInpatient: widget.isInpatient!,
|
|
|
|
|
model: model,
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
duration: Duration(milliseconds: 7000),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
else if (widget.details == null)
|
|
|
|
|
Container(
|
|
|
|
|
child: ErrorMessage(
|
|
|
|
|
error: TranslationBase.of(context).noDataAvailable,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
if (widget.details != null && widget.details!.isNotEmpty)
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
_isShowMore = !_isShowMore;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
margin: EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(5.0),
|
|
|
|
|
)),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ListView.builder(
|
|
|
|
|
itemCount: model.labResultLists.length,
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return LabResultWidget(
|
|
|
|
|
patientLabOrder: widget.patientLabOrder!,
|
|
|
|
|
filterName: model.labResultLists[index].filterName,
|
|
|
|
|
patientLabResultList: model.labResultLists[index].patientLabResultList,
|
|
|
|
|
patient: widget.patient!,
|
|
|
|
|
isInpatient: widget.isInpatient!,
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 0, right: 0),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).specialResult,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier! * 2.3,
|
|
|
|
|
bold: false,
|
|
|
|
|
))),
|
|
|
|
|
Container(
|
|
|
|
|
width: 25,
|
|
|
|
|
height: 25,
|
|
|
|
|
child: Icon(
|
|
|
|
|
_isShowMore ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
|
|
|
|
color: Colors.grey[800],
|
|
|
|
|
size: 22,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
else if (widget.details == null)
|
|
|
|
|
Container(
|
|
|
|
|
child: ErrorMessage(
|
|
|
|
|
error: TranslationBase.of(context).noDataAvailable,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
if (widget.details != null && widget.details!.isNotEmpty)
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
_isShowMore = !_isShowMore;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
margin: EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(5.0),
|
|
|
|
|
)),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 0, right: 0),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).specialResult,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier! * 2.3,
|
|
|
|
|
bold: false,
|
|
|
|
|
))),
|
|
|
|
|
Container(
|
|
|
|
|
width: 25,
|
|
|
|
|
height: 25,
|
|
|
|
|
child: Icon(
|
|
|
|
|
_isShowMore ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
|
|
|
|
color: Colors.grey[800],
|
|
|
|
|
size: 22,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (_isShowMore)
|
|
|
|
|
AnimatedContainer(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
margin: EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
bottomLeft: Radius.circular(5.0),
|
|
|
|
|
bottomRight: Radius.circular(5.0),
|
|
|
|
|
)),
|
|
|
|
|
duration: Duration(milliseconds: 7000),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: !Utils.isTextHtml(widget.details!)
|
|
|
|
|
? AppText(
|
|
|
|
|
widget.details ?? TranslationBase.of(context).noDataAvailable,
|
|
|
|
|
)
|
|
|
|
|
: Html(
|
|
|
|
|
data: widget.details ?? TranslationBase.of(context).noDataAvailable,
|
|
|
|
|
),
|
|
|
|
|
if (_isShowMore)
|
|
|
|
|
AnimatedContainer(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
margin: EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
bottomLeft: Radius.circular(5.0),
|
|
|
|
|
bottomRight: Radius.circular(5.0),
|
|
|
|
|
)),
|
|
|
|
|
duration: Duration(milliseconds: 7000),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: !Utils.isTextHtml(widget.details!)
|
|
|
|
|
? AppText(
|
|
|
|
|
widget.details ?? TranslationBase.of(context).noDataAvailable,
|
|
|
|
|
)
|
|
|
|
|
: Html(
|
|
|
|
|
data: widget.details ?? TranslationBase.of(context).noDataAvailable,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|