From ac61da6ff9e24e842f1519ab769d39c7ff91d74c Mon Sep 17 00:00:00 2001 From: mosazaid Date: Sun, 31 Oct 2021 14:12:04 +0200 Subject: [PATCH] make register patient feature --- lib/config/config.dart | 4 +-- lib/core/enum/CalenderType.dart | 4 +++ .../RegisterSearchPatientPage.dart | 33 +++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 lib/core/enum/CalenderType.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index fc87725b..d207b173 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; -// const BASE_URL = 'https://hmgwebservices.com/'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = diff --git a/lib/core/enum/CalenderType.dart b/lib/core/enum/CalenderType.dart new file mode 100644 index 00000000..51f98512 --- /dev/null +++ b/lib/core/enum/CalenderType.dart @@ -0,0 +1,4 @@ +enum CalenderType{ + Gregorian, + Hijri, +} \ No newline at end of file diff --git a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart index 3aafe5bd..d8b95e80 100644 --- a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/CalenderType.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientRegisterViewModel.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; @@ -126,6 +127,38 @@ class _RegisterSearchPatientPageState extends State { SizedBox( height: 10, ), + Row( + children: [ + Expanded( + child: RadioListTile( + title: AppText( + TranslationBase.of(context).inPatient), + value: CalenderType.Gregorian, + groupValue: patientType, + onChanged: (PatientType value) { + setState(() { + patientType = value; + radioOnChange(value); + }); + }, + ), + ), + Expanded( + child: RadioListTile( + title: AppText( + TranslationBase.of(context).outpatient), + value: PatientType.OUT_PATIENT, + groupValue: patientType, + onChanged: (PatientType value) { + setState(() { + patientType = value; + radioOnChange(value); + }); + }, + ), + ), + ], + ), AppTextFieldCustom( height: screenSize.height * 0.075, hintText: "Birthdate",