Compare commits

...

5 Commits

@ -20,8 +20,8 @@ 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 = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
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/';

@ -1901,4 +1901,5 @@ const Map localizedValues = {
"habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."},
"cashAmountUpdateInsurance": {"en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"},
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
"resultStatus": {"en": "Result Status: ", "ar": "حالة النتيجة: "},
};

@ -36,6 +36,9 @@ class PatientLabOrders {
String setupID;
List<String> speciality;
bool isLiveCareAppointment;
int status;
String statusDesc;
PatientLabOrders(
{this.actualDoctorRate,
this.clinicDescription,
@ -69,8 +72,11 @@ class PatientLabOrders {
this.projectNameN,
this.qR,
this.setupID,
this.invoiceNo_VP,
this.speciality,this.isLiveCareAppointment});
this.invoiceNo_VP,
this.speciality,
this.isLiveCareAppointment,
this.status,
this.statusDesc});
PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate'];
@ -107,7 +113,8 @@ class PatientLabOrders {
setupID = json['SetupID'];
invoiceNo_VP = json['invoiceNo_VP'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
// speciality = json['Speciality'].cast<String>();
status = json['Status'];
statusDesc = json['StatusDesc'];
}
Map<String, dynamic> toJson() {
@ -146,7 +153,9 @@ class PatientLabOrders {
data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['invoiceNo_VP'] =this.invoiceNo_VP;
data['invoiceNo_VP'] = this.invoiceNo_VP;
data['Status'] = this.status;
data['StatusDesc'] = this.statusDesc;
return data;
}
}
@ -155,8 +164,7 @@ class PatientLabOrdersList {
String filterName = "";
List<PatientLabOrders> patientLabOrdersList = List();
PatientLabOrdersList(
{this.filterName, PatientLabOrders patientDoctorAppointment}) {
PatientLabOrdersList({this.filterName, PatientLabOrders patientDoctorAppointment}) {
patientLabOrdersList.add(patientDoctorAppointment);
}
}

@ -66,6 +66,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,
),

@ -86,6 +86,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),
);
},

@ -2910,6 +2910,7 @@ class TranslationBase {
String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode];
String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode];
String get validInsurance => localizedValues["validInsurance"][locale.languageCode];
String get resultStatus => localizedValues["resultStatus"][locale.languageCode];
}

@ -37,6 +37,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';
@ -751,7 +752,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, 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,
@ -764,6 +789,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(

@ -114,21 +114,21 @@ class ShowChart extends StatelessWidget {
fontSize: 10,
),
rotateAngle: -65,
margin: 22,
margin: 8,
getTitles: (value) {
if (isWeeklyOrMonthly) {
return '${timeSeries[value.toInt()].time.day}/ ${timeSeries[value.toInt()].time.month}';
} else {
if (timeSeries.length < 15) {
if (timeSeries.length > value.toInt()) {
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
return '${timeSeries[value.toInt()].time.day}/${timeSeries[value.toInt()].time.month}/${timeSeries[value.toInt()].time.year.toString().substring(2,4)}';
} else
return '';
} else {
if (value.toInt() == 0) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (value.toInt() == timeSeries.length - 1) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (value.toInt() == 0) return '${timeSeries[value.toInt()].time.day}/${timeSeries[value.toInt()].time.month}/${timeSeries[value.toInt()].time.year.toString().substring(2,4)}';
if (value.toInt() == timeSeries.length - 1) return '${timeSeries[value.toInt()].time.day}/${timeSeries[value.toInt()].time.month}/${timeSeries[value.toInt()].time.year.toString().substring(2,4)}';
if (xAxixs.contains(value.toInt())) {
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
return '${timeSeries[value.toInt()].time.day}/${timeSeries[value.toInt()].time.month}/${timeSeries[value.toInt()].time.year.toString().substring(2,4)}';
}
}
return '';

@ -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),
!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,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();
@ -49,7 +50,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
widget.patientLabOrder.doctorImageURL,
widget.patientLabOrder.speciality,
widget.billNo,
widget.patientLabOrder.projectName,
widget.projectName,
widget.patientLabOrder.orderDate,
null,
widget.patientLabOrder.nationalityFlagURL,

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -34,6 +35,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 +58,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,
this.resultStatusDesc});
ProjectViewModel projectViewModel;
@ -217,6 +224,8 @@ class DoctorCard extends StatelessWidget {
),
],
),
if (isLabOrderResult)
MyRichText(TranslationBase.of(context).resultStatus, resultStatusDesc ?? "", projectViewModel.isArabic, valueColor: getResultStatusColor(resultStatus)),
],
),
),
@ -252,6 +261,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,21 @@ 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);
Color valueColor;
MyRichText(this.title, this.value, this.isArabic, {this.valueColor});
@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