fix all special result

merge-requests/839/head
hussam al-habibeh 4 years ago
parent 00b7aaf32a
commit 288bef5a5f

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -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;

@ -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(

@ -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,

@ -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(

@ -664,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:
@ -956,7 +956,7 @@ packages:
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:
@ -1154,5 +1154,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0 <2.11.0"
dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save