Merge remote-tracking branch 'origin/update-to-3.32-sdk' into lab_result

# Conflicts:
#	lib/config/localized_values.dart
#	lib/core/viewModels/medical/labs_view_model.dart
#	lib/widgets/data_display/medical/LabResult/full_screen_lab_result_graph.dart
lab_result
taha.alam 7 months ago
commit 6596e38b09

@ -2147,8 +2147,8 @@ const Map localizedValues = {
"readMore": {"en": "Read More", "ar": "اقرأ أكثر"}, "readMore": {"en": "Read More", "ar": "اقرأ أكثر"},
"showLess": {"en": "Show Less", "ar": "عرض أقل"}, "showLess": {"en": "Show Less", "ar": "عرض أقل"},
"change": {"en": "Change", "ar": "فرق"}, "change": {"en": "Change", "ar": "فرق"},
"referenceRange": {"en": "Reference Range", "ar": "النطاق المرجعي"}, "referenceRange": {"en": "Reference Range", "ar": "نطاق مرجعي"},
"criticalLow": {"en": "Critical Low", "ar": "النطاق المرجعي"}, "criticalLow": {"en": "Critical Low", "ar": "انخفاض حرج"},
"criticalHigh": {"en": "Critical High", "ar": "حرج مرتفع"}, "criticalHigh": {"en": "Critical High", "ar": "حرج مرتفع"},
"high": {"en": "High", "ar": "مرتفع"}, "high": {"en": "High", "ar": "مرتفع"},
"normal": {"en": "Normal", "ar": "عادي"}, "normal": {"en": "Normal", "ar": "عادي"},
@ -2843,6 +2843,7 @@ const Map localizedValues = {
"pleaseEnterValidMobile": {"en": "Please enter valid phone number", "ar": "الرجاء إدخال رقم هاتف صالح"}, "pleaseEnterValidMobile": {"en": "Please enter valid phone number", "ar": "الرجاء إدخال رقم هاتف صالح"},
"pleaseEnterNationalIdOrFileNo": {"en": "Please enter National id or File no", "ar": "الرجاء إدخال رقم الهوية الوطنية أو رقم الملف"}, "pleaseEnterNationalIdOrFileNo": {"en": "Please enter National id or File no", "ar": "الرجاء إدخال رقم الهوية الوطنية أو رقم الملف"},
"thisResult": {"en": "This Result", "ar": "هذه النتيجة"}, "thisResult": {"en": "This Result", "ar": "هذه النتيجة"},
"seeAllGraphValues": {"en": "See all values", "ar": "شاهد جميع القيم"}, "seeAllGraphValues": {"en": "View all results", "ar": "عرض جميع النتائج"},
"verify-with-biometric": {"en": "Biometric", "ar": "الحيوية"},
"verify-with-biometric": {"en": "Biometric", "ar": "الحيوية"}, "verify-with-biometric": {"en": "Biometric", "ar": "الحيوية"},
}; };

@ -325,7 +325,7 @@ class LabsService extends BaseService {
return bDate.compareTo(aDate); // descending return bDate.compareTo(aDate); // descending
}); });
print("the copied item are $copy"); // print("the copied item are $copy");
labOrdersResultsList = copy; labOrdersResultsList = copy;
return copy.take(3).toList(); return copy.take(3).toList();
} }

@ -32,8 +32,6 @@ class LabsViewModel extends BaseViewModel {
List<ThresholdRange> threshold = []; List<ThresholdRange> threshold = [];
double maxYForThreeDots = 0.0; double maxYForThreeDots = 0.0;
double maxYForCompleteGraph = 0.0; double maxYForCompleteGraph = 0.0;
List months = ['Jan','Feb','Mar','April','May','Jun','July','Aug','Sep','Oct','Nov','Dec'];
String get labReportPDF => _labsService.labReportPDF; String get labReportPDF => _labsService.labReportPDF;
@ -94,13 +92,13 @@ class LabsViewModel extends BaseViewModel {
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, invoiceType: invoiceType, orderNo: orderNo, projectID: projectID, clinicID: clinicID, setupID: setupID, isVidaPlus: isVidaPlus); await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, invoiceType: invoiceType, orderNo: orderNo, projectID: projectID, clinicID: clinicID, setupID: setupID, isVidaPlus: isVidaPlus);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error!; error = _labsService.error!;
setState(ViewState.Error); // setState(ViewState.Error);
} else { } else {
setState(ViewState.Idle); // setState(ViewState.Idle);
} }
} }
getPatientLabResult({required PatientLabOrders patientLabOrder, required bool isVidaPlus, bool isTablet = false}) async { getPatientLabResult({required PatientLabOrders patientLabOrder, required bool isVidaPlus, bool isTablet = false}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder, isVidaPlus: isVidaPlus); await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder, isVidaPlus: isVidaPlus);
if (_labsService.hasError) { if (_labsService.hasError) {
@ -109,54 +107,48 @@ class LabsViewModel extends BaseViewModel {
} else { } else {
_labsService.labResultList.forEach((element) { _labsService.labResultList.forEach((element) {
List<LabResultList> patientLabOrdersClinic = labResultLists.where((elementClinic) => elementClinic.filterName == element.testCode).toList(); List<LabResultList> patientLabOrdersClinic = labResultLists.where((elementClinic) => elementClinic.filterName == element.testCode).toList();
element.percentage = element.percentage = getPercentage(element.calculatedResultFlag ?? ResultFlag.N, isTablet);
getPercentage(element.calculatedResultFlag?? ResultFlag.N, isTablet);
if (patientLabOrdersClinic.length != 0) { if (patientLabOrdersClinic.length != 0) {
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList!.add(element); labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList!.add(element);
} else { } else {
labResultLists.add(LabResultList( labResultLists.add(LabResultList(filterName: element.testCode, description: element.packageShortDescription, lab: element));
filterName: element.testCode,
description: element.packageShortDescription,
lab: element));
} }
}); });
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
recalculatePercentage(isTablet){ recalculatePercentage(isTablet) {
for(int i = 0;i<labResultLists.length;i++){ for (int i = 0; i < labResultLists.length; i++) {
for (int j = 0; j<(labResultLists[i].patientLabResultList?.length??0 );j++){ for (int j = 0; j < (labResultLists[i].patientLabResultList?.length ?? 0); j++) {
labResultLists[i].patientLabResultList![j].percentage = getPercentage(labResultLists[i].patientLabResultList![j].calculatedResultFlag ?? ResultFlag.N, isTablet);
labResultLists[i].patientLabResultList![j].percentage = getPercentage(labResultLists[i].patientLabResultList![j].calculatedResultFlag?? ResultFlag.N, isTablet);
}
} }
}
} }
double getPercentage(ResultFlag flag, bool isTablet) { double getPercentage(ResultFlag flag, bool isTablet) {
double percentage = 0.0; double percentage = 0.0;
var division = (1/15); var division = (1 / 15);
print("its a tablet $isTablet");
switch (flag) { switch (flag) {
case ResultFlag.N: case ResultFlag.N:
percentage = division * (isTablet?7.25:6.85); percentage = division * (isTablet ? 7.25 : 6.85);
break; break;
case ResultFlag.H: case ResultFlag.H:
percentage = division * (isTablet?11:10.9); percentage = division * (isTablet ? 11 : 10.9);
break; break;
case ResultFlag.L: case ResultFlag.L:
percentage = division * (isTablet?3.5:2.95); percentage = division * (isTablet ? 3.5 : 2.95);
break; break;
case ResultFlag.CL: case ResultFlag.CL:
case ResultFlag.LCL: case ResultFlag.LCL:
percentage = division * (isTablet?0.7:.04); percentage = division * (isTablet ? 0.7 : .04);
break; break;
case ResultFlag.HCH: case ResultFlag.HCH:
case ResultFlag.CH: case ResultFlag.CH:
percentage = division * (isTablet?13.5:13.3); percentage = division * (isTablet ? 13.5 : 13.3);
break; break;
case ResultFlag.IRR: case ResultFlag.IRR:
percentage = 0; percentage = 0;
@ -178,7 +170,6 @@ class LabsViewModel extends BaseViewModel {
error = _labsService.error!; error = _labsService.error!;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
/// commented out based on PAP-304 /// commented out based on PAP-304
// bool isShouldClear = false; // bool isShouldClear = false;
// if (_labsService.labOrdersResultsList.length == 1) { // if (_labsService.labOrdersResultsList.length == 1) {
@ -192,24 +183,19 @@ class LabsViewModel extends BaseViewModel {
// _labsService.labOrdersResultsList.clear(); // _labsService.labOrdersResultsList.clear();
var sortedResponse = _labsService.sortByFlagAndValue(_labsService.labOrdersResultsList); var sortedResponse = _labsService.sortByFlagAndValue(_labsService.labOrdersResultsList);
print("the sorted list is ${sortedResponse}");
var recentThree = _labsService.getMostRecentThree(sortedResponse); var recentThree = _labsService.getMostRecentThree(sortedResponse);
print("the recentThree list is ${recentThree}");
var mappedToThresholdValue = _labsService.getThresholdValue(); var mappedToThresholdValue = _labsService.getThresholdValue();
// var mappedToThresholdValue = _labsService.buildThresholdList(recentThree); // var mappedToThresholdValue = _labsService.buildThresholdList(recentThree);
// _labsService.adjustLabOrderResults(sortedResponse); // _labsService.adjustLabOrderResults(sortedResponse);
print("the recentThree list is ${mappedToThresholdValue}"); threshold = mappedToThresholdValue;
threshold = mappedToThresholdValue; List months = ['Jan', 'Feb', 'Mar', 'April', 'May', 'Jun', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
List months = ['Jan','Feb','Mar','April','May','Jun','July','Aug','Sep','Oct','Nov','Dec'];
double counter = 1; double counter = 1;
recentThree.reversed.forEach((element) { recentThree.reversed.forEach((element) {
try { try {
var dateTime = DateUtil.convertStringToDate(element.verifiedOnDateTime!); var dateTime = DateUtil.convertStringToDate(element.verifiedOnDateTime!);
// debugPrint("the double.parse(element.resultValue!) is ${double.parse(element.resultValue!)}"); // debugPrint("the double.parse(element.resultValue!) is ${double.parse(element.resultValue!)}");
if(double.parse(element.resultValue!)> maxYForThreeDots){ if (double.parse(element.resultValue!) > maxYForThreeDots) {
debugPrint("the double.parse(element.resultValue!) is ${double.parse(element.resultValue!)}");
maxYForThreeDots = double.parse(element.resultValue!); maxYForThreeDots = double.parse(element.resultValue!);
} }
// threePointGraphValue.add(DataPoint( labelValue: counter,value : _labsService.transformValueInRange(double.parse(element.resultValue!), element.calculatedResultFlag??""), label: "${months[dateTime.month-1]} ${dateTime.year}", date: dateTime)); // threePointGraphValue.add(DataPoint( labelValue: counter,value : _labsService.transformValueInRange(double.parse(element.resultValue!), element.calculatedResultFlag??""), label: "${months[dateTime.month-1]} ${dateTime.year}", date: dateTime));
@ -217,7 +203,6 @@ class LabsViewModel extends BaseViewModel {
counter++; counter++;
} catch (e) {} } catch (e) {}
}); });
debugPrint("the maxY is ${maxYForThreeDots}");
threePointGraphValue.last.label = "thisResult"; threePointGraphValue.last.label = "thisResult";
threePointGraphValue.last.isStringResource = true; threePointGraphValue.last.isStringResource = true;
@ -227,9 +212,7 @@ class LabsViewModel extends BaseViewModel {
/// This function is used to create a full graph data points for the lab results. /// This function is used to create a full graph data points for the lab results.
/// @param onComplete: A callback function that is called when the data points are created. /// @param onComplete: A callback function that is called when the data points are created.
createFullGraphDatPoints( createFullGraphDatPoints(VoidCallback onComplete) {
VoidCallback onComplete
){
maxYForCompleteGraph = 0.0; maxYForCompleteGraph = 0.0;
completeeGraphValues.clear(); completeeGraphValues.clear();
setState(ViewState.Busy); setState(ViewState.Busy);
@ -245,14 +228,9 @@ class LabsViewModel extends BaseViewModel {
completeeGraphValues.add(DataPoint( labelValue: counter,value : double.parse(element.resultValue!), label: formatDateAsMMYY(dateTime), date: dateTime,actualValue: element.resultValue!, referenceRangeValue:element.calculatedResultFlag??"IRR" )); completeeGraphValues.add(DataPoint( labelValue: counter,value : double.parse(element.resultValue!), label: formatDateAsMMYY(dateTime), date: dateTime,actualValue: element.resultValue!, referenceRangeValue:element.calculatedResultFlag??"IRR" ));
} catch (e) { } catch (e) {
print("the mapping is having exception $e"); print("the mapping is having exception $e");
} }
++counter; ++counter;
}); });
print("the label values are $counter");
print("the completeeGraphValues length are ${completeeGraphValues.length}");
print("the completeeGraphValues last value of label ias ${completeeGraphValues.last.labelValue}");
completeeGraphValues.last.label = "thisResult"; completeeGraphValues.last.label = "thisResult";
completeeGraphValues.last.isStringResource = true; completeeGraphValues.last.isStringResource = true;
setState(ViewState.Idle); setState(ViewState.Idle);
@ -291,8 +269,7 @@ class LabsViewModel extends BaseViewModel {
Future<String> _createFileFromString(String encodedStr, String ext) async { Future<String> _createFileFromString(String encodedStr, String ext) async {
Uint8List bytes = base64.decode(encodedStr); Uint8List bytes = base64.decode(encodedStr);
String dir = (await getApplicationDocumentsDirectory()).path; String dir = (await getApplicationDocumentsDirectory()).path;
File file = File( File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext);
"$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext);
await file.writeAsBytes(bytes); await file.writeAsBytes(bytes);
return file.path; return file.path;
} }

@ -34,7 +34,6 @@ void main() async {
await Firebase.initializeApp(); await Firebase.initializeApp();
await initLocalStorage(); await initLocalStorage();
// Pass all uncaught "fatal" errors from the framework to Crashlytics // Pass all uncaught "fatal" errors from the framework to Crashlytics
// FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError; // FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
@ -117,8 +116,7 @@ class _MyApp extends State<MyApp> {
void openAppLink(Uri uri) { void openAppLink(Uri uri) {
print("the uri is $uri"); print("the uri is $uri");
DeepLinkHandler.instance.handleDeepLinkAndNavigation( DeepLinkHandler.instance.handleDeepLinkAndNavigation(locator<NavigationService>().navigatorKey.currentState, uri, context);
locator<NavigationService>().navigatorKey.currentState, uri, context);
} }
@override @override
@ -142,7 +140,8 @@ class _MyApp extends State<MyApp> {
providers: [ providers: [
ChangeNotifierProvider<PharmacyPagesViewModel>( ChangeNotifierProvider<PharmacyPagesViewModel>(
create: (context) => PharmacyPagesViewModel(), create: (context) => PharmacyPagesViewModel(),
), ChangeNotifierProvider<AuthProviderViewModel>( ),
ChangeNotifierProvider<AuthProviderViewModel>(
create: (context) => AuthProviderViewModel(), create: (context) => AuthProviderViewModel(),
), ),
ChangeNotifierProvider<ProjectViewModel>( ChangeNotifierProvider<ProjectViewModel>(

@ -31,144 +31,126 @@ class FlowChartPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>( return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabOrdersResults( onModelReady: (model) =>
patientLabOrder: patientLabOrder, model.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: filterName, isVidaPlus: Utils.isVidaPlusProject(projectViewModel!, int.parse(patientLabOrder!.projectID!))),
procedure: filterName, builder: (context, model, w) {
isVidaPlus: Utils.isVidaPlusProject( return SizedBox(
projectViewModel!, int.parse(patientLabOrder!.projectID!))), height: MediaQuery.sizeOf(context).height * .75,
builder: (context, model, w) { child: (model.state == ViewState.Busy)
print("the maxY in builder is ${model.maxYForCompleteGraph}"); ? Material(
return SizedBox( color: Colors.grey.withOpacity(0.6),
height: MediaQuery.sizeOf(context).height * .75, shape: RoundedRectangleBorder(borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20))),
child: (model.state == ViewState.Busy) child: Center(
? Material( child: Container(child: GifLoaderContainer(), margin: EdgeInsets.only(bottom: MediaQuery.of(context).size.height * 0.09)),
color: Colors.grey.withOpacity(0.6), ),
shape: RoundedRectangleBorder( )
borderRadius: BorderRadius.only( : SingleChildScrollView(
topLeft: Radius.circular(20), child: model.labOrdersResultsList.isNotEmpty
topRight: Radius.circular(20))), ? Column(
child: Center( crossAxisAlignment: CrossAxisAlignment.start,
child: Container( mainAxisSize: MainAxisSize.min,
child: GifLoaderContainer(), children: [
margin: EdgeInsets.only( Padding(
bottom: MediaQuery.of(context).size.height * 0.09)), padding: const EdgeInsets.only(top: 16.0, right: 16.0, bottom: 10, left: 16.0),
), child: Row(
) mainAxisAlignment: MainAxisAlignment.spaceBetween,
: SingleChildScrollView( children: [
child: model.labOrdersResultsList.isNotEmpty Text(
? Column( filterName ?? "",
crossAxisAlignment: CrossAxisAlignment.start, style: TextStyle(
mainAxisSize: MainAxisSize.min, fontSize: 21,
children: [ fontWeight: FontWeight.w700,
color: Colors.black,
Padding( letterSpacing: -0.64,
padding: const EdgeInsets.only( ),
top: 16.0, right: 16.0, bottom: 10, left: 16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(filterName??"", style: TextStyle(
fontSize: 21,
fontWeight: FontWeight.w700,
color: Colors.black,
letterSpacing: -0.64,
),),
GestureDetector(
onTap: () => Navigator.pop(context),
child: Align(
alignment: Alignment.centerRight,
child: Icon(
Icons.close,
color: Colors.black,
size: 28,
), ),
), GestureDetector(
onTap: () => Navigator.pop(context),
child: Align(
alignment: Alignment.centerRight,
child: Icon(
Icons.close,
color: Colors.black,
size: 28,
),
),
),
],
), ),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 17, top: 12, right: 13, bottom: 12),
margin:
EdgeInsets.only(left: 21, right: 21, top: 21),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
), ),
boxShadow: [ Container(
BoxShadow( width: double.infinity,
color: Color(0xff000000).withOpacity(.05), padding: EdgeInsets.only(left: 17, top: 12, right: 13, bottom: 12),
//spreadRadius: 5, margin: EdgeInsets.only(left: 21, right: 21, top: 21),
blurRadius: 27, decoration: BoxDecoration(
offset: Offset(0, -3), shape: BoxShape.rectangle,
), color: Colors.white,
], borderRadius: BorderRadius.all(
), Radius.circular(10.0),
// child: LineChartCurved(
// title: filterName,
// labResult: model.labOrdersResultsList,
// ),
// child: ShowChart(
// title: filterName!,
// timeSeries: model.timeSeries,
// indexes: model.timeSeries.length ~/ 5.5 ?? 0,
// ),
child: Column(
children: [
SizedBox(
height: MediaQuery.sizeOf(context).height / 4,
child: DynamicResultChart(
dataPoints: model.threePointGraphValue,
thresholds: model.threshold,
maxY: model.maxYForThreeDots,
width: MediaQuery.sizeOf(context).width - 77,
scrollDirection: Axis.horizontal,
height: MediaQuery.sizeOf(context).height / 4,
), ),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
), ),
// child: LineChartCurved(
InkWell( // title: filterName,
onTap: () { // labResult: model.labOrdersResultsList,
model.createFullGraphDatPoints(() { // ),
Navigator.push(context, // child: ShowChart(
MaterialPageRoute(builder: (_) { // title: filterName!,
return FullScreenGraph( // timeSeries: model.timeSeries,
completeeGraphValues: model.completeeGraphValues, // indexes: model.timeSeries.length ~/ 5.5 ?? 0,
threshold: model.threshold, // ),
maxY : model.maxYForCompleteGraph child: Column(
); children: [
})); SizedBox(
}); height: MediaQuery.sizeOf(context).height / 4,
}, child: DynamicResultChart(
// child: Text(TranslationBase.of(context) dataPoints: model.threePointGraphValue,
// .seeAllGraphValues), thresholds: model.threshold,
child: Utils.tableColumnValueWithUnderLine(TranslationBase.of(context).seeAllGraphValues, isLast: true, isCapitable: false), maxY: model.maxYForThreeDots,
) width: MediaQuery.sizeOf(context).width - 77,
], scrollDirection: Axis.horizontal,
height: MediaQuery.sizeOf(context).height / 4,
),
),
InkWell(
onTap: () {
model.createFullGraphDatPoints(() {
Navigator.push(context, MaterialPageRoute(builder: (_) {
return FullScreenGraph(completeeGraphValues: model.completeeGraphValues, threshold: model.threshold, maxY: model.maxYForCompleteGraph);
}));
});
},
// child: Text(TranslationBase.of(context)
// .seeAllGraphValues),
child: Utils.tableColumnValueWithUnderLine(TranslationBase.of(context).seeAllGraphValues, isLast: true, isCapitable: false),
)
],
),
),
LabResultChartAndDetails(
name: filterName!,
// labResult: model.labOrdersResultsList,
labResult: model.labOrdersResultsList.reversed.toList(),
),
],
)
: Center(
child: Container(
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.32),
child: Center(
child: getNoDataWidget(context),
),
), ),
), ),
LabResultChartAndDetails( ),
name: filterName!, );
// labResult: model.labOrdersResultsList, });
labResult: model.labOrdersResultsList.reversed.toList(),
),
],
)
: Center(
child: Container(
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.height * 0.32),
child: Center(
child: getNoDataWidget(context),
),
),
),
),
);}
);
} }
} }

@ -17,7 +17,6 @@ class FullScreenGraph extends StatelessWidget {
required this.completeeGraphValues, required this.completeeGraphValues,
required this.threshold, required this.threshold,
required this.maxY}); required this.maxY});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -25,7 +24,7 @@ class FullScreenGraph extends StatelessWidget {
appBarTitle: TranslationBase.of(context).labResult, appBarTitle: TranslationBase.of(context).labResult,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8), showHomeAppBarIcon: false,backgroundColor: Color(0xffF8F8F8),
body: RotatedBox( body: RotatedBox(
quarterTurns: 1, quarterTurns: 1,
child: SizedBox( child: SizedBox(
@ -47,26 +46,27 @@ class FullScreenGraph extends StatelessWidget {
: (completeeGraphValues.length/15)) : (completeeGraphValues.length/15))
) )-100, ) )-100,
maxX: completeeGraphValues.length+1, maxX: completeeGraphValues.length+1,
// width: MediaQuery.sizeOf(context).height - 100, // width: MediaQuery.sizeOf(context).height - 100,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
height: MediaQuery.sizeOf(context).width, height: MediaQuery.sizeOf(context).width,
showBottomTitleDates: true, showBottomTitleDates: true,
isFullScreeGraph: true, isFullScreeGraph: true,
), // isFullScreenGraph: false,
), ),
), ),
), ),
), ),
), ),
),
); );
} }
// double getMax(List<DataPoint> dataPoints) { // double getMax(List<DataPoint> dataPoints) {
// double max = double.negativeInfinity; // double max = double.negativeInfinity;
// for (var point in dataPoints) { // for (var point in dataPoints) {
// if (point.value > max) { // if (point.value > max) {
// max = point.y; // max = point.y;
// } // }
// } // }
// return max; // return max;
// } // }
} }

@ -27,7 +27,6 @@ class DynamicResultChart extends StatelessWidget {
else if((maxY??0)>5 &&(maxY??0)<=10) interval = 1; else if((maxY??0)>5 &&(maxY??0)<=10) interval = 1;
else if((maxY??0)>=0 &&(maxY??0)<=5) interval = .4; else if((maxY??0)>=0 &&(maxY??0)<=5) interval = .4;
// else if((maxY??0)>=100) interval = 20; // else if((maxY??0)>=100) interval = 20;
print("the interval parameter is $interval");
// if (thresholds.isNotEmpty) { // if (thresholds.isNotEmpty) {
// print("the thresholds are $thresholds"); // print("the thresholds are $thresholds");

@ -62,6 +62,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
final shortestSide = size.shortestSide; final shortestSide = size.shortestSide;
return shortestSide >= 550; return shortestSide >= 550;
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
isTabletScreen = isTablet(context); isTabletScreen = isTablet(context);

@ -141,8 +141,6 @@ class _LabItemState extends State<LabItem> {
scrollControlDisabledMaxHeightRatio: .75, scrollControlDisabledMaxHeightRatio: .75,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20))), shape: RoundedRectangleBorder(borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20))),
builder: (context) { builder: (context) {
print('builder: the bottom sheet is showing');
return FlowChartPage( return FlowChartPage(
filterName: procedure, filterName: procedure,
patientLabOrder: widget.patientLabOrders, patientLabOrder: widget.patientLabOrders,

@ -393,6 +393,7 @@ class ItemResultCardWidgetWithParams extends StatelessWidget {
Text( Text(
"${TranslationBase.of(context).referenceRange} \n $referenceRange", "${TranslationBase.of(context).referenceRange} \n $referenceRange",
style: TextStyle( style: TextStyle(
overflow: TextOverflow.clip,
fontSize: 10, fontSize: 10,
fontFamily: fontFamily, fontFamily: fontFamily,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -262,6 +262,7 @@ class _AppScaffoldState extends State<AppScaffold> {
showCenterLogo: widget.showCenteredLogo, showCenterLogo: widget.showCenteredLogo,
isShowLanguageChanger: widget.isShowLanguageChanger, isShowLanguageChanger: widget.isShowLanguageChanger,
showSavedLoginBar: widget.showLastLoginScreenBar, showSavedLoginBar: widget.showLastLoginScreenBar,
showHomeAppBarIcon: widget.showHomeAppBarIcon,
onTap: () { onTap: () {
widget.onTap; widget.onTap;
}, },
@ -297,11 +298,7 @@ class _AppScaffoldState extends State<AppScaffold> {
icon: widget.icon, icon: widget.icon,
) )
: widget.baseViewModel != null : widget.baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(child: buildBodyWidget(context), baseViewModel: widget.baseViewModel, showLoader: widget.showLoader)
child: buildBodyWidget(context),
baseViewModel: widget.baseViewModel,
showLoader : widget.showLoader
)
: buildBodyWidget(context), : buildBodyWidget(context),
), ),
bottomNavigationBar: widget.isBottomBar bottomNavigationBar: widget.isBottomBar
@ -369,6 +366,7 @@ class NewAppBarWidget extends StatelessWidget implements PreferredSizeWidget {
final bool isShowLanguageChanger; final bool isShowLanguageChanger;
final bool showCenterLogo; final bool showCenterLogo;
final bool showSavedLoginBar; final bool showSavedLoginBar;
final bool? showHomeAppBarIcon;
String currentLang = 'ar'; String currentLang = 'ar';
@ -388,6 +386,7 @@ class NewAppBarWidget extends StatelessWidget implements PreferredSizeWidget {
this.isShowLanguageChanger = false, this.isShowLanguageChanger = false,
this.showCenterLogo = false, this.showCenterLogo = false,
this.showSavedLoginBar = false, this.showSavedLoginBar = false,
this.showHomeAppBarIcon = true,
}) : super(key: key); }) : super(key: key);
@override @override
@ -586,17 +585,19 @@ class NewAppBarWidget extends StatelessWidget implements PreferredSizeWidget {
if (appBarIcons != null) if (appBarIcons != null)
...appBarIcons! ...appBarIcons!
else else
IconButton( showHomeAppBarIcon!
onPressed: () { ? IconButton(
AppSharedPreferences().remove(IS_LIVECARE_APPOINTMENT); onPressed: () {
Navigator.pushAndRemoveUntil( AppSharedPreferences().remove(IS_LIVECARE_APPOINTMENT);
context, Navigator.pushAndRemoveUntil(
MaterialPageRoute(builder: (context) => LandingPage()), context,
(Route<dynamic> route) => false, MaterialPageRoute(builder: (context) => LandingPage()),
); (Route<dynamic> route) => false,
}, );
icon: Icon(Icons.home), },
), icon: Icon(Icons.home),
)
: Container(),
], ],
); );
} }
@ -623,7 +624,7 @@ class AppBarWidget extends StatefulWidget implements PreferredSizeWidget {
AppBarWidget( AppBarWidget(
{this.appBarTitle, {this.appBarTitle,
this.showHomeAppBarIcon, this.showHomeAppBarIcon = true,
this.appBarIcons, this.appBarIcons,
this.isPharmacy = true, this.isPharmacy = true,
this.isshowBackButton = true, this.isshowBackButton = true,

Loading…
Cancel
Save