WD: lab report changes along with the cross added to the FlowChartPage.dart

merge-update-with-lab-changes
taha.alam 1 year ago
parent 636a67b720
commit eafb7f5f7b

@ -119,6 +119,7 @@ class LabResult {
ResultFlag? calculatedResultFlag; ResultFlag? calculatedResultFlag;
dynamic verifiedOnDateTime; dynamic verifiedOnDateTime;
num? percentage; num? percentage;
num? width;
LabResult( LabResult(
{this.description, {this.description,

@ -73,7 +73,9 @@ class LabsService extends BaseService {
patientLabSpecialResult.clear(); patientLabSpecialResult.clear();
labResultList.clear(); labResultList.clear();
response['ListPLR'].forEach((lab) { response['ListPLR'].forEach((lab) {
labResultList.add(LabResult.fromJson(lab)); labResultList.add(
LabResult.fromJson(lab),
);
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -126,24 +126,24 @@ class LabsViewModel extends BaseViewModel {
final division = 0.2; final division = 0.2;
switch (flag) { switch (flag) {
case ResultFlag.N: //4 case ResultFlag.N: //4
percentage = division * 2; percentage = division * 1.75;
break; break;
case ResultFlag.H: //5 case ResultFlag.H: //5
percentage = division * 3.2; percentage = division * 2.8;
break; break;
case ResultFlag.L: //3 case ResultFlag.L: //3
percentage = division * .9; percentage = division * .7;
break; break;
case ResultFlag.CL: //2 case ResultFlag.CL: //2
case ResultFlag.LCL: // case ResultFlag.LCL: //
percentage = division * .3; percentage = division * .07;
break; break;
case ResultFlag.HCH: //7 case ResultFlag.HCH: //7
case ResultFlag.CH: //6 case ResultFlag.CH: //6
percentage = division * 3.8; percentage = division * 3.4;
break; break;
case ResultFlag.IRR: case ResultFlag.IRR:
percentage = 0; percentage = 0;

@ -54,7 +54,22 @@ class FlowChartPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Container( Padding(
padding: const EdgeInsets.only(
top: 16.0, right: 16.0, bottom: 10),
child: GestureDetector(
onTap: () => Navigator.pop(context),
child: Align(
alignment: Alignment.centerRight,
child: Icon(
Icons.close,
color: Colors.black,
size: 28,
),
),
),
),
Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 17, top: 12, right: 13, bottom: 12), left: 17, top: 12, right: 13, bottom: 12),

@ -86,7 +86,7 @@ class CustomResultProgressBar extends StatelessWidget {
title: TranslationBase.of(context).criticalLow, title: TranslationBase.of(context).criticalLow,
), ),
SizedBox( SizedBox(
width: 4, width: 2,
), ),
_buildResultBar( _buildResultBar(
key: l, key: l,
@ -95,7 +95,7 @@ class CustomResultProgressBar extends StatelessWidget {
title: TranslationBase.of(context).low, title: TranslationBase.of(context).low,
), ),
SizedBox( SizedBox(
width: 4, width: 2,
), ),
_buildResultBar( _buildResultBar(
key: n, key: n,
@ -104,7 +104,7 @@ class CustomResultProgressBar extends StatelessWidget {
title: TranslationBase.of(context).normal, title: TranslationBase.of(context).normal,
), ),
SizedBox( SizedBox(
width: 4, width: 2,
), ),
_buildResultBar( _buildResultBar(
key: h, key: h,
@ -113,7 +113,7 @@ class CustomResultProgressBar extends StatelessWidget {
title: TranslationBase.of(context).high, title: TranslationBase.of(context).high,
), ),
SizedBox( SizedBox(
width: 4, width: 2,
), ),
_buildResultBar( _buildResultBar(
key: ch, key: ch,
@ -132,7 +132,7 @@ class CustomResultProgressBar extends StatelessWidget {
TextCloud( TextCloud(
text: "${value}", text: "${value}",
color: getColorForResultType(type), color: getColorForResultType(type),
width: 60, width: 100,
height: 20, height: 20,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
axisDirection: AxisDirection.up, axisDirection: AxisDirection.up,
@ -176,11 +176,11 @@ class CustomResultProgressBar extends StatelessWidget {
Text( Text(
title, title,
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 8,
fontFamily: 'Poppins', fontFamily: 'Poppins',
letterSpacing: -0.24, letterSpacing: -0.3,
color: color, color: color,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w400,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -234,8 +234,7 @@ class TextCloud extends StatelessWidget {
child: Center( child: Center(
child: Text( child: Text(
text, text,
style: TextStyle( style: TextStyle(color: Colors.white, fontSize: 9, letterSpacing: -.3),
color: Colors.white, fontSize: 10, letterSpacing: -.24),
)), )),
), ),
Builder(builder: (context) { Builder(builder: (context) {

Loading…
Cancel
Save