lab result & radiolgy fix

merge-requests/796/head
hussam al-habibeh 4 years ago
parent 1d6026f9fd
commit 528e16c3dc

@ -9,19 +9,14 @@ class RadiologyService extends BaseService {
List<FinalRadiology> finalRadiologyList = List();
String url = '';
Future getRadImageURL(
{int invoiceNo,
int lineItem,
int projectId,
@required PatiantInformtion patient}) async {
Future getRadImageURL({int invoiceNo, int lineItem, int projectId, @required PatiantInformtion patient}) async {
hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = invoiceNo;
body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId;
await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient, onSuccess: (dynamic response, int statusCode) {
url = response['Data'];
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -29,24 +24,22 @@ class RadiologyService extends BaseService {
}, body: body);
}
Future getPatientRadOrders(PatiantInformtion patient,
{isInPatient = false}) async {
Future getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async {
String url = GET_PATIENT_ORDERS;
final Map<String, dynamic> body = new Map<String, dynamic>();
if (isInPatient) {
url = GET_IN_PATIENT_ORDERS;
body['ProjectID'] = patient.projectId;
}
finalRadiologyList.clear();
hasError = false;
await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) {
finalRadiologyList = [];
String label = "ListRAD";
if (isInPatient) {
label = "List_GetRadOreders";
}
if(response[label] == null || response[label].length == 0){
if (response[label] == null || response[label].length == 0) {
label = "FinalRadiologyList";
}
response[label].forEach((radiology) {

@ -29,7 +29,6 @@ class _LabsHomePageState extends State<LabsHomePage> {
bool isInpatient;
bool isFromLiveCare;
@override
void didChangeDependencies() {
super.didChangeDependencies();
@ -66,8 +65,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
SizedBox(
height: 12,
),
if (model.patientLabOrdersList.isNotEmpty &&
patient.patientStatusType != 43)
if (model.patientLabOrdersList.isNotEmpty && patient.patientStatusType != 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@ -87,8 +85,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
],
),
),
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
if (patient.patientStatusType != null && patient.patientStatusType == 43)
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@ -108,8 +105,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
],
),
),
if ((patient.patientStatusType != null &&
patient.patientStatusType == 43) ||
if ((patient.patientStatusType != null && patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder(
onTap: () {
@ -146,37 +142,26 @@ class _LabsHomePageState extends State<LabsHomePage> {
width: 20,
height: 160,
decoration: BoxDecoration(
color: model.patientLabOrdersList[index]
.isLiveCareAppointment
color: model.patientLabOrdersList[index].isLiveCareAppointment
? Colors.red[900]
: !model.patientLabOrdersList[index]
.isInOutPatient
: !model.patientLabOrdersList[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)
),
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.patientLabOrdersList[index]
.isLiveCareAppointment
? TranslationBase.of(context)
.liveCare
.toUpperCase()
: !model.patientLabOrdersList[index]
.isInOutPatient
? TranslationBase.of(context)
.inPatientLabel
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
model.patientLabOrdersList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !model.patientLabOrdersList[index].isInOutPatient
? TranslationBase.of(context).inPatientLabel.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
@ -190,24 +175,18 @@ class _LabsHomePageState extends State<LabsHomePage> {
page: LaboratoryResultPage(
patientLabOrders: model.patientLabOrdersList[index],
patient: patient,
isInpatient:isInpatient,
isInpatient: isInpatient,
arrivalType: arrivalType,
patientType: patientType,
),
),
),
doctorName:
model.patientLabOrdersList[index].doctorName,
invoiceNO:
' ${model.patientLabOrdersList[index].invoiceNo}',
profileUrl: model
.patientLabOrdersList[index].doctorImageURL,
branch:
model.patientLabOrdersList[index].projectName,
clinic: model
.patientLabOrdersList[index].clinicDescription,
appointmentDate:
model.patientLabOrdersList[index].orderDate.add(Duration(days: 1)),
doctorName: model.patientLabOrdersList[index].doctorName,
invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}',
profileUrl: model.patientLabOrdersList[index].doctorImageURL,
branch: model.patientLabOrdersList[index].projectName,
clinic: model.patientLabOrdersList[index].clinicDescription,
appointmentDate: model.patientLabOrdersList[index].orderDate,
orderNo: model.patientLabOrdersList[index].orderNo,
isShowTime: false,
),
@ -216,8 +195,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
),
),
),
if (model.patientLabOrdersList.isEmpty &&
patient.patientStatusType != 43)
if (model.patientLabOrdersList.isEmpty && patient.patientStatusType != 43)
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,

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