add charts to procedures

merge-requests/518/head^2
mosazaid 5 years ago
parent d543ce0f6f
commit 65585ab586

@ -48,8 +48,7 @@ class LabsService extends BaseService {
_requestPatientLabSpecialResult.orderNo = orderNo;
await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
patient: patient, onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
response['ListPLSR'].forEach((hospital) {
patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital));
@ -60,7 +59,8 @@ class LabsService extends BaseService {
}, body: _requestPatientLabSpecialResult.toJson());
}
Future getPatientLabResult({PatientLabOrders patientLabOrder,PatiantInformtion patient}) async {
Future getPatientLabResult(
{PatientLabOrders patientLabOrder, PatiantInformtion patient}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo;
@ -69,8 +69,7 @@ class LabsService extends BaseService {
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
await baseAppClient.postPatient(GET_Patient_LAB_RESULT,
patient: patient,
await baseAppClient.postPatient(GET_Patient_LAB_RESULT, patient: patient,
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
labResultList.clear();
@ -84,19 +83,22 @@ class LabsService extends BaseService {
}
Future getPatientLabOrdersResults(
{PatientLabOrders patientLabOrder, String procedure,PatiantInformtion patient}) async {
{PatientLabOrders patientLabOrder,
String procedure,
PatiantInformtion patient}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
if (patientLabOrder != null) {
body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
}
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
body['Procedure'] = procedure;
await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT,
patient: patient,
onSuccess: (dynamic response, int statusCode) {
patient: patient, onSuccess: (dynamic response, int statusCode) {
labOrdersResultsList.clear();
response['ListPLR'].forEach((lab) {
labOrdersResultsList.add(LabOrderResult.fromJson(lab));

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'lab_result_chart_and_detials.dart';
@ -17,46 +18,49 @@ class FlowChartPage extends StatelessWidget {
final PatientLabOrders patientLabOrder;
final String filterName;
final PatiantInformtion patient;
FlowChartPage({this.patientLabOrder, this.filterName, this.patient});
@override
Widget build(BuildContext context) {
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabOrdersResults(
patientLabOrder: patientLabOrder, procedure: filterName,patient: patient),
patientLabOrder: patientLabOrder,
procedure: filterName,
patient: patient),
builder: (context, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: filterName,
baseViewModel: model,
body: SingleChildScrollView(
child: model.labOrdersResultsList.isNotEmpty
? Container(
body: model.labOrdersResultsList.isNotEmpty
? SingleChildScrollView(
child: Container(
child: LabResultChartAndDetails(
name: filterName,
labResult: model.labOrdersResultsList,
),
)
: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
TranslationBase.of(context).noDataAvailable,
fontWeight: FontWeight.normal,
color: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.5,
),
)
],
)
: Container(
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
TranslationBase.of(context).noDataAvailable,
fontWeight: FontWeight.normal,
color: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.5,
),
)
],
),
),
),
),
),
),
);
}

@ -1,9 +1,12 @@
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/FlowChartPage.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -13,13 +16,16 @@ class ProcedureCard extends StatelessWidget {
final EntityList entityList;
final String categoryName;
final int categoryID;
final PatiantInformtion patient;
const ProcedureCard(
{Key key,
this.onTap,
this.entityList,
this.categoryID,
this.categoryName})
this.categoryName,
this.patient,
})
: super(key: key);
@override
@ -154,6 +160,27 @@ class ProcedureCard extends StatelessWidget {
),
],
),
Container(
alignment: Alignment.centerRight,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName: entityList.procedureName,
patient: patient,
),
),
);
},
child: Texts(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
),
),
),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [

@ -173,6 +173,7 @@ class ProcedureScreen extends StatelessWidget {
// helpers.showErrorToast(
// 'You Cant Update This Procedure');
},
patient: patient,
),
),
if (model.procedureList.length != 0 &&

Loading…
Cancel
Save