Merge branch 'dev_3.3_LabReportEnhancementCR' into dev_3.13.6_Development

# Conflicts:
#	lib/config/config.dart
#	lib/config/localized_values.dart
#	lib/core/model/labs/patient_lab_orders.dart
#	lib/uitl/translations_delegate_base.dart
#	lib/uitl/utils.dart
#	lib/widgets/charts/show_chart.dart
#	lib/widgets/data_display/medical/LabResult/LabResultWidget.dart
#	lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart
#	lib/widgets/my_rich_text.dart
dev_3.13.6_Development
haroon amjad 11 months ago
commit b80e171d25

@ -20,12 +20,9 @@ var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'http://10.50.100.198:4422/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';

@ -1986,6 +1986,7 @@ const Map localizedValues = {
"ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"
},
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
"resultStatus": {"en": "Result Status: ", "ar": "حالة النتيجة: "},
"contactRRT": {"en": "Contact RRT", "ar": "تواصل مع فريق الاستجابة السريعة"},
"checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"},
"locationCheckInError": {"en": "Please ensure you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."},

@ -37,6 +37,8 @@ class PatientLabOrders {
String? setupID;
List<String>? speciality;
bool? isLiveCareAppointment;
int? status;
String? statusDesc;
PatientLabOrders(
{this.actualDoctorRate,
this.clinicDescription,
@ -73,7 +75,9 @@ class PatientLabOrders {
this.invoiceNo_VP,
this.invoiceType,
this.speciality,
this.isLiveCareAppointment});
this.isLiveCareAppointment,
this.status,
this.statusDesc,});
PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate'];
@ -111,6 +115,8 @@ class PatientLabOrders {
invoiceNo_VP = json['invoiceNo_VP'];
invoiceType = json['InvoiceType'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
status = json['Status'];
statusDesc = json['StatusDesc'];
// speciality = json['Speciality'].cast<String>();
}
@ -151,6 +157,8 @@ class PatientLabOrders {
data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['invoiceNo_VP'] = this.invoiceNo_VP;
data['Status'] = this.status;
data['StatusDesc'] = this.statusDesc;
return data;
}
}

@ -76,6 +76,7 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model),
orderNo: widget.patientLabOrders!.orderNo,
patientLabOrder: widget.patientLabOrders,
projectName: widget.patientLabOrders!.projectName,
),
itemCount: 1,
),

@ -87,6 +87,9 @@ class LabsHomePage extends StatelessWidget {
isLiveCareAppointment: labOrder.isLiveCareAppointment,
date: labOrder.orderDate,
isSortByClinic: _isSortByClinic,
isLabOrderResult: true,
resultStatus: labOrder.status!,
resultStatusDesc: labOrder.statusDesc!,
//projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
);
},

@ -39,9 +39,11 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
dynamic grandTotal = 0;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
generateInvoiceDetails();
return AppScaffold(
appBarTitle: widget.doctor.doctorTitle != null ? widget.doctor.doctorTitle.toString() : TranslationBase.of(context).dr + " " + widget.doctor.name.toString(),
@ -278,13 +280,13 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
tableRow.add(
TableRow(children: [
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].procedureName}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)),
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].quantity}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)),
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].price.toString() + " " + TranslationBase.of(context).sar}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)),
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].total.toString() + " " + TranslationBase.of(context).sar}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)),
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
]),
);
}

@ -117,8 +117,8 @@ class _VitalSingChartAndDetialsState extends State<VitalSingChartAndDetials> {
children: [
Utils.tableColumnValue(
"${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}",
isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue('${labResultList[i].toJson()[widget.viewKey]}', isLast: i == (labResultList.length - 1)),
isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${labResultList[i].toJson()[widget.viewKey]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
],
),
);

@ -113,9 +113,9 @@ class VitalSingChartBloodPressure extends StatelessWidget {
children: [
Utils.tableColumnValue(
"${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}",
isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey1]}', isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey2]}', isLast: i == (labResultList.length - 1)),
isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey1]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey2]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
],
),
);

@ -3021,6 +3021,7 @@ class TranslationBase {
String get generalConsentTitle => localizedValues["generalConsentTitle"][locale.languageCode];
String get generalConsentSubTitle => localizedValues["generalConsentSubTitle"][locale.languageCode];
String get incorrectNationalId => localizedValues["incorrectNationalId"][locale.languageCode];
String get resultStatus => localizedValues["resultStatus"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -39,6 +39,7 @@ import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
@ -823,7 +824,31 @@ class Utils {
);
}
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel? mProjectViewModel}) {
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, bool isHighLow = false, required ProjectViewModel mProjectViewModel}) {
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 12),
Text(
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: isHighLow ? CustomColors.accentColor : Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (!isLast)
Divider(
height: 1,
color: Color(0xffEFEFEF),
thickness: 1,
)
],
);
}
static Widget tableColumnValueWithFlowChart(String text, String flowChartText, {bool isLast = false, bool isCapitable = true, ProjectViewModel? mProjectViewModel}) {
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -837,6 +862,13 @@ class Utils {
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 8),
AutoSizeText(
flowChartText,
maxLines: 1,
minFontSize: 6,
style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffD02127), letterSpacing: -0.48, height: 18 / 12),
),
SizedBox(height: 12),
if (!isLast)
Divider(

@ -160,8 +160,8 @@ class LabResultWidget extends StatelessWidget {
children: [
Utils.tableColumnTitle(TranslationBase.of(context).description, showDivider: false),
Utils.tableColumnTitle(TranslationBase.of(context).value, showDivider: false),
Utils.tableColumnTitle(TranslationBase.of(context).unit, showDivider: false),
Utils.tableColumnTitle(TranslationBase.of(context).range, showDivider: false),
Utils.tableColumnTitle("", showDivider: false),
],
),
);
@ -185,8 +185,9 @@ class LabResultWidget extends StatelessWidget {
padding: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 12, right: projectViewModel.isArabic ? 12 : 0),
child: Utils.tableColumnValue(labResultList[i].description ?? "", isLast: true, mProjectViewModel: projectViewModel),
),
Utils.tableColumnValue(labResultList[i].resultValue! + " " + labResultList![i].uOM!, isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(labResultList[i]!.referanceRange!, isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(labResultList[i].resultValue! + " " + labResultList[i].uOM!,
isHighLow: (labResultList[i].resultValueFlag!.toLowerCase() == "h" || labResultList[i].resultValueFlag!.toLowerCase() == "l"), isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(labResultList[i].uOM!, isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
!checkIfCovidLab(patientLabResultList!)
? InkWell(
onTap: () {
@ -202,7 +203,7 @@ class LabResultWidget extends StatelessWidget {
},
child: Padding(
padding: EdgeInsets.only(left: !projectViewModel.isArabic ? 0 : 12, right: !projectViewModel.isArabic ? 12 : 0),
child: Utils.tableColumnValueWithUnderLine(TranslationBase.of(context).viewFlowChart, isLast: true, isCapitable: false),
child: Utils.tableColumnValueWithFlowChart(labResultList[i].referanceRange!, TranslationBase.of(context).viewFlowChart, isLast: true, isCapitable: false),
),
)
: Container(),

@ -19,9 +19,12 @@ class LabResultDetailsWidget extends StatefulWidget {
}
class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
return Table(
columnWidths: {
0: FlexColumnWidth(2),
@ -46,8 +49,8 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
tableRow.add(
TableRow(
children: [
Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(labOrderResultList![i].verifiedOnDateTime!)), isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(labOrderResultList[i].resultValue!, isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(labOrderResultList![i].verifiedOnDateTime!)), isLast: i == (labOrderResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue(labOrderResultList[i].resultValue!, isLast: i == (labOrderResultList.length - 1), mProjectViewModel: projectViewModel),
],
),
);

@ -19,9 +19,10 @@ class LaboratoryResultWidget extends StatefulWidget {
final String? billNo;
final String? details;
final String? orderNo;
final String? projectName;
final PatientLabOrders? patientLabOrder;
const LaboratoryResultWidget({Key? key, this.onTap, this.billNo, this.details, this.orderNo, this.patientLabOrder}) : super(key: key);
const LaboratoryResultWidget({Key? key, this.onTap, this.billNo, this.details, this.orderNo, this.projectName, this.patientLabOrder}) : super(key: key);
@override
_LaboratoryResultWidgetState createState() => _LaboratoryResultWidgetState();

@ -34,6 +34,9 @@ class DoctorCard extends StatelessWidget {
final bool isSickLeave;
final int sickLeaveStatus;
final int projectID;
final bool isLabOrderResult;
final int? resultStatus;
final String? resultStatusDesc;
DoctorCard(
{this.name,
@ -54,7 +57,10 @@ class DoctorCard extends StatelessWidget {
this.isParentAppointment = false,
this.isSickLeave = false,
this.sickLeaveStatus = 0,
this.projectID = 0});
this.projectID = 0,
this.isLabOrderResult = false,
this.resultStatus = 0,
this.resultStatusDesc = ""});
late ProjectViewModel projectViewModel;
@ -239,6 +245,8 @@ class DoctorCard extends StatelessWidget {
),
],
),
if (isLabOrderResult)
MyRichText(TranslationBase.of(context).resultStatus, resultStatusDesc ?? "", projectViewModel.isArabic, valueColor: getResultStatusColor(resultStatus!)),
],
),
),
@ -274,6 +282,22 @@ class DoctorCard extends StatelessWidget {
);
}
Color getResultStatusColor(int resultStatus) {
Color statusColor = Color(0xff2B353E);
if (resultStatus == 17 || resultStatus == 16) {
statusColor = CustomColors.green;
}
if (resultStatus == 45) {
statusColor = CustomColors.orange;
}
if (resultStatus == 44) {
statusColor = CustomColors.accentColor;
}
return statusColor;
}
String getStatusText(BuildContext context) {
String statusText = "";
if (sickLeaveStatus == 1) {

@ -4,19 +4,22 @@ class MyRichText extends StatelessWidget {
final String title;
final String value;
final bool isArabic;
MyRichText(this.title,this.value,this.isArabic,{Key? key}) : super(key: key);
final Color? valueColor;
// MyRichText(this.title, this.value, this.isArabic, {this.valueColor});
MyRichText(this.title, this.value, this.isArabic, {this.valueColor, Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return RichText(
maxLines: 1,
maxLines: 2,
text: TextSpan(
text: title,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10),
children: <TextSpan>[
TextSpan(
text: " $value",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: valueColor ?? Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
)
]),
);

Loading…
Cancel
Save