|
|
|
@ -1,10 +1,14 @@
|
|
|
|
|
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/procedure_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/base/base_view.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
|
|
|
@ -24,6 +28,7 @@ class ProcedureScreen extends StatefulWidget {
|
|
|
|
|
class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
int testNum = 1;
|
|
|
|
|
PatiantInformtion patient;
|
|
|
|
|
TextEditingController procedureController = TextEditingController();
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
@ -72,7 +77,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 20,
|
|
|
|
|
width: 5.0,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
patient.patientId.toString(),
|
|
|
|
@ -376,62 +381,99 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
postProcedure({ProcedureViewModel model}) async {
|
|
|
|
|
model = new ProcedureViewModel();
|
|
|
|
|
PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel();
|
|
|
|
|
List<Controls> controls = List();
|
|
|
|
|
List<Procedures> controlsProcedure = List();
|
|
|
|
|
|
|
|
|
|
postProcedureReqModel.appointmentNo = 2016054575;
|
|
|
|
|
|
|
|
|
|
postProcedureReqModel.episodeID = 200012166;
|
|
|
|
|
postProcedureReqModel.patientMRN = 3120725;
|
|
|
|
|
postProcedureReqModel.vidaAuthTokenID =
|
|
|
|
|
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI';
|
|
|
|
|
|
|
|
|
|
controls.add(
|
|
|
|
|
Controls(code: 'Remarks', controlValue: 'Testing'),
|
|
|
|
|
);
|
|
|
|
|
controlsProcedure.add(
|
|
|
|
|
Procedures(category: "02", procedure: "02011002", controls: controls));
|
|
|
|
|
postProcedureReqModel.procedures = controlsProcedure;
|
|
|
|
|
|
|
|
|
|
await model.postProcedure(postProcedureReqModel);
|
|
|
|
|
DrAppToastMsg.showSuccesToast('Procedure had been added');
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
helpers.showErrorToast(model.error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void addSelectedProcedure(context) {
|
|
|
|
|
TextEditingController procedureController = TextEditingController();
|
|
|
|
|
showModalBottomSheet(
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext bc) {
|
|
|
|
|
return SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 490,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Select Procedure'.toUpperCase(),
|
|
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 9.0,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
labelText: 'Add Delected Procedures'.toUpperCase(),
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
textInputType: TextInputType.text,
|
|
|
|
|
inputFormatter: ONLY_LETTERS,
|
|
|
|
|
return BaseView(
|
|
|
|
|
//onModelReady: (model) => model.getCategories(),
|
|
|
|
|
builder:
|
|
|
|
|
(BuildContext context, ProcedureViewModel model, Widget child) =>
|
|
|
|
|
SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 490,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Select Procedure'.toUpperCase(),
|
|
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
|
),
|
|
|
|
|
// Text(model.categoriesList[0].categoryName),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 9.0,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
child: AppTextFormField(
|
|
|
|
|
labelText: 'Add Delected Procedures'.toUpperCase(),
|
|
|
|
|
borderColor: Colors.white,
|
|
|
|
|
textInputType: TextInputType.text,
|
|
|
|
|
inputFormatter: ONLY_LETTERS,
|
|
|
|
|
controller: procedureController,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 280.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
|
|
|
|
|
child: Wrap(
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppButton(
|
|
|
|
|
title: TranslationBase.of(context).addMedication,
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
// prescriptionWarning(context);
|
|
|
|
|
// },
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 280.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.all(SizeConfig.widthMultiplier * 5),
|
|
|
|
|
child: Wrap(
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppButton(
|
|
|
|
|
title:
|
|
|
|
|
TranslationBase.of(context).addMedication,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
postProcedure();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|