fix all special result

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

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

@ -211,7 +211,8 @@ class LabsService extends BaseService {
_allSpecialLab.clear(); _allSpecialLab.clear();
await baseAppClient.post(ALL_SPECIAL_LAB_RESULT, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(ALL_SPECIAL_LAB_RESULT, onSuccess: (dynamic response, int statusCode) {
response['ListPLSRALL'].forEach((lab) { 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) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

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

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

@ -39,7 +39,7 @@ class ProfileGridForOther extends StatelessWidget {
PatientProfileCardModel( 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), 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', ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service,

@ -29,7 +29,7 @@ class ProfileGridForSearch extends StatelessWidget {
PatientProfileCardModel( 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), 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', ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service,

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

@ -664,7 +664,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -956,7 +956,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
sticky_headers: sticky_headers:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1154,5 +1154,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: 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" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save