Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into expansion_procedure

 Conflicts:
	lib/client/base_app_client.dart
	lib/config/config.dart
merge-requests/678/head
Mohammad Aljammal 5 years ago
commit 172b457092

@ -24,7 +24,7 @@ class BaseAppClient {
bool isAllowAny = false}) async {
String url = BASE_URL + endPoint;
bool callLog= true;
bool callLog = true;
try {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN);
@ -49,7 +49,7 @@ class BaseAppClient {
body.remove("EditedBy");
}
body['TokenID'] = "@dm!n";// token ?? '';
// body['TokenID'] = token ?? '';
// body['TokenID'] = "@dm!n" ?? '';
String lang = await sharedPref.getString(APP_Language);
if (lang != null && lang == 'ar')
body['LanguageID'] = 1;
@ -75,9 +75,9 @@ class BaseAppClient {
//int projectID = await sharedPref.getInt(PROJECT_ID);
//if (projectID == 2 || projectID == 3)
// body['PatientOutSA'] = true;
// body['PatientOutSA'] = true;
//else
body['PatientOutSA'] = false;
body['PatientOutSA'] = false;
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
print("URL : $url");
@ -105,7 +105,9 @@ class BaseAppClient {
if (body['OTP_SendType'] != null) {
onFailure(getError(parsed), statusCode);
} else if (!isAllowAny) {
await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX, listen: false).logout();
await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX,
listen: false)
.logout();
Helpers.showErrorToast('Your session expired Please login again');
}
if (isAllowAny) {

@ -283,11 +283,14 @@ const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave";
const GET_MY_OUT_PATIENT =
"Services/DoctorApplication.svc/REST/GetMyOutPatient";
const PATIENT_MEDICAL_REPORT_GET_LIST = "Services/Patients.svc/REST/DAPP_ListMedicalReport";
const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = "Services/Patients.svc/REST/DAPP_GetTemplateByID";
const PATIENT_MEDICAL_REPORT_INSERT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport";
const PATIENT_MEDICAL_REPORT_VERIFIED = "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport";
const PATIENT_MEDICAL_REPORT_GET_LIST =
"Services/Patients.svc/REST/DAPP_ListMedicalReport";
const PATIENT_MEDICAL_REPORT_GET_TEMPLATE =
"Services/Patients.svc/REST/DAPP_GetTemplateByID";
const PATIENT_MEDICAL_REPORT_INSERT =
"Services/Patients.svc/REST/DAPP_InsertMedicalReport";
const PATIENT_MEDICAL_REPORT_VERIFIED =
"Services/Patients.svc/REST/DAPP_VerifiedMedicalReport";
const GET_PROCEDURE_TEMPLETE =
'Services/Doctors.svc/REST/DAPP_ProcedureTemplateGet';

@ -0,0 +1,227 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ProcedureCheckOutScreen extends StatefulWidget {
@override
_ProcedureCheckOutScreenState createState() =>
_ProcedureCheckOutScreenState();
}
class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
List<EntityList> items = List();
List<String> remarksList = List();
List<int> typeList = List();
int selectedType = 0;
setSelectedType(int val) {
setState(() {
selectedType = val;
});
}
@override
Widget build(BuildContext context) {
return BaseView<ProcedureViewModel>(
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold(
backgroundColor: Color(0xffF8F8F8).withOpacity(0.9),
isShowAppBar: false,
body: Column(
children: [
Container(
height: MediaQuery.of(context).size.height * 0.070,
color: Colors.white,
),
Container(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Row(
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
InkWell(
child: Icon(
Icons.arrow_back_ios_sharp,
size: 24.0,
),
onTap: () {
Navigator.pop(context);
},
),
SizedBox(
width: 5.0,
),
AppText(
'Add Procedure',
fontWeight: FontWeight.w700,
fontSize: 20,
),
],
),
),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.022,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: ListView.builder(
scrollDirection: Axis.vertical,
physics: AlwaysScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: 1,
itemBuilder: (BuildContext context, int index) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.all(Radius.circular(10.0))),
child: ExpansionTile(
initiallyExpanded: true,
title: Row(
children: [
Icon(
Icons.check_box,
color: Color(0xffD02127),
size: 30.5,
),
SizedBox(
width: 6.0,
),
AppText('Procedure Name'),
],
),
children: [
Container(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 11),
child: AppText(
TranslationBase.of(context).orderType,
fontWeight: FontWeight.w700,
color: Color(0xff2B353E),
),
),
],
),
Row(
children: [
Radio(
activeColor: Color(0xFFD02127),
value: 0,
groupValue: selectedType,
onChanged: (value) {
// historyInfo.type =
// setSelectedType(value).toString();
//
// historyInfo.type = value.toString();
},
),
AppText(
'routine',
color: Color(0xff575757),
fontWeight: FontWeight.w600,
),
Radio(
activeColor: Color(0xFFD02127),
groupValue: selectedType,
value: 1,
onChanged: (value) {
// historyInfo.type =
// setSelectedType(value).toString();
//
// historyInfo.type = value.toString();
},
),
AppText(
TranslationBase.of(context).urgent,
color: Color(0xff575757),
fontWeight: FontWeight.w600,
),
],
),
],
),
),
),
SizedBox(
height: 2.0,
),
Padding(
padding: EdgeInsets.symmetric(
horizontal: 12, vertical: 15.0),
child: TextFields(
hintText: TranslationBase.of(context).remarks,
//controller: remarksController,
onChanged: (value) {
// historyInfo.remarks = value;
},
minLines: 3,
maxLines: 5,
borderWidth: 0.5,
borderColor: Colors.grey[500],
),
),
SizedBox(
height: 19.0,
),
//DividerWithSpacesAround(),
],
),
);
}),
),
],
),
bottomSheet: Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context).addSelectedProcedures,
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () {
//print(entityList.toString());
onPressed:
// if (entityList.isEmpty == true) {
// DrAppToastMsg.showErrorToast(
// TranslationBase.of(context)
// .fillTheMandatoryProcedureDetails,
// );
// return;
// }
Navigator.pop(context);
// postProcedure(
// orderType: selectedType.toString(),
// entityList: entityList,
// patient: patient,
// model: widget.model,
// remarks: remarksController.text);
},
),
],
),
),
),
);
}
}

@ -7,6 +7,7 @@ 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/screens/procedures/add-procedure-form.dart';
import 'package:doctor_app_flutter/screens/procedures/add_procedure_homeScreen.dart';
import 'package:doctor_app_flutter/screens/procedures/procedure_checkout_screen.dart';
import 'package:doctor_app_flutter/screens/procedures/update-procedure.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -102,13 +103,18 @@ class ProcedureScreen extends StatelessWidget {
patient.patientStatusType == 43)
InkWell(
onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => AddProcedureHome(
// patient: patient,
// model: model,
// )),
// );
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddProcedureHome(
patient: patient,
model: model,
)),
builder: (context) => ProcedureCheckOutScreen()),
);
},
child: Container(

Loading…
Cancel
Save