design fixes for lab result

merge-requests/841/head
mosazaid 5 years ago
parent 4663a65fd6
commit 136313ac72

@ -551,7 +551,7 @@ const Map<String, Map<String, String>> localizedValues = {
"sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"}, "sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"},
"SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"}, "SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"},
"noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "}, "noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "},
"show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"}, "show-more-btn": {"en": "Flowchart", "ar": "النتائج التراكمية"},
"open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"}, "open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"},
"fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "}, "fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "},
"searchPatient-name": {"en": "Search Name, Medical File, Phone Number", "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف"}, "searchPatient-name": {"en": "Search Name, Medical File, Phone Number", "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف"},

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart'; import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -44,7 +45,11 @@ class LabResultWidget extends StatelessWidget {
children: [ children: [
Row( Row(
children: [ children: [
AppText(filterName), AppText(
filterName,
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
),
], ],
), ),
// InkWell( // InkWell(
@ -69,6 +74,9 @@ class LabResultWidget extends StatelessWidget {
// ), // ),
], ],
), ),
SizedBox(
height: 8,
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -77,7 +85,8 @@ class LabResultWidget extends StatelessWidget {
child: AppText( child: AppText(
TranslationBase.of(context).description, TranslationBase.of(context).description,
color: Colors.black, color: Colors.black,
bold: true, fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
), ),
), ),
), ),
@ -88,7 +97,8 @@ class LabResultWidget extends StatelessWidget {
child: AppText( child: AppText(
TranslationBase.of(context).value, TranslationBase.of(context).value,
color: Colors.black, color: Colors.black,
bold: true, fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
), ),
), ),
), ),
@ -98,16 +108,19 @@ class LabResultWidget extends StatelessWidget {
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).range, TranslationBase.of(context).range,
color: Colors.black, fontSize: SizeConfig.textMultiplier * 2.0,
bold: true, fontWeight: FontWeight.w700,
), ),
), ),
), ),
),
Expanded(
child: Container(),
) )
], ],
), ),
SizedBox( SizedBox(
height: 7, height: 4,
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,
@ -117,107 +130,132 @@ class LabResultWidget extends StatelessWidget {
height: 12, height: 12,
), ),
...List.generate( ...List.generate(
patientLabResultList.length, patientLabResultList.length,
(index) => Column( (index) => Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0XFFF2F2F2),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
child: Row(
children: [ children: [
Row( Expanded(
children: [ child: Container(
Expanded( padding: EdgeInsets.all(10),
child: Container( child: Center(
padding: EdgeInsets.all(10), child: AppText(
color: Colors.white, /*'${patientLabResultList[index].testCode}\n' +*/
child: Center( patientLabResultList[index].description,
child: AppText( textAlign: TextAlign.center,
'${patientLabResultList[index].testCode}\n' + fontSize: SizeConfig.textMultiplier * 1.8,
patientLabResultList[index].description, isCopyable: true,
textAlign: TextAlign.center,
isCopyable: true,
),
),
), ),
), ),
Expanded( ),
child: Container( ),
padding: EdgeInsets.all(10), Expanded(
color: Colors.white, child: Row(
child: Center( children: [
child: AppText( Container(
patientLabResultList[index].resultValue ?? decoration: BoxDecoration(
"" + shape: BoxShape.circle,
" " + color: Colors.red.shade700,
"${patientLabResultList[index].uOM ?? ""}", // borderRadius: BorderRadius.all(
textAlign: TextAlign.center, // Radius.circular(25.0),
isCopyable: true, // ),
),
child: Icon(
Icons.arrow_circle_up_sharp,
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
child: Center(
child: AppText(
patientLabResultList[index].resultValue ??
"" +
" " +
"${patientLabResultList[index].uOM ?? ""}",
textAlign: TextAlign.center,
isCopyable: true,
fontSize: SizeConfig.textMultiplier * 1.8,
),
), ),
), ),
), ),
],
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
// color: Colors.white,
child: Center(
child: AppText(
patientLabResultList[index].referanceRange,
textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true,
),
), ),
Expanded( ),
child: Column( ),
children: [ Expanded(
Container( child: Container(
padding: EdgeInsets.all(10), child: InkWell(
color: Colors.white, onTap: () {
child: Center( Navigator.push(
child: AppText( context,
patientLabResultList[index].referanceRange, FadePage(
textAlign: TextAlign.center, page: FlowChartPage(
isCopyable: true, filterName:
), patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
), ),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
), ),
SizedBox( );
height: 12, },
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.red.shade700,
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
// child: AppText(
// " (show details)",
// color: Colors.blue,
// fontSize: 12,
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
fontSize: 12,
),
],
),
)
], ],
), ),
), ),
], ),
), ),
// SizedBox(
// height: 12,
// ),
Divider(),
], ],
)) ),
),
SizedBox(
height: 4,
),
],
),
),
SizedBox(
height: 6,
),
Divider(),
// Table( // Table(
// border: TableBorder.symmetric( // border: TableBorder.symmetric(
// inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid), // inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -84,17 +85,18 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5.0), Radius.circular(5.0),
)), ),),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 10, right: 10), left: 0, right: 0),
child: AppText( child: AppText(
TranslationBase.of(context) TranslationBase.of(context)
.generalResult, .generalResult,
bold: true, fontSize: SizeConfig.textMultiplier * 2.3,
bold: false,
))), ))),
Container( Container(
width: 25, width: 25,
@ -141,7 +143,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
patient: widget.patient, patient: widget.patient,
isInpatient: widget.isInpatient, isInpatient: widget.isInpatient,
), ),
) ),
], ],
), ),
), ),
@ -149,7 +151,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
], ],
), ),
) )
else else if (widget.details == null)
Container( Container(
child: ErrorMessage( child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable, error: TranslationBase.of(context).noDataAvailable,

Loading…
Cancel
Save