From ebb130af09af5ec419a4f938442d8f378eb8ac8a Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 29 Mar 2021 10:42:46 +0300 Subject: [PATCH] Medical Report New Design --- .../medical-file/medical_file_details.dart | 251 ++++++++++-------- .../medical-file/medical_file_page.dart | 116 +++----- 2 files changed, 173 insertions(+), 194 deletions(-) diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 64e4405b..63006f65 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -140,134 +140,155 @@ class _MedicalFileDetailsState extends State { child: Container( child: Column( children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).visitDate + - ": ", - fontWeight: FontWeight.w700, + Container( + width: double.infinity, + margin: EdgeInsets.only( + top: 10, left: 10, right: 10), + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), ), - if (model.medicalFileList.length != 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - AppText(model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .appointmentDate - .toString()), - SizedBox(width: 35.0), - // AppText( - // 'Appt Date : ', - // fontWeight: FontWeight.w700, - // ), - // AppText( - // '23/12/2020', - // ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).doctorName + - ": ".toUpperCase(), - fontWeight: FontWeight.w700, - ), - if (model.medicalFileList.length != 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - Expanded( - child: AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .doctorName - .toUpperCase(), - fontWeight: FontWeight.w700, - ), - ), - ], - ), - if (model.medicalFileList.length != 0) - Row( + border: Border.all( + color: Colors.grey[200], width: 0.5), + ), + child: Column( children: [ - AppText( - TranslationBase.of(context) - .clinicName + - ": ", - fontWeight: FontWeight.w700, + Row( + children: [ + if (model.medicalFileList.length != + 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + Expanded( + child: AppText( + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations[0] + .doctorName + .toUpperCase(), + fontWeight: FontWeight.w700, + ), + ), + ], ), - if (model.medicalFileList.length != 0 && - model + if (model.medicalFileList.length != 0) + Row( + children: [ + AppText( + TranslationBase.of(context) + .clinic + + ": ", + fontWeight: FontWeight.w700, + ), + if (model.medicalFileList + .length != + 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + AppText( + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations[0] + .clinicName, + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context) + .episode + + ": ", + fontWeight: FontWeight.w700, + ), + if (model.medicalFileList.length != + 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + AppText( + model .medicalFileList[0] .entityList[0] .timelines[encounterNumber] .timeLineEvents[0] - .consulations - .length != - 0) - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .clinicName, - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).episode + - ": ", - fontWeight: FontWeight.w700, - ), - if (model.medicalFileList.length != 0 && - model + .consulations[0] + .episodeID + .toString(), + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context) + .visitDate + + ": ", + fontWeight: FontWeight.w700, + ), + if (model.medicalFileList.length != + 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + AppText(model .medicalFileList[0] .entityList[0] .timelines[encounterNumber] .timeLineEvents[0] - .consulations - .length != - 0) - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .episodeID - .toString(), + .consulations[0] + .appointmentDate + .toString()), + SizedBox(width: 35.0), + // AppText( + // 'Appt Date : ', + // fontWeight: FontWeight.w700, + // ), + // AppText( + // '23/12/2020', + // ), + ], ), - ], - ), - SizedBox(height: 15.0), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey.shade400, + ], + ), ), + SizedBox(height: 25.0), if (model.medicalFileList.length != 0 && model diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index b0901e0a..ae50e9a2 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -103,27 +103,31 @@ class _MedicalFilePageState extends State { padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), child: Container( - child: Column( - children: [ - Row( - children: [ - AppText( - 'Medical', - fontSize: 15.0, - fontWeight: FontWeight.normal, - ), - ], - ), - Row( - children: [ - AppText( - 'Report', - fontSize: 35.0, - fontWeight: FontWeight.w700, - ), - ], - ), - ], + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + 'Medical', + fontSize: 13.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + 'Report', + fontSize: 30.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), ), ), ), @@ -223,7 +227,7 @@ class _MedicalFilePageState extends State { BorderRadius.all( Radius.circular(30)), child: Image.network( - 'https://media.istockphoto.com/photos/portrait-senior-asian-doctor-over-radiography-background-asian-picture-id1019862020?k=6&m=1019862020&s=612x612&w=0&h=40frRnNnEGhNv5XRcDMRn55bIxCC3oXzbO6pOSQL_sQ=', + 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg', fit: BoxFit.cover, width: 60, height: 70, @@ -291,59 +295,6 @@ class _MedicalFilePageState extends State { ) ], ), - // Row( - // children: [ - // Expanded( - // child: AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .doctorName, - // fontWeight: FontWeight.w700, - // fontSize: 18.0, - // fontFamily: 'Poppins', - // ), - // ), - // ], - // ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context).branch + - // ": ", - // fontWeight: FontWeight.w700, - // ), - // AppText(model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .projectName), - // ], - // ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .clinicName + - // ": ", - // fontWeight: FontWeight.w700, - // ), - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .clinicName, - // ), - // ], - // ), - // SizedBox(height: 10.0), - // Divider( - // height: 1.0, - // thickness: 1.0, - // color: Colors.grey.shade400, - // ) ], ), ), @@ -365,10 +316,17 @@ class _MedicalFilePageState extends State { ), ); }) - : Container( - child: AppText( - 'THERES NO MEDICAL FILE FOR THIS Patient', - ), + : Column( + children: [ + Container( + child: AppText( + 'THERES NO MEDICAL FILE FOR THIS Patient', + ), + ), + SizedBox( + height: 400, + ) + ], ) ], ),