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,
@ -121,26 +134,48 @@ class LabResultWidget extends StatelessWidget {
(index) => Column( (index) => Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0XFFF2F2F2),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
child: Row(
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white,
child: Center( child: Center(
child: AppText( child: AppText(
'${patientLabResultList[index].testCode}\n' + /*'${patientLabResultList[index].testCode}\n' +*/
patientLabResultList[index].description, patientLabResultList[index].description,
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true, isCopyable: true,
), ),
), ),
), ),
), ),
Expanded(
child: Row(
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.red.shade700,
// borderRadius: BorderRadius.all(
// Radius.circular(25.0),
// ),
),
child: Icon(
Icons.arrow_circle_up_sharp,
),
),
Expanded( Expanded(
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white,
child: Center( child: Center(
child: AppText( child: AppText(
patientLabResultList[index].resultValue ?? patientLabResultList[index].resultValue ??
@ -149,28 +184,31 @@ class LabResultWidget extends StatelessWidget {
"${patientLabResultList[index].uOM ?? ""}", "${patientLabResultList[index].uOM ?? ""}",
textAlign: TextAlign.center, textAlign: TextAlign.center,
isCopyable: true, isCopyable: true,
fontSize: SizeConfig.textMultiplier * 1.8,
), ),
), ),
), ),
), ),
],
),
),
Expanded( Expanded(
child: Column( child: Container(
children: [
Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white, // color: Colors.white,
child: Center( child: Center(
child: AppText( child: AppText(
patientLabResultList[index].referanceRange, patientLabResultList[index].referanceRange,
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true, isCopyable: true,
), ),
), ),
), ),
SizedBox(
height: 12,
), ),
InkWell( Expanded(
child: Container(
child: InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
@ -190,34 +228,34 @@ class LabResultWidget extends StatelessWidget {
), ),
); );
}, },
// child: AppText(
// " (show details)",
// color: Colors.blue,
// fontSize: 12,
// ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
AppText( AppText(
TranslationBase.of(context).showMoreBtn, TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline, textDecoration: TextDecoration.underline,
color: Colors.blue, color: Colors.red.shade700,
fontSize: 12, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
], ],
), ),
) ),
),
),
], ],
), ),
), ),
SizedBox(
height: 4,
),
], ],
), ),
// SizedBox( ),
// height: 12, SizedBox(
// ), height: 6,
),
Divider(), 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