Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into search_text_fields

merge-requests/844/head
Elham Rababh 4 years ago
commit 0ab0570bc6

@ -551,7 +551,7 @@ const Map<String, Map<String, String>> localizedValues = {
"sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"},
"SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"},
"noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "},
"show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"},
"show-more-btn": {"en": "Flowchart", "ar": "النتائج التراكمية"},
"open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"},
"fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "},
"searchPatient-name": {"en": "Search Name, Medical File, Phone Number", "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف"},

@ -211,7 +211,8 @@ class LabsService extends BaseService {
_allSpecialLab.clear();
await baseAppClient.post(ALL_SPECIAL_LAB_RESULT, onSuccess: (dynamic response, int statusCode) {
response['ListPLSRALL'].forEach((lab) {
_allSpecialLab.add(AllSpecialLabResultModel.fromJson(lab));
var labs = AllSpecialLabResultModel.fromJson(lab);
if (labs.invoiceNo != "0") _allSpecialLab.add(AllSpecialLabResultModel.fromJson(lab));
});
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -32,6 +32,7 @@ class ListOfAllInPatient extends StatelessWidget {
patientSearchViewModel.filteredInPatientItems.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: const AlwaysScrollableScrollPhysics (),
itemBuilder: (context, index) {
return PatientCard(
patientInfo: patientSearchViewModel

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/lab_result.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -44,7 +45,11 @@ class LabResultWidget extends StatelessWidget {
children: [
Row(
children: [
AppText(filterName),
AppText(
filterName,
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
),
],
),
// InkWell(
@ -69,6 +74,9 @@ class LabResultWidget extends StatelessWidget {
// ),
],
),
SizedBox(
height: 8,
),
Row(
children: [
Expanded(
@ -77,7 +85,8 @@ class LabResultWidget extends StatelessWidget {
child: AppText(
TranslationBase.of(context).description,
color: Colors.black,
bold: true,
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
),
),
),
@ -88,7 +97,8 @@ class LabResultWidget extends StatelessWidget {
child: AppText(
TranslationBase.of(context).value,
color: Colors.black,
bold: true,
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
),
),
),
@ -98,16 +108,19 @@ class LabResultWidget extends StatelessWidget {
child: Center(
child: AppText(
TranslationBase.of(context).range,
color: Colors.black,
bold: true,
fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700,
),
),
),
),
Expanded(
child: Container(),
)
],
),
SizedBox(
height: 7,
height: 4,
),
Divider(
color: Colors.black,
@ -117,107 +130,132 @@ class LabResultWidget extends StatelessWidget {
height: 12,
),
...List.generate(
patientLabResultList.length,
(index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
patientLabResultList.length,
(index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0XFFF2F2F2),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
child: Row(
children: [
Row(
children: [
Expanded(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: AppText(
'${patientLabResultList[index].testCode}\n' +
patientLabResultList[index].description,
textAlign: TextAlign.center,
isCopyable: true,
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
child: Center(
child: AppText(
/*'${patientLabResultList[index].testCode}\n' +*/
patientLabResultList[index].description,
textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true,
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: AppText(
patientLabResultList[index].resultValue ??
"" +
" " +
"${patientLabResultList[index].uOM ?? ""}",
textAlign: TextAlign.center,
isCopyable: true,
),
),
Expanded(
child: Row(
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.red.shade700,
// borderRadius: BorderRadius.all(
// Radius.circular(25.0),
// ),
),
child: Icon(
Icons.arrow_circle_up_sharp,
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
child: Center(
child: AppText(
patientLabResultList[index].resultValue ??
"" +
" " +
"${patientLabResultList[index].uOM ?? ""}",
textAlign: TextAlign.center,
isCopyable: true,
fontSize: SizeConfig.textMultiplier * 1.8,
),
),
),
),
],
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
// color: Colors.white,
child: Center(
child: AppText(
patientLabResultList[index].referanceRange,
textAlign: TextAlign.center,
fontSize: SizeConfig.textMultiplier * 1.8,
isCopyable: true,
),
),
Expanded(
child: Column(
children: [
Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: AppText(
patientLabResultList[index].referanceRange,
textAlign: TextAlign.center,
isCopyable: true,
),
),
),
Expanded(
child: Container(
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
SizedBox(
height: 12,
);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.red.shade700,
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName:
patientLabResultList[index].description,
patientLabOrder: patientLabOrder,
patient: patient,
isInpatient: isInpatient,
),
// page: LabResultHistoryPage(
// filterName: patientLabResultList[index].description,
// patientLabOrder: patientLabOrder,
// patient: patient,
// ),
),
);
},
// child: AppText(
// " (show details)",
// color: Colors.blue,
// fontSize: 12,
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
fontSize: 12,
),
],
),
)
],
),
),
],
),
),
// SizedBox(
// height: 12,
// ),
Divider(),
],
))
),
),
SizedBox(
height: 4,
),
],
),
),
SizedBox(
height: 6,
),
Divider(),
// Table(
// border: TableBorder.symmetric(
// inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid),

@ -82,75 +82,78 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
],
),
),
...List.generate(
model.allSpecialLabList.length,
(index) => Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Colors.white,
),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
color: Colors.white),
child: Row(
children: [
Container(
width: 20,
height: 160,
decoration: BoxDecoration(
color: model.allSpecialLabList[index].isLiveCareAppointment
? Colors.red[900]
: !model.allSpecialLabList[index].isInOutPatient
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.allSpecialLabList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !model.allSpecialLabList[index].isInOutPatient
? TranslationBase.of(context).inPatientLabel.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
),
Expanded(
child: DoctorCard(
isNoMargin: true,
onTap: () => Navigator.push(
context,
FadePage(
page: SpecialLabResultDetailsPage(
resultData: model.allSpecialLabList[index].resultDataHTML,
patient: patient,
ListView.builder(
itemCount: model.allSpecialLabList.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemBuilder: (BuildContext ctxt, int index) {
return Container(
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(
width: 0.5,
color: Colors.white,
),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
color: Colors.white),
child: Row(
children: [
Container(
width: 20,
height: 160,
decoration: BoxDecoration(
color: model.allSpecialLabList[index].isLiveCareAppointment
? Colors.red[900]
: !model.allSpecialLabList[index].isInOutPatient
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
model.allSpecialLabList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !model.allSpecialLabList[index].isInOutPatient
? TranslationBase.of(context).inPatientLabel.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
),
Expanded(
child: DoctorCard(
isNoMargin: true,
onTap: () => Navigator.push(
context,
FadePage(
page: SpecialLabResultDetailsPage(
resultData: model.allSpecialLabList[index].resultDataHTML,
patient: patient,
),
),
),
doctorName: model.allSpecialLabList[index].doctorName,
invoiceNO: ' ${model.allSpecialLabList[index].invoiceNo}',
profileUrl: model.allSpecialLabList[index].doctorImageURL,
branch: model.allSpecialLabList[index].projectName,
clinic: model.allSpecialLabList[index].clinicDescription,
appointmentDate: model.allSpecialLabList[index].orderDate,
orderNo: model.allSpecialLabList[index].orderNo,
isShowTime: false,
),
),
doctorName: model.allSpecialLabList[index].doctorName,
invoiceNO: ' ${model.allSpecialLabList[index].invoiceNo}',
profileUrl: model.allSpecialLabList[index].doctorImageURL,
branch: model.allSpecialLabList[index].projectName,
clinic: model.allSpecialLabList[index].clinicDescription,
appointmentDate: model.allSpecialLabList[index].orderDate,
orderNo: model.allSpecialLabList[index].orderNo,
isShowTime: false,
),
],
),
],
),
),
),
);
}),
if (model.allSpecialLabList.isEmpty && patient.patientStatusType != 43)
Center(
child: Column(

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
@ -84,17 +85,18 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(5.0),
)),
),),
child: Row(
children: <Widget>[
Expanded(
child: Container(
margin: EdgeInsets.only(
left: 10, right: 10),
left: 0, right: 0),
child: AppText(
TranslationBase.of(context)
.generalResult,
bold: true,
fontSize: SizeConfig.textMultiplier * 2.3,
bold: false,
))),
Container(
width: 25,
@ -141,7 +143,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
patient: widget.patient,
isInpatient: widget.isInpatient,
),
)
),
],
),
),
@ -149,7 +151,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
],
),
)
else
else if (widget.details == null)
Container(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,

@ -35,69 +35,36 @@ class ProfileGridForInPatient extends StatelessWidget {
@override
Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS,
'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'patient/lab_results.png',
TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).specialResult,
ALL_SPECIAL_LAB_RESULT,
'patient/lab_results.png',
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).result,
RADIOLOGY_PATIENT,
'patient/health_summary.png',
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).result,
RADIOLOGY_PATIENT, 'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'patient/order_prescription.png',
PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).progress,
TranslationBase.of(context).note,
PROGRESS_NOTE,
PatientProfileCardModel(TranslationBase.of(context).progress, TranslationBase.of(context).note, PROGRESS_NOTE,
'patient/Progress_notes.png',
isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(
TranslationBase.of(context).order,
TranslationBase.of(context).sheet,
ORDER_NOTE,
isInPatient: isInpatient, isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(TranslationBase.of(context).order, TranslationBase.of(context).sheet, ORDER_NOTE,
'patient/Progress_notes.png',
isInPatient: isInpatient,
isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'patient/Order_Procedures.png',
isInPatient: isInpatient, isDischargedPatient: isDischargedPatient),
PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures,
ORDER_PROCEDURE, 'patient/Order_Procedures.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY,
'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).medical,
TranslationBase.of(context).report,
PATIENT_MEDICAL_REPORT,
'patient/health_summary.png',
isInPatient: isInpatient,
isDisable: false),
PatientProfileCardModel(TranslationBase.of(context).medical, TranslationBase.of(context).report,
PATIENT_MEDICAL_REPORT, 'patient/health_summary.png',
isInPatient: isInpatient, isDisable: false),
PatientProfileCardModel(
TranslationBase.of(context).referral,
TranslationBase.of(context).patient,
@ -106,19 +73,12 @@ class ProfileGridForInPatient extends StatelessWidget {
isInPatient: isInpatient,
isDisable: isDischargedPatient || isFromSearch,
),
PatientProfileCardModel(
TranslationBase.of(context).insurance,
TranslationBase.of(context).approvals,
PATIENT_INSURANCE_APPROVALS_NEW,
'patient/vital_signs.png',
PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).approvals,
PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).discharge,
TranslationBase.of(context).report,
null,
PatientProfileCardModel(TranslationBase.of(context).discharge, TranslationBase.of(context).report, null,
'patient/patient_sick_leave.png',
isInPatient: isInpatient,
isDisable: true),
isInPatient: isInpatient, isDisable: true),
PatientProfileCardModel(
TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave,

@ -39,7 +39,7 @@ class ProfileGridForOther extends StatelessWidget {
PatientProfileCardModel(
TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).specialResult,
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service,

@ -29,7 +29,7 @@ class ProfileGridForSearch extends StatelessWidget {
PatientProfileCardModel(
TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).specialResult,
PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service,

@ -6,3 +6,17 @@ extension Extension on Object {
bool isNullEmptyZeroOrFalse() =>
this == null || this == '' || !this || this == 0;
}
/// truncate the [String] without cutting words. The length is calculated with the suffix.
extension Truncate on String {
String truncate(int max, {String suffix = ''}) {
try {
return length <= max
? this
: '${substring(0, max - suffix.length)}$suffix';
} catch (e){
return this;
}
}
}

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import '../../../util/extenstions.dart';
import 'ShowTimer.dart';
@ -37,6 +38,15 @@ class PatientCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
String nationalityName = patientInfo.nationalityName != null
? patientInfo.nationalityName.trim()
: patientInfo.nationality != null
? patientInfo.nationality.trim()
: patientInfo.nationalityId !=
null
? patientInfo.nationalityId
: "";
return Container(
width: SizeConfig.screenWidth * 0.9,
margin: EdgeInsets.all(6),
@ -82,7 +92,8 @@ class PatientCard extends StatelessWidget {
? Row(
children: [
AppText(
TranslationBase.of(context).arrivedP,
TranslationBase.of(context)
.arrivedP,
color: Colors.green,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
@ -102,8 +113,12 @@ class PatientCard extends StatelessWidget {
width: 8,
),
AppText(
patientInfo.status == 2 ? 'Confirmed' : 'Booked',
color: patientInfo.status == 2 ? Colors.green : Colors.grey,
patientInfo.status == 2
? 'Confirmed'
: 'Booked',
color: patientInfo.status == 2
? Colors.green
: Colors.grey,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 10,
@ -114,7 +129,8 @@ class PatientCard extends StatelessWidget {
? Row(
children: [
AppText(
TranslationBase.of(context).notArrived,
TranslationBase.of(context)
.notArrived,
color: Colors.red[800],
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
@ -134,19 +150,27 @@ class PatientCard extends StatelessWidget {
width: 8,
),
AppText(
patientInfo.status == 2 ? 'Confirmed' : 'Booked',
color: patientInfo.status == 2 ? Colors.green : Colors.grey,
patientInfo.status == 2
? 'Confirmed'
: 'Booked',
color: patientInfo.status == 2
? Colors.green
: Colors.grey,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 10,
),
],
)
: !isFromSearch && !isFromLiveCare && patientInfo.patientStatusType == null
: !isFromSearch &&
!isFromLiveCare &&
patientInfo.patientStatusType ==
null
? Row(
children: [
AppText(
TranslationBase.of(context).notArrived,
TranslationBase.of(context)
.notArrived,
color: Colors.red[800],
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
@ -166,8 +190,13 @@ class PatientCard extends StatelessWidget {
width: 8,
),
AppText(
patientInfo.status == 2 ? 'Booked' : 'Confirmed',
color: patientInfo.status == 2 ? Colors.grey : Colors.green,
patientInfo.status == 2
? 'Booked'
: 'Confirmed',
color:
patientInfo.status == 2
? Colors.grey
: Colors.green,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 12,
@ -177,13 +206,17 @@ class PatientCard extends StatelessWidget {
: SizedBox(),
this.arrivalType == '1'
? AppText(
patientInfo.startTime != null ? patientInfo.startTime : patientInfo.startTimes,
patientInfo.startTime != null
? patientInfo.startTime
: patientInfo.startTimes,
fontFamily: 'Poppins',
fontWeight: FontWeight.w400,
)
: patientInfo.arrivedOn != null
? AppText(
AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate(
AppDateUtils.getDayMonthYearDate(
AppDateUtils
.convertStringToDate(
patientInfo.arrivedOn,
)) +
" " +
@ -192,8 +225,10 @@ class PatientCard extends StatelessWidget {
fontWeight: FontWeight.w400,
fontSize: 15,
)
: (patientInfo.appointmentDate != null &&
patientInfo.appointmentDate.isNotEmpty)
: (patientInfo.appointmentDate !=
null &&
patientInfo
.appointmentDate.isNotEmpty)
? AppText(
"${AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate(
patientInfo.appointmentDate,
@ -224,71 +259,89 @@ class PatientCard extends StatelessWidget {
Padding(
padding: EdgeInsets.only(left: 12.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Row(children: [
Expanded(
// width: MediaQuery.of(context).size.width*0.51,
child: AppText(
isFromLiveCare
? Helpers.capitalize(patientInfo.fullName)
: (Helpers.capitalize(patientInfo.firstName) +
" " +
Helpers.capitalize(patientInfo.lastName)),
fontSize: 16,
color: Color(0xff2e303a),
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
textOverflow: TextOverflow.ellipsis,
),
),
if (patientInfo.gender == 1)
Icon(
DoctorApp.male_2,
color: Colors.blue,
)
else
Icon(
DoctorApp.female_1,
color: Colors.pink,
),
if (isFromLiveCare)
ShowTimer(
patientInfo: patientInfo,
),
]),
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
// width: MediaQuery.of(context).size.width*0.51,
child: AppText(
isFromLiveCare
? Helpers.capitalize(
patientInfo.fullName)
: (Helpers.capitalize(
patientInfo.firstName) +
" " +
Helpers.capitalize(
patientInfo.lastName)),
fontSize: 16,
color: Color(0xff2e303a),
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
textOverflow: TextOverflow.ellipsis,
),
),
if (patientInfo.gender == 1)
Icon(
DoctorApp.male_2,
color: Colors.blue,
)
else
Icon(
DoctorApp.female_1,
color: Colors.pink,
),
if (isFromLiveCare)
ShowTimer(
patientInfo: patientInfo,
),
]),
),
Row(
children: [
AppText(
patientInfo.nationalityName != null
? patientInfo.nationalityName.trim()
: patientInfo.nationality != null
? patientInfo.nationality.trim()
: patientInfo.nationalityId != null
? patientInfo.nationalityId
: "",
fontWeight: FontWeight.bold,
fontSize: 14,
textOverflow: TextOverflow.ellipsis,
),
patientInfo.nationality != null || patientInfo.nationalityId != null
? ClipRRect(
borderRadius: BorderRadius.circular(20.0),
child: CachedNetworkImage(
imageUrl: patientInfo.nationalityFlagURL != null
? patientInfo.nationalityFlagURL
: '',
height: 25,
width: 30,
errorWidget: (context, url, error) => AppText(
'No Image',
fontSize: 10,
),
))
: SizedBox()
],
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Container(
alignment: Alignment.centerRight,
child: AppText(
nationalityName.truncate(14),
fontWeight: FontWeight.bold,
fontSize: 14,
textOverflow: TextOverflow.ellipsis,
),
),
),
patientInfo.nationality != null ||
patientInfo.nationalityId != null
? ClipRRect(
borderRadius:
BorderRadius.circular(20.0),
child: CachedNetworkImage(
imageUrl: patientInfo
.nationalityFlagURL !=
null
? patientInfo.nationalityFlagURL
: '',
height: 25,
width: 30,
errorWidget:
(context, url, error) =>
AppText(
'No Image',
fontSize: 10,
),
))
: SizedBox()
],
),
)
],
)),
@ -332,12 +385,13 @@ class PatientCard extends StatelessWidget {
value:
"${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}",
),
if (isInpatient)
CustomRow(
label: patientInfo.admissionDate == null
? ""
: TranslationBase.of(context).admissionDate + " : ",
if (isInpatient)
CustomRow(
label: patientInfo.admissionDate == null
? ""
: TranslationBase.of(context)
.admissionDate +
" : ",
value: patientInfo.admissionDate == null
? ""
: "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}",
@ -352,9 +406,9 @@ class PatientCard extends StatelessWidget {
),
if (patientInfo.admissionDate != null)
CustomRow(
label:
TranslationBase.of(context).clinicName +
" : ",
label: TranslationBase.of(context)
.clinicName +
" : ",
value: "${patientInfo.clinicDescription}",
),
if (patientInfo.admissionDate != null)
@ -399,29 +453,36 @@ class PatientCard extends StatelessWidget {
],
)
: !isInpatient && !isFromSearch
? Row(mainAxisAlignment: MainAxisAlignment.end, children: [
Container(
padding: EdgeInsets.all(4),
child: Image.asset(
patientInfo.appointmentType == 'Regular' && patientInfo.visitTypeId == 100
? 'assets/images/livecare.png'
: patientInfo.appointmentType == 'Walkin'
? 'assets/images/walkin.png'
: 'assets/images/booked.png',
height: 25,
width: 35,
)),
])
: (isInpatient == true)
? Row(mainAxisAlignment: MainAxisAlignment.end, children: [
? Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
padding: EdgeInsets.all(4),
child: Image.asset(
'assets/images/inpatient.png',
patientInfo.appointmentType ==
'Regular' &&
patientInfo.visitTypeId == 100
? 'assets/images/livecare.png'
: patientInfo.appointmentType ==
'Walkin'
? 'assets/images/walkin.png'
: 'assets/images/booked.png',
height: 25,
width: 35,
)),
])
: (isInpatient == true)
? Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
padding: EdgeInsets.all(4),
child: Image.asset(
'assets/images/inpatient.png',
height: 25,
width: 35,
)),
])
: SizedBox()
],
),

@ -53,7 +53,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
),
height: height == 0
? isInpatient
? 215
? 220
: 200
: height,
child: Container(
@ -245,37 +245,46 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
HeaderRow(
label: TranslationBase.of(context).fileNumber,
value: patient.patientId.toString(),
),
Row(
children: [
AppText(
patient.nationalityName ??
patient.nationality ??
patient.nationalityId ??
'',
fontWeight: FontWeight.bold,
fontSize: 12,
),
patient.nationalityFlagURL != null
? ClipRRect(
borderRadius: BorderRadius.circular(20.0),
child: Image.network(
patient.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('No Image');
},
))
: SizedBox()
],
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Container(
alignment: Alignment.centerRight,
child: AppText(
patient.nationalityName ??
patient.nationality ??
patient.nationalityId ??
'',
fontWeight: FontWeight.bold,
fontSize: 12,
),
),
),
patient.nationalityFlagURL != null
? ClipRRect(
borderRadius: BorderRadius.circular(20.0),
child: Image.network(
patient.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('');
},
))
: SizedBox()
],
),
)
],
),

@ -67,7 +67,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
arrivalType: arrivalType,
route: ALL_SPECIAL_LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: 'Special Result',
nameLine2: TranslationBase.of(context).special,
icon: 'patient/lab_results.png'),
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(

@ -141,13 +141,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "7.1.0"
cached_network_image:
dependency: "direct main"
description:
name: cached_network_image
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.1"
characters:
dependency: transitive
description:
@ -440,20 +433,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_blurhash:
dependency: transitive
description:
name: flutter_blurhash
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
flutter_device_type:
dependency: "direct main"
description:
@ -616,13 +595,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.19"
imei_plugin:
dependency: "direct main"
description:
@ -692,7 +664,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.4"
mime:
dependency: transitive
description:
@ -721,13 +693,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
octo_image:
dependency: transitive
description:
name: octo_image
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
open_iconic_flutter:
dependency: transitive
description:
@ -763,13 +728,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.28"
path_provider_linux:
dependency: transitive
description:
@ -777,13 +735,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+2"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4+8"
path_provider_platform_interface:
dependency: transitive
description:
@ -903,13 +854,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.5"
rxdart:
dependency: transitive
description:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.25.0"
scratch_space:
dependency: transitive
description:
@ -1006,27 +950,13 @@ packages:
relative: true
source: path
version: "0.0.0"
sqflite:
dependency: transitive
description:
name: sqflite
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.2+4"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3+3"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
sticky_headers:
dependency: "direct main"
description:
@ -1055,13 +985,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
synchronized:
dependency: transitive
description:
name: synchronized
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0+2"
term_glyph:
dependency: transitive
description:
@ -1231,5 +1154,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.2 <2.11.0"
flutter: ">=1.22.2 <2.0.0"
dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save