Merge branch 'development' into 'master'

Development

See merge request Cloud_Solution/doctor_app_flutter!644
merge-requests/664/merge
Mohammad Aljammal 5 years ago
commit 1051a704bc

@ -322,4 +322,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.10.0.rc.1
COCOAPODS: 1.10.1

@ -88,7 +88,6 @@ class BaseAppClient {
onFailure(Helpers.generateContactAdminMsg(), statusCode);
} else {
var parsed = json.decode(response.body.toString());
if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],
parsed['AndroidLink'], parsed['IOSLink']);
@ -99,7 +98,7 @@ class BaseAppClient {
onFailure(getError(parsed), statusCode);
} else if (!isAllowAny) {
await Helpers.logout();
Helpers.showErrorToast('Your session expired Please login agian');
Helpers.showErrorToast('Your session expired Please login again');
}
if (isAllowAny) {
onFailure(getError(parsed), statusCode);

@ -47,9 +47,9 @@ const Map<String, Map<String, String>> localizedValues = {
'radiology': {'en': 'Radiology', 'ar': 'الأشعة'},
'service': {'en': 'Service', 'ar': 'خدمة'},
'referral': {'en': 'Referral', 'ar': 'الإحالة'},
'inPatient': {'en': 'My Patients', 'ar': 'مرضاي'},
'inPatient': {'en': 'InPatients', 'ar': 'مرضاي'},
'inPatientLabel': {'en': 'InPatients', 'ar': 'المريض الداخلي'},
'inPatientAll': {'en': 'All Patients', 'ar': 'كل المرضى'},
'inPatientAll': {'en': 'All InPatients', 'ar': 'كل المرضى'},
'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
'searchMedicine': {'en': 'Search Medicines', 'ar': 'بحث عن الدواء'},
@ -756,12 +756,12 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': "الإجازة المرضية في حالة الانتظار لهذا المريض"
},
'no-clinic': {'en': "No Clinic", 'ar': "لا عيادة"},
'otherStatistic': {'en': "Other Statistics", 'ar': "دیگر شماریات"},
'ptientsreferral': {'en': "Patient's Referrals", 'ar': "مریض کا حوالہ"},
'arrivalpatient': {'en': "Arrival Patients", 'ar': "مریضوں کی آمد"},
'otherStatistic': {'en': "Other Statistics", 'ar': "إحصائيات أخرى"},
'ptientsreferral': {'en': "Patient's Referrals", 'ar': "إحالات المريض"},
'arrivalpatient': {'en': "Arrival Patients", 'ar': "المرضى القادمون"},
'searchmedicinepatient': {
'en': "Search patient or Medicines",
'ar': "مریض یا دوائیں تلاش کریں"
'ar': "ابحث عن المريض أو الأدوية"
},
'appointmentDate': {'en': "Appointment Date", 'ar': "تاريخ الموعد"},
'arrived_p': {'en': "Arrived", 'ar': "وصل"},
@ -859,7 +859,7 @@ const Map<String, Map<String, String>> localizedValues = {
"numOfDays": {"en": "Number of Days", "ar": "عدد الأيام"},
"replayBefore": {"en": "Replay Before", "ar": "رد قبل"},
"try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'},
"refClinic": {"en": "Ref Clinic", "ar": "Ref Clinic"},
"refClinic": {"en": "Ref Clinic", "ar": "العيادة المرجعية"},
"acknowledged": {"en": "Acknowledged", "ar": "إقرار"},
"didntCatch": {
"en": "Didn't catch that. Try Speaking again",
@ -946,8 +946,14 @@ const Map<String, Map<String, String>> localizedValues = {
"approvals22": {"en": "Approvals", "ar": "التامين"},
"severe": {"en": "Severe", "ar": "الشدة"},
"graphDetails": {"en": "Graph Details", "ar": "تفاصيل الرسم البياني"},
"addNewOrderSheet": {"en": "Add a New Order Sheet", "ar": "أضف ورقة طلب جديدة"},
"addNewProgressNote": {"en": "Add a New Progress Note", "ar": "أضف ملاحظة تقدم جديدة"},
"addNewOrderSheet": {
"en": "Add a New Order Sheet",
"ar": "أضف ورقة طلب جديدة"
},
"addNewProgressNote": {
"en": "Add a New Progress Note",
"ar": "أضف ملاحظة تقدم جديدة"
},
"notePending": {"en": "Pending", "ar": "قيد الانتظار"},
"noteCanceled": {"en": "Canceled", "ar": "ألغيت"},
"noteVerified": {"en": "Verified", "ar": "تم التحقق"},
@ -961,5 +967,8 @@ const Map<String, Map<String, String>> localizedValues = {
'medical': {'en': 'Medical', 'ar': 'الطبي'},
'report': {'en': 'Report', 'ar': 'التقرير'},
'discharge': {'en': 'Discharge', 'ar': 'discharge'},
"discharged": {"en": "Discharged", "ar": "المصرف"},
"discharged": {"en": "Discharged", "ar": "المفرغين"},
"none": {"en": "None", "ar": "لا شيء"},
"notRepliedYet": {"en": "Not Replied yet", "ar": "لم يرد بعد"},
"clearText": {"en": "Clear Text", "ar": "نص واضح"},
};

@ -44,7 +44,7 @@ class DischargedPatientService extends BaseService {
Future gtMyDischargeReferralPatient() async {
hasError = false;
Map<String, dynamic> body = Map();
await getDoctorProfile();
await getDoctorProfile(isGetProfile: true);
body['DoctorID'] = doctorProfile.doctorID;
body['FirstName'] = "0";
body['MiddleName'] = "0";

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
@ -84,22 +85,21 @@ class PatientSearchViewModel extends BaseViewModel {
}
}
getPatientBasedOnDate(
{item,
PatientSearchRequestModel patientSearchRequestModel,
PatientType selectedPatientType,
bool isSearchWithKeyInfo}) async {
getPatientBasedOnDate (
{item, PatientSearchRequestModel patientSearchRequestModel, PatientType selectedPatientType,
bool isSearchWithKeyInfo,OutPatientFilterType outPatientFilterType })async {
String dateTo;
String dateFrom;
// TODO Fix this in Arabic
if (item == 'Previous') {
if (OutPatientFilterType.Previous == outPatientFilterType) {
selectedFromDate = DateTime(
DateTime.now().year, DateTime.now().month - 1, DateTime.now().day);
selectedToDate = DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day - 1);
dateTo = DateUtils.convertDateToFormat(selectedToDate, 'yyyy-MM-dd');
dateFrom = DateUtils.convertDateToFormat(selectedFromDate, 'yyyy-MM-dd');
} else if (item == 'Next Week') {
} else if (OutPatientFilterType.NextWeek == outPatientFilterType) {
dateTo = DateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 6),

@ -17,7 +17,6 @@ import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart';
import './screens/auth/login_screen.dart';
import './screens/auth/verification_methods_screen.dart';
import './screens/patients/patients_screen.dart';
import 'screens/patients/profile/profile_screen/patient_profile_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart';
import 'landing_page.dart';
@ -66,7 +65,6 @@ var routes = {
ROOT: (_) => RootPage(),
HOME: (_) => LandingPage(),
LOGIN: (_) => Loginsreen(),
PATIENTS: (_) => PatientsScreen(),
VERIFICATION_METHODS: (_) => VerificationMethodsScreen(),
PATIENTS_PROFILE: (_) => PatientProfileScreen(),
LAB_RESULT: (_) => LabsHomePage(),

@ -8,8 +8,6 @@ class HomePageCard extends StatelessWidget {
@required this.child,
this.onTap,
Key key,
this.width,
this.height,
this.color,
this.opacity = 0.4,
this.margin})
@ -18,8 +16,6 @@ class HomePageCard extends StatelessWidget {
final String imageName;
final Widget child;
final Function onTap;
final double width;
final double height;
final Color color;
final double opacity;
final EdgeInsets margin;
@ -28,12 +24,10 @@ class HomePageCard extends StatelessWidget {
return InkWell(
onTap: onTap,
child: Container(
width: width != null ? width : MediaQuery.of(context).size.width * 0.28,
height: height != null
? height
: MediaQuery.of(context).orientation == Orientation.portrait
? MediaQuery.of(context).size.height * 0.18
: MediaQuery.of(context).size.height * 0.36,
width: 120,
height: MediaQuery.of(context).orientation == Orientation.portrait
? 130
: 250,
margin: this.margin,
decoration: BoxDecoration(
color: !hasBorder

@ -19,9 +19,8 @@ import 'package:doctor_app_flutter/screens/patients/DischargedPatientPage.dart';
import 'package:doctor_app_flutter/screens/patients/PatientsInPatientScreen.dart';
import 'package:doctor_app_flutter/screens/patients/ReferralDischargedPatientPage.dart';
import 'package:doctor_app_flutter/screens/patients/out_patient/out_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_screen_new.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patients_screen_new.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search_screen.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_screen.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_result_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/patient_referral_screen.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
@ -504,8 +503,7 @@ class _HomeScreenState extends State<HomeScreen> {
Container(
padding: EdgeInsets.all(10),
child: AppText(
TranslationBase.of(context)
.inPatient,
"My\n"+TranslationBase.of(context).inPatient,
color: Colors.white,
textAlign: TextAlign.start,
fontSize: 15,
@ -520,15 +518,6 @@ class _HomeScreenState extends State<HomeScreen> {
page: PatientInPatientScreen(),
),
);
// getRequestHeader(true);
// Navigator.of(context)
// .pushNamed(PATIENTS, arguments: {
// "patientSearchForm":
// _patientSearchFormValues,
// "selectedType": "1",
// "arrivalType": "1",
// "isInpatient": true
// });
},
),
HomePageCard(
@ -704,7 +693,7 @@ class _HomeScreenState extends State<HomeScreen> {
context,
MaterialPageRoute(
builder: (context) =>
PatientSearchScreenNew(),
PatientSearchScreen(),
));
},
),

@ -1,112 +0,0 @@
import 'dart:ui';
import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search_screen.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class SearchMedicinePatientScreen extends StatefulWidget {
@override
_SearchMedicinePatientScreen createState() => _SearchMedicinePatientScreen();
}
class _SearchMedicinePatientScreen extends State<SearchMedicinePatientScreen>
with SingleTickerProviderStateMixin {
TabController _tabController;
var activeIndex = 0;
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
}
@override
void dispose() {
super.dispose();
_tabController.dispose();
}
@override
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).searchmedicinepatient,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0),
child: Center(
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.92, // 0.9,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.9), //width: 0.7
),
color: Colors.white),
child: TabBar(
isScrollable: true,
onTap: (index) {
setState(() {
activeIndex = index;
});
},
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 30.0, right: 30.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: AppText(
TranslationBase.of(context).searchPatient,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 14,
),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: AppText(
TranslationBase.of(context).searchMedicine,
fontWeight: FontWeight.bold,
fontSize: 14,
color: Colors.black),
),
),
],
),
),
),
),
body: Column(
children: <Widget>[
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
PatientSearchScreen(),
MedicineSearchScreen()
],
),
)
],
),
));
}
}

@ -76,7 +76,6 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> with Si
fontSize: SizeConfig.textMultiplier * 2.8,
fontWeight: FontWeight.bold,
color: Color(0xFF2B353E),
fontFamily: 'Poppins',
),
),
]),
@ -108,7 +107,7 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> with Si
unselectedLabelColor: Colors.grey[800],
tabs: [
tabWidget(screenSize, _activeTab == 0, TranslationBase.of(context).inPatientAll, counter: model.inPatientList.length),
tabWidget(screenSize, _activeTab == 1, TranslationBase.of(context).inPatient, counter: model.myIinPatientList.length),
tabWidget(screenSize, _activeTab == 1, "My InPatients", counter: model.myIinPatientList.length),
tabWidget(screenSize, _activeTab == 2, TranslationBase.of(context).discharged),
],
),
@ -155,7 +154,7 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> with Si
children: [
AppText(
title,
fontSize: SizeConfig.textMultiplier * 1.6,
fontSize: SizeConfig.textMultiplier * 1.5,
color: isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),

@ -509,7 +509,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget {
CrossAxisAlignment.start,
children: [
AppText(
"Dr ${referredPatient.referringDoctorName}",
"${TranslationBase.of(context).dr} ${referredPatient.referringDoctorName}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w800,
fontSize: 1.5 *

@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/header.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -103,7 +103,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
builder: (_, model, w) => AppScaffold(
appBarTitle: "Search Patient",
isShowAppBar: true,
appBar: HeaderInSearch(
appBar: PatientSearchHeader(
title: "My Out patient",
),
@ -132,7 +132,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
onTap: () async {
setState(() {
_activeLocation = _times.indexOf(item);
outPatientFilterType= _activeLocation==0?OutPatientFilterType.Previous:_activeLocation==0?OutPatientFilterType.Today:OutPatientFilterType.NextWeek;
outPatientFilterType= _activeLocation==0?OutPatientFilterType.Previous:_activeLocation==1?OutPatientFilterType.Today:OutPatientFilterType.NextWeek;
_controller.text="";
});
model.searchData("");
@ -142,7 +142,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel: widget
.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo);
isSearchWithKeyInfo: widget.isSearchWithKeyInfo, outPatientFilterType: outPatientFilterType);
GifLoaderDialogUtils.hideDialog(context);
},
child: Center(

@ -2,10 +2,10 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class HeaderInSearch extends StatelessWidget with PreferredSizeWidget {
class PatientSearchHeader extends StatelessWidget with PreferredSizeWidget {
final String title;
const HeaderInSearch({Key key, this.title}) : super(key: key);
const PatientSearchHeader({Key key, this.title}) : super(key: key);
@override
Widget build(BuildContext context) {

@ -8,26 +8,19 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/header.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/PatientCard.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/errors/error_message.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
// ignore: must_be_immutable
class PatientsScreenNew extends StatefulWidget {
final patientSearchForm;
final selectedType;
final isAppbar;
final arrivalType;
final isView;
class PatientsSearchResultScreen extends StatefulWidget {
final PatientType selectedPatientType;
final PatientSearchRequestModel patientSearchRequestModel;
final bool isSearchWithKeyInfo;
@ -37,29 +30,27 @@ class PatientsScreenNew extends StatefulWidget {
final String searchKey;
PatientsScreenNew(
{this.patientSearchForm,
this.selectedType,
this.isAppbar = true,
this.arrivalType,
this.isView,
PatientsSearchResultScreen(
{
this.selectedPatientType,
this.patientSearchRequestModel,
this.isSearchWithKeyInfo = true,
this.isSearch = false,
this.isInpatient = false, this.searchKey, this.isSearchAndOut=false});
this.isInpatient = false,
this.searchKey,
this.isSearchAndOut = false});
@override
_PatientsScreenNewState createState() => _PatientsScreenNewState();
_PatientsSearchResultScreenState createState() =>
_PatientsSearchResultScreenState();
}
class _PatientsScreenNewState extends State<PatientsScreenNew> {
class _PatientsSearchResultScreenState
extends State<PatientsSearchResultScreen> {
int clinicId;
AuthViewModel authProvider;
List<String> _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week'];
int _activeLocation = 0;
String patientType;
String patientTypeTitle;
var selectedFilter = 1;
@ -74,14 +65,6 @@ class _PatientsScreenNewState extends State<PatientsScreenNew> {
@override
Widget build(BuildContext context) {
authProvider = Provider.of(context);
_locations = [
TranslationBase.of(context).today,
TranslationBase.of(context).tomorrow,
TranslationBase.of(context).nextWeek,
];
final screenSize = MediaQuery.of(context).size;
return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {
if(!widget.isSearchWithKeyInfo && widget.selectedPatientType == PatientType.OutPatient) {
@ -95,72 +78,12 @@ class _PatientsScreenNewState extends State<PatientsScreenNew> {
builder: (_, model, w) => AppScaffold(
appBarTitle: "Search Patient",
isShowAppBar: true,
appBar: !widget.isSearch && !widget.isInpatient?HeaderInSearch(
title: "My Out patient",
):HeaderInSearch(
title: "Search for ${widget.searchKey}",
),
appBar: PatientSearchHeader(
title: "Search for ${widget.searchKey}",
),
baseViewModel: model,
body: Column(
children: [
if(!widget.isInpatient && !widget.isSearch)
Container(
// color: Colors.red,
height: screenSize.height * 0.070,
decoration: TextFieldsUtils
.containerBorderDecoration(
Color(0Xffffffff),
Color(0xFFCCCCCC),
borderRadius: 4,
borderWidth: 0),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == item
? true
: false;
return Expanded(
child: InkWell(
onTap: () async {
setState(() {
_activeLocation = _locations.indexOf(item);
});
GifLoaderDialogUtils.showMyDialog(context);
await model.getPatientBasedOnDate(item: item,
selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel: widget
.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo);
GifLoaderDialogUtils.hideDialog(context);
},
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
_isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: AppText(
item,
fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
),
),
),
);
}).toList(),
),
),
SizedBox(height: 18.5),
Container(
width: SizeConfig.screenWidth * 0.9,

@ -4,11 +4,10 @@ import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patients_screen_new.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_result_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
@ -17,12 +16,12 @@ import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class PatientSearchScreenNew extends StatefulWidget {
class PatientSearchScreen extends StatefulWidget {
@override
_PatientSearchScreenNewState createState() => _PatientSearchScreenNewState();
_PatientSearchScreenState createState() => _PatientSearchScreenState();
}
class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
class _PatientSearchScreenState extends State<PatientSearchScreen> {
bool showOther = false;
bool isFormSubmitted = false;
TextEditingController patientFileInfoController = TextEditingController();
@ -57,46 +56,6 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
SizedBox(
height: 16,
),
// AppText(
// 'Patient Type',
// fontWeight: FontWeight.w600,
// ),
// Row(
// children: [
// Row(
// children: [
// Radio(
// activeColor: Color(0xFFB9382C),
// value: PatientType.inPatient,
// groupValue: selectedPatientType,
// onChanged: (value) {
// setState(() {
// selectedPatientType =
// PatientType.inPatient;
// });
// },
// ),
// Text('InPatient'),
// ],
// ),
// Row(
// children: [
// Radio(
// activeColor: Color(0xFFB9382C),
// value: PatientType.OutPatient,
// groupValue: selectedPatientType,
// onChanged: (value) {
// setState(() {
// selectedPatientType =
// PatientType.OutPatient;
// });
// },
// ),
// Text('OutPatient'),
// ],
// ),
// ],
// ),
SizedBox(
height: 10,
),
@ -133,78 +92,6 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
SizedBox(
height: 5,
),
// Row(
// mainAxisAlignment: MainAxisAlignment.end,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// InkWell(
// child: this.showOther == false
// ? AppText(
// TranslationBase.of(context)
// .searchWithOther,
// color: Colors.red,
// fontWeight: FontWeight.bold,
// )
// : AppText(
// TranslationBase.of(context)
// .hideOtherCriteria,
// color: Colors.red,
// fontWeight: FontWeight.bold),
// onTap: () {
// setState(() {
// this.showOther = !this.showOther;
// });
// },
// )
// ],
// ),
// SizedBox(
// height: 30,
// ),
// if (showOther)
// Column(
// children: [
// AppTextFieldCustom(
// hintText:
// TranslationBase.of(context).firstName,
// controller: firstNameInfoController,
// maxLines: 1,
// minLines: 1,
// hasBorder: true,
// onChanged: (_) {},
// // validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null ,
// ),
// SizedBox(
// height: 10,
// ),
// AppTextFieldCustom(
// hintText:
// TranslationBase.of(context).middleName,
// controller: middleNameInfoController,
// maxLines: 1,
// minLines: 1,
// onChanged: (_) {},
// hasBorder: true,
// // validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null ,
// ),
// SizedBox(
// height: 10,
// ),
// AppTextFieldCustom(
// hintText:
// TranslationBase.of(context).lastName,
// controller: lastNameFileInfoController,
// maxLines: 1,
// minLines: 1,
// onChanged: (_) {},
// hasBorder: true,
// // validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null ,
// ),
// SizedBox(
// height: 10,
// ),
// ],
// ),
SizedBox(
height: MediaQuery.of(context).size.height * 0.12,
),
@ -301,7 +188,7 @@ class _PatientSearchScreenNewState extends State<PatientSearchScreenNew> {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) => PatientsScreenNew(
builder: (BuildContext context) => PatientsSearchResultScreen(
selectedPatientType: selectedPatientType,
patientSearchRequestModel: patientSearchRequestModel,
isSearchWithKeyInfo:

@ -1,641 +0,0 @@
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../config/config.dart';
import '../../config/size_config.dart';
import '../../lookups/patient_lookup.dart';
import '../../widgets/patients/dynamic_elements.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/app_texts_widget.dart';
import '../../widgets/shared/buttons/app_buttons_widget.dart';
import '../../widgets/shared/rounded_container_widget.dart';
import '../../widgets/shared/text_fields/app_text_form_field.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Helpers helpers = Helpers();
// OWNER : Ibrahim albitar
// DATE : 19-04-2020
// DESCRIPTION : Patient Search Screen.
class PatientSearchScreen extends StatefulWidget {
@override
_PatientSearchScreenState createState() => _PatientSearchScreenState();
}
class _PatientSearchScreenState extends State<PatientSearchScreen> {
String _selectedType = '1';
String _selectedLocation = '1';
String error = '';
ProjectViewModel projectsProvider;
String itemText = '';
String itemText2 = '';
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
bool _autoValidate = false;
bool onlyArrived = true;
bool isView = false;
bool isFormSubmitted = false;
FocusNode _nodeText1 = FocusNode();
FocusNode _nodeText2 = FocusNode();
FocusNode _nodeText3 = FocusNode();
var _patientSearchFormValues = PatientModel(
FirstName: "0",
MiddleName: "0",
LastName: "0",
PatientMobileNumber: "0",
PatientIdentificationID: "0",
MobileNo: '0',
PatientID: 0,
From: "0",
To: "0",
LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z",
IPAdress: "11.11.11.11",
VersionID: 5.8,
Channel: 9,
TokenID: "2Fi7HoIHB0eDyekVa6tCJg==",
SessionID: "5G0yXn0Jnq",
IsLoginForDoctorApp: true,
IdentificationNo: '0',
PatientOutSA: false);
void _validateInputs() async {
setState(() {
isFormSubmitted = true;
});
try {
if (_formKey.currentState.validate()) {
_formKey.currentState.save();
if ((_patientSearchFormValues.From == "0" ||
_patientSearchFormValues.To == "0") &&
_selectedType == "7" ||
((_patientSearchFormValues.From == "0" ||
_patientSearchFormValues.To == "0") &&
_selectedType == "6")) {
// Helpers.showErrorToast("Please Choose The Dates");
} else {
setState(() {
isFormSubmitted = false;
});
Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType,
"isSearch": true,
"isView": isView
});
}
} else {
setState(() {
_autoValidate = true;
});
}
} catch (err) {
error = err.toString();
}
}
handelCatchErrorCase(err) {
//isLoading = false;
//isError = true;
error = Helpers.generateContactAdminMsg(err);
//notifyListeners();
throw err;
}
@override
Widget build(BuildContext context) {
projectsProvider = Provider.of(context);
return GestureDetector(
onTap: () {
FocusScope.of(context).requestFocus(new FocusNode());
},
child: AppScaffold(
appBarTitle: TranslationBase.of(context).searchPatient,
isShowAppBar: true,
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RoundedContainer(
showBorder: false,
child: Column(
children: <Widget>[
Column(
children: <Widget>[
// Container(
// child: Icon(
// DoctorApp.search_patient_1,
// size: 100,
// color: Colors.black,
// ),
// margin: EdgeInsets.only(top: 10),
// ),
// Padding(
// padding: const EdgeInsets.only(top: 12.0),
// child: AppText(
// TranslationBase.of(context)
// .searchPatientImageCaptionTitle
// .toUpperCase(),
// fontWeight: FontWeight.bold,
// fontSize: SizeConfig.heightMultiplier * 2.5,
// ),
// ),
// Padding(
// padding: const EdgeInsets.only(top: 5.0),
// child: AppText(
// TranslationBase.of(context)
// .searchPatientImageCaptionBody,
// fontSize: SizeConfig.heightMultiplier * 2,
// ),
// )
],
),
Container(
padding: EdgeInsets.all(15),
width: SizeConfig.screenWidth * 1,
child: Form(
key: _formKey,
autovalidate: _autoValidate,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 15,
),
if (_selectedType != '7')
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.patpatientIDMobilenationalientID,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) {
if (value != null && value != '') {
if (value.length == 10 &&
(value[0] == '2' ||
value[0] == '1')) {
_patientSearchFormValues
.IdentificationNo = value;
_patientSearchFormValues.Searchtype = 2;
_patientSearchFormValues.setPatientID =
0;
} else if ((value.length == 10 ||
value.length == 9) &&
((value[0] == '0' &&
value[1] == '5') ||
value[0] == '5')) {
_patientSearchFormValues.MobileNo =
value;
_patientSearchFormValues.Searchtype = 0;
} else {
_patientSearchFormValues.setPatientID =
int.parse(value);
_patientSearchFormValues.Searchtype = 1;
}
}
// else{
// }
// value == null || value == ''
// ? _patientSearchFormValues.setPatientID =
// 0
// : _patientSearchFormValues.setPatientID =
// int.parse(value);
// if (value != null &&
// value.toString().trim().isEmpty) {
// _patientSearchFormValues.setPatientID = 0;
// }
},
),
),
SizedBox(
height: 10,
),
// Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
// InkWell(
// child: this.isView == false
// ? AppText(
// TranslationBase.of(context)
// .searchWithOther,
// color: Colors.red,
// fontWeight: FontWeight.bold,
// )
// : AppText(
// TranslationBase.of(context)
// .hideOtherCriteria,
// color: Colors.red,
// fontWeight: FontWeight.bold),
// onTap: () {
// setState(() {
// this.isView = !this.isView;
// });
// },
// )
// ],
// ),
isView == true
? Column(children: [
SizedBox(
height: 10,
),
Container(
height: 65.0,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1.0,
style: BorderStyle.solid,
color: HexColor("#CCCCCC")),
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
),
),
width: double.infinity,
child: Padding(
padding: EdgeInsets.only(
top: SizeConfig.widthMultiplier *
0.9,
bottom: SizeConfig.widthMultiplier *
0.9,
right:
SizeConfig.widthMultiplier * 3,
left:
SizeConfig.widthMultiplier * 3),
child: Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
// add Expanded to have your dropdown button fill remaining space
child:
DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: _selectedType,
iconSize: 25,
elevation: 16,
selectedItemBuilder:
(BuildContext context) {
return PATIENT_TYPE_Des.map(
(item) {
return Row(
mainAxisSize:
MainAxisSize.max,
children: <Widget>[
!projectsProvider
.isArabic
? AppText(
item['text'],
fontSize: SizeConfig
.textMultiplier *
2.1,
)
: AppText(
item['text_ar'],
fontSize: SizeConfig
.textMultiplier *
2.1,
),
],
);
}).toList();
},
onChanged: (String newValue) =>
{
setState(() {
_selectedType = newValue;
selectedPatientType =
int.parse(
_selectedType);
})
},
items: PATIENT_TYPE_Des.map(
(item) {
!projectsProvider.isArabic
? itemText = item['text']
: itemText =
item['text_ar'];
return DropdownMenuItem(
child: Text(
itemText,
textAlign: TextAlign.end,
),
value: item['val'],
);
}).toList(),
)),
),
],
),
),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.firstName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setFirstName = "0"
: _patientSearchFormValues
.setFirstName = value;
if (value != null &&
value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues
.setFirstName = "0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
if (_selectedType != '7')
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.phoneNumber,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientMobileNumber =
"0"
: _patientSearchFormValues
.setPatientMobileNumber =
value;
if (value != null &&
value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues
.setPatientMobileNumber = "0";
}
},
),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.middleName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setMiddleName = "0"
: _patientSearchFormValues
.setMiddleName = value;
if (value != null &&
value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues
.setMiddleName = "0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.lastName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setLastName = "0"
: _patientSearchFormValues
.setLastName = value;
if (value != null &&
value
.toString()
.trim()
.isEmpty) {
_patientSearchFormValues
.setLastName = "0";
}
},
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.patientID,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText2,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientID = 0
: _patientSearchFormValues
.setPatientID =
int.parse(value);
if (value != null &&
value
.trim()
.toString()
.isEmpty) {
_patientSearchFormValues
.setPatientID = 0;
}
}),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.patientFile,
borderColor: Colors.white,
textInputType: TextInputType.number,
focusNode: _nodeText3,
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {},
),
),
(!(_selectedType == '2' ||
_selectedType == '4'))
? DynamicElements(
_patientSearchFormValues,
isFormSubmitted)
: SizedBox(
height: 0,
),
SizedBox(
height: 10,
),
Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color:
HexColor("#CCCCCC"))),
height: 25,
width: 25,
child: Checkbox(
value: onlyArrived,
checkColor: HexColor("#2A930A"),
activeColor: Colors.white,
onChanged: (bool newValue) {
setState(() {
onlyArrived = newValue;
});
}),
),
SizedBox(
width: 12,
),
AppText(
TranslationBase.of(context)
.onlyArrivedPatient,
fontSize:
SizeConfig.textMultiplier *
2),
])),
SizedBox(
height: 10,
),
])
: SizedBox(
height: 0,
),
],
),
),
),
],
),
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context).search,
color: Colors.red[800],
onPressed: () {
_validateInputs();
},
),
],
),
),
],
),
]),
),
);
}
}

File diff suppressed because it is too large Load Diff

@ -325,7 +325,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
),
AppTextFieldCustom(
hintText: TranslationBase.of(context).other,
dropDownText: "None",
dropDownText: TranslationBase.of(context).none,
enabled: false,
),
SizedBox(
@ -333,7 +333,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
),
AppTextFieldCustom(
hintText: TranslationBase.of(context).how,
dropDownText: "None",
dropDownText: TranslationBase.of(context).none,
enabled: false,
),
SizedBox(
@ -345,7 +345,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
child: AppTextFieldCustom(
hintText:
TranslationBase.of(context).when,
dropDownText: "None",
dropDownText: TranslationBase.of(context).none,
enabled: false,
),
),
@ -356,7 +356,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
child: AppTextFieldCustom(
hintText:
TranslationBase.of(context).where,
dropDownText: "None",
dropDownText: TranslationBase.of(context).none,
enabled: false,
),
),
@ -369,7 +369,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
height: screenSize.height * 0.1,
hintText: TranslationBase.of(context)
.specifyPossibleLineManagement,
dropDownText: "None",
dropDownText: TranslationBase.of(context).none,
enabled: false,
minLines: 4,
maxLines: 6,

@ -97,10 +97,14 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
children: [
BottomSheetTitle(
title: widget.visitType == 3
? (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
? (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
),
SizedBox(
height: 10.0,
@ -114,10 +118,18 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
children: [
AppTextFieldCustom(
hintText: widget.visitType == 3
? (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
? (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context).progressNote,
//TranslationBase.of(context).addProgressNote,
controller: progressNoteController,
maxLines: 35,
@ -132,19 +144,23 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
: null,
),
Positioned(
top: -2, //MediaQuery.of(context).size.height * 0,
right: projectViewModel.isArabic? MediaQuery.of(context).size.width * 0.75 : 15,
child: IconButton(
icon: Icon(
DoctorApp.speechtotext,
color: Colors.black,
),
onPressed: () {
initSpeechState()
.then((value) => {onVoiceText()});
},
),
)
top:
-2, //MediaQuery.of(context).size.height * 0,
right: projectViewModel.isArabic
? MediaQuery.of(context).size.width * 0.75
: 15,
child: Column(
children: [
IconButton(
icon: Icon(DoctorApp.speechtotext,
color: Colors.black, size: 35),
onPressed: () {
initSpeechState()
.then((value) => {onVoiceText()});
},
),
],
))
],
),
],
@ -157,81 +173,100 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
),
),
bottomSheet: Container(
height: progressNoteController.text.isNotEmpty? 130:70,
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
child: Column(
children: <Widget>[
AppButton(
title: widget.visitType == 3
? (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
color: Color(0xff359846),
// disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700,
onPressed: () async {
setState(() {
isSubmitted = true;
});
if (progressNoteController.text.trim().isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile =
DoctorProfileModel.fromJson(profile);
if (widget.isUpdate) {
UpdateNoteReqModel reqModel = UpdateNoteReqModel(
admissionNo: int.parse(widget.patient.admissionNo),
cancelledNote: false,
lineItemNo: widget.note.lineItemNo,
createdBy: widget.note.createdBy,
notes: progressNoteController.text,
verifiedNote: false,
patientTypeID: widget.patient.patientType,
patientOutSA: false,
);
await widget.patientModel
.updatePatientProgressNote(reqModel);
} else {
CreateNoteModel reqModel = CreateNoteModel(
admissionNo: int.parse(widget.patient.admissionNo),
createdBy: doctorProfile.doctorID,
visitType: widget.visitType,
patientID: widget.patient.patientId,
nursingRemarks: ' ',
patientTypeID: widget.patient.patientType,
patientOutSA: false,
notes: progressNoteController.text);
if(progressNoteController.text.isNotEmpty)
Container(
margin: EdgeInsets.all(5),
child: AppButton(
title: TranslationBase.of(context).clearText,
onPressed: () {
setState(() {
progressNoteController.text = '';
});
},
),
),
Container(
margin: EdgeInsets.all(5),
child: AppButton(
title: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
color: Color(0xff359846),
// disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700,
onPressed: () async {
setState(() {
isSubmitted = true;
});
if (progressNoteController.text.trim().isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
await widget.patientModel
.createPatientProgressNote(reqModel);
}
DoctorProfileModel doctorProfile =
DoctorProfileModel.fromJson(profile);
if (widget.patientModel.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(widget.patientModel.error);
} else {
ProgressNoteRequest progressNoteRequest =
ProgressNoteRequest(
visitType: widget.visitType,
// if equal 5 then this will return progress note
if (widget.isUpdate) {
UpdateNoteReqModel reqModel = UpdateNoteReqModel(
admissionNo: int.parse(widget.patient.admissionNo),
cancelledNote: false,
lineItemNo: widget.note.lineItemNo,
createdBy: widget.note.createdBy,
notes: progressNoteController.text,
verifiedNote: false,
patientTypeID: widget.patient.patientType,
patientOutSA: false,
);
await widget.patientModel
.updatePatientProgressNote(reqModel);
} else {
CreateNoteModel reqModel = CreateNoteModel(
admissionNo:
int.parse(widget.patient.admissionNo),
projectID: widget.patient.projectId,
createdBy: doctorProfile.doctorID,
visitType: widget.visitType,
patientID: widget.patient.patientId,
nursingRemarks: ' ',
patientTypeID: widget.patient.patientType,
languageID: 2);
await widget.patientModel
.getPatientProgressNote(progressNoteRequest.toJson());
}
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(
"Your Order added Successfully");
Navigator.of(context).pop();
} else {
Helpers.showErrorToast("You cant add only spaces");
}
}),
patientOutSA: false,
notes: progressNoteController.text);
await widget.patientModel
.createPatientProgressNote(reqModel);
}
if (widget.patientModel.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(widget.patientModel.error);
} else {
ProgressNoteRequest progressNoteRequest =
ProgressNoteRequest(
visitType: widget.visitType,
// if equal 5 then this will return progress note
admissionNo:
int.parse(widget.patient.admissionNo),
projectID: widget.patient.projectId,
patientTypeID: widget.patient.patientType,
languageID: 2);
await widget.patientModel.getPatientProgressNote(
progressNoteRequest.toJson());
}
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(
"Your Order added Successfully");
Navigator.of(context).pop();
} else {
Helpers.showErrorToast("You cant add only spaces");
}
})),
],
),
),
@ -278,7 +313,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
setState(() {
SpeechToText.closeAlertDialog(context);
speech.stop();
progressNoteController.text = reconizedWord;
progressNoteController.text += reconizedWord + '\n';
});
} else {
print(result.finalResult);

@ -1,7 +1,9 @@
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/material.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import '../../../../routes.dart';
@ -15,290 +17,128 @@ class ProfileGridForOther extends StatelessWidget {
String from;
String to;
ProfileGridForOther(
ProfileGridForOther(
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.height,
this.isInpatient, this.from,this.to})
this.isInpatient,
this.from,
this.to})
: super(key: key);
@override
Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).service,
RADIOLOGY_PATIENT,
'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'patient/order_prescription.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patient,
"ECG",
PATIENT_ECG,
'patient/patient_sick_leave.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'patient/Order_Procedures.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).insurance,
TranslationBase.of(context).service,
PATIENT_INSURANCE_APPROVALS_NEW,
'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave,
ADD_SICKLEAVE,
'patient/patient_sick_leave.png',
isInPatient: isInpatient),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).ucaf,
PATIENT_UCAF_REQUEST,
'patient/ucaf.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).referral,
TranslationBase.of(context).patient,
REFER_PATIENT_TO_DOCTOR,
'patient/refer_patient.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).admission,
TranslationBase.of(context).request,
PATIENT_ADMISSION_REQUEST,
'patient/admission_req.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
];
return Column(
children: [
Padding(
padding: const EdgeInsets
.symmetric(
vertical: 15.0,
horizontal: 15),
child: GridView.count(
padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15),
child: StaggeredGridView.countBuilder(
shrinkWrap: true,
physics:
NeverScrollableScrollPhysics(),
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
from: from,
to: to,
nameLine1:
TranslationBase.of(
context)
.vital,
nameLine2:
TranslationBase.of(
context)
.signs,
route:
VITAL_SIGN_DETAILS,
icon:
'patient/vital_signs.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: LAB_RESULT,
nameLine1:
TranslationBase.of(
context)
.lab,
nameLine2:
TranslationBase.of(
context)
.result,
icon:
'patient/lab_results.png'),
PatientProfileButton(
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
isInPatient:
isInpatient,
route:
RADIOLOGY_PATIENT,
nameLine1:
TranslationBase.of(
context)
.radiology,
nameLine2:
TranslationBase.of(
context)
.service,
icon:
'patient/health_summary.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
ORDER_PRESCRIPTION_NEW,
nameLine1:
TranslationBase.of(
context)
.orders,
nameLine2:
TranslationBase.of(
context)
.prescription,
icon:
'patient/order_prescription.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: HEALTH_SUMMARY,
nameLine1: TranslationBase.of(context).health,
nameLine2: TranslationBase.of(context).summary,
icon:
'patient/health_summary.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: PATIENT_ECG,
nameLine1:
TranslationBase.of(
context)
.patient,
nameLine2: "ECG",
icon:
'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
ORDER_PROCEDURE,
nameLine1:
TranslationBase.of(
context)
.orders,
nameLine2:
TranslationBase.of(
context)
.procedures,
icon:
'patient/Order_Procedures.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1:
TranslationBase.of(
context)
.insurance,
nameLine2:
TranslationBase.of(
context)
.service,
icon:
'patient/vital_signs.png'),
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route: ADD_SICKLEAVE,
nameLine1:
TranslationBase.of(
context)
.patientSick,
nameLine2:
TranslationBase.of(
context)
.leave,
icon:
'patient/patient_sick_leave.png'),
if (patient.appointmentNo !=
null &&
patient.appointmentNo !=
0)
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
PATIENT_UCAF_REQUEST,
isDisable:
patient.patientStatusType !=
43
? true
: false,
nameLine1:
TranslationBase.of(
context)
.patient,
nameLine2:
TranslationBase.of(
context)
.ucaf,
icon:
'patient/ucaf.png'),
if (patient.appointmentNo !=
null &&
patient.appointmentNo !=
0)
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
REFER_PATIENT_TO_DOCTOR,
isDisable: patient
.patientStatusType !=
43
? true
: false,
nameLine1:
TranslationBase.of(
context)
.referral,
nameLine2:
TranslationBase.of(
context)
.patient,
icon:
'patient/refer_patient.png'),
if (patient.appointmentNo !=
null &&
patient.appointmentNo !=
0)
PatientProfileButton(
isInPatient:
isInpatient,
patient: patient,
patientType:
patientType,
arrivalType:
arrivalType,
route:
PATIENT_ADMISSION_REQUEST,
isDisable:
patient.patientStatusType !=
43
? true
: false,
nameLine1:
TranslationBase.of(
context)
.admission,
nameLine2:
TranslationBase.of(
context)
.request,
icon:
'patient/admission_req.png'),
],
itemCount: cardsList.length,
staggeredTileBuilder: (int index) => StaggeredTile.fit(1),
itemBuilder: (BuildContext context, int index) => PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: cardsList[index].nameLine1,
nameLine2: cardsList[index].nameLine2,
route: cardsList[index].route,
icon: cardsList[index].icon,
isInPatient: cardsList[index].isInPatient,
isDischargedPatient: cardsList[index].isDischargedPatient,
isDisable: cardsList[index].isDisable,
onTap: cardsList[index].onTap,
isLoading: cardsList[index].isLoading,
),
),
),
],

@ -1,7 +1,9 @@
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/material.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import '../../../../routes.dart';
@ -25,135 +27,115 @@ class ProfileGridForSearch extends StatelessWidget {
@override
Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel(
TranslationBase.of(context).vital,
TranslationBase.of(context).signs,
VITAL_SIGN_DETAILS,
'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'patient/lab_results.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).radiology,
TranslationBase.of(context).service,
RADIOLOGY_PATIENT,
'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'patient/order_prescription.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
'patient/health_summary.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patient,
"ECG",
PATIENT_ECG,
'patient/patient_sick_leave.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'patient/Order_Procedures.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).insurance,
TranslationBase.of(context).service,
PATIENT_INSURANCE_APPROVALS_NEW,
'patient/vital_signs.png',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave,
ADD_SICKLEAVE,
'patient/patient_sick_leave.png',
isInPatient: isInpatient),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).patient,
TranslationBase.of(context).ucaf,
PATIENT_UCAF_REQUEST,
'patient/ucaf.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).referral,
TranslationBase.of(context).patient,
REFER_PATIENT_TO_DOCTOR,
'patient/refer_patient.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileCardModel(
TranslationBase.of(context).admission,
TranslationBase.of(context).request,
PATIENT_ADMISSION_REQUEST,
'patient/admission_req.png',
isInPatient: isInpatient,
isDisable: patient.patientStatusType != 43 ? true : false),
];
return Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15),
child: GridView.count(
child: StaggeredGridView.countBuilder(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'),
PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/health_summary.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: HEALTH_SUMMARY,
nameLine1: TranslationBase.of(context).health,
nameLine2: TranslationBase.of(context).summary,
icon: 'patient/health_summary.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
icon: 'patient/patient_sick_leave.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'patient/patient_sick_leave.png'),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_UCAF_REQUEST,
isDisable: patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
icon: 'patient/ucaf.png'),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
isDisable: patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
if (patient.appointmentNo != null && patient.appointmentNo != 0)
PatientProfileButton(
isInPatient: isInpatient,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ADMISSION_REQUEST,
isDisable: patient.patientStatusType != 43 ? true : false,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
icon: 'patient/admission_req.png'),
],
itemCount: cardsList.length,
staggeredTileBuilder: (int index) => StaggeredTile.fit(1),
itemBuilder: (BuildContext context, int index) => PatientProfileButton(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: cardsList[index].nameLine1,
nameLine2: cardsList[index].nameLine2,
route: cardsList[index].route,
icon: cardsList[index].icon,
isInPatient: cardsList[index].isInPatient,
isDischargedPatient: cardsList[index].isDischargedPatient,
isDisable: cardsList[index].isDisable,
onTap: cardsList[index].onTap,
isLoading: cardsList[index].isLoading,
),
),
),
],

@ -19,11 +19,10 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt;
class AddReplayOnReferralPatient extends StatefulWidget {
final PatientReferralViewModel patientReferralViewModel;
final MyReferralPatientModel myReferralInPatientModel;
//TODO Jammal
const AddReplayOnReferralPatient(
{Key key, this.patientReferralViewModel, this.myReferralInPatientModel})
: super(key: key);
@ -33,20 +32,19 @@ class AddReplayOnReferralPatient extends StatefulWidget {
_AddReplayOnReferralPatientState();
}
class _AddReplayOnReferralPatientState extends State<AddReplayOnReferralPatient> {
class _AddReplayOnReferralPatientState
extends State<AddReplayOnReferralPatient> {
bool isSubmitted = false;
stt.SpeechToText speech = stt.SpeechToText();
var reconizedWord;
var event = RobotProvider();
TextEditingController progressNoteController = TextEditingController();
TextEditingController replayOnReferralController = TextEditingController();
@override
void initState() {
requestPermissions();
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
@ -73,23 +71,24 @@ class _AddReplayOnReferralPatientState extends State<AddReplayOnReferralPatient>
children: [
AppTextFieldCustom(
hintText: 'Replay your responses here',
controller: progressNoteController,
controller: replayOnReferralController,
maxLines: 35,
minLines: 25,
hasBorder: true,
validationError:
progressNoteController.text.isEmpty &&
replayOnReferralController.text.isEmpty &&
isSubmitted
? TranslationBase.of(context).emptyMessage
: null,
),
Positioned(
top: 0,//MediaQuery.of(context).size.height * 0,
top: 0, //MediaQuery.of(context).size.height * 0,
right: 15,
child: IconButton(
icon: Icon(
DoctorApp.speechtotext,
color: Colors.black,
size: 35,
),
onPressed: () {
onVoiceText();
@ -108,36 +107,57 @@ class _AddReplayOnReferralPatientState extends State<AddReplayOnReferralPatient>
),
),
bottomSheet: Container(
height: replayOnReferralController.text.isNotEmpty? 130:70,
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
child: Column(
children: <Widget>[
AppButton(
title: 'Submit Replay',
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () async {
setState(() {
isSubmitted = true;
});
if (progressNoteController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
await widget.patientReferralViewModel.replay(progressNoteController.text.trim(), widget.myReferralInPatientModel);
if (widget.patientReferralViewModel.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(widget.patientReferralViewModel.error);
} else {
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast("Your Replay Added Successfully");
Navigator.of(context).pop();
Navigator.of(context).pop();
}
}else {
Helpers.showErrorToast("You can't add empty replay");
setState(() {
isSubmitted = false;
});
}
}),
replayOnReferralController.text.isEmpty
? SizedBox()
: Container(
margin: EdgeInsets.all(5),
child: Expanded(
child: AppButton(
title: TranslationBase.of(context).clearText,
onPressed: () {
setState(() {
replayOnReferralController.text = '';
});
},
)),
),
Container(
margin: EdgeInsets.all(5),
child: AppButton(
title: 'Submit Replay',
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () async {
setState(() {
isSubmitted = true;
});
if (replayOnReferralController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
await widget.patientReferralViewModel.replay(
replayOnReferralController.text.trim(),
widget.myReferralInPatientModel);
if (widget.patientReferralViewModel.state ==
ViewState.ErrorLocal) {
Helpers.showErrorToast(
widget.patientReferralViewModel.error);
} else {
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(
"Your Replay Added Successfully");
Navigator.of(context).pop();
Navigator.of(context).pop();
}
} else {
Helpers.showErrorToast("You can't add empty replay");
setState(() {
isSubmitted = false;
});
}
})),
],
),
),
@ -179,7 +199,7 @@ class _AddReplayOnReferralPatientState extends State<AddReplayOnReferralPatient>
if (result.finalResult == true) {
setState(() {
SpeechToText.closeAlertDialog(context);
progressNoteController.text = reconizedWord;
replayOnReferralController.text += reconizedWord + '\n';
});
}
}

@ -146,7 +146,7 @@ class _PatientReferralScreen extends State<PatientReferralScreen> with SingleTic
borderWidth: 0),
child: Center(
child: AppText(
'Discharged',
TranslationBase.of(context).discharged,
fontSize: SizeConfig.textMultiplier * 1.8,
color: index == 2 ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,

@ -22,6 +22,7 @@ import 'package:intl/intl.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt;
class PatientMakeInPatientReferralScreen extends StatefulWidget {
@override
_PatientMakeInPatientReferralScreenState createState() =>
@ -104,7 +105,7 @@ class _PatientMakeInPatientReferralScreenState
setState(() {
SpeechToText.closeAlertDialog(context);
speech.stop();
_remarksController.text = reconizedWord;
_remarksController.text += reconizedWord + '\n';
});
} else {
print(result.finalResult);
@ -140,13 +141,17 @@ class _PatientMakeInPatientReferralScreenState
final screenSize = MediaQuery.of(context).size;
return BaseView<PatientReferralViewModel>(
onModelReady: (model) => model.getReferralFrequencyList(),
onModelReady: (model) => model.getReferralFrequencyList(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType, arrivalType,isInpatient: isInpatient,),
patient,
patientType,
arrivalType,
isInpatient: isInpatient,
),
body: SingleChildScrollView(
child: Container(
child: Column(
@ -466,19 +471,21 @@ class _PatientMakeInPatientReferralScreenState
Stack(
children: [
AppTextFieldCustom(
hintText:"Remarks",
hintText: "Remarks",
controller: _remarksController,
inputType: TextInputType.multiline,
minLines: 4,
maxLines: 6,
),
Positioned(
top: 0, //MediaQuery.of(context).size.height * 0,
top:
0, //MediaQuery.of(context).size.height * 0,
right: 15,
child: IconButton(
icon: Icon(
DoctorApp.speechtotext,
color: Colors.black,
size: 35,
),
onPressed: () {
initSpeechState()
@ -493,73 +500,91 @@ class _PatientMakeInPatientReferralScreenState
)
],
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton(
title: TranslationBase.of(context).refer,
fontWeight: FontWeight.w700,
color: Color(0XFF359846),
onPressed: () async{
setState(() {
if (_referTo == null) {
branchError =
TranslationBase.of(context).fieldRequired;
} else {
branchError = null;
}
if (_selectedBranch == null) {
hospitalError =
TranslationBase.of(context).fieldRequired;
} else {
hospitalError = null;
}
if (_selectedClinic == null) {
clinicError =
TranslationBase.of(context).fieldRequired;
} else {
clinicError = null;
}
if (_selectedDoctor == null) {
doctorError =
TranslationBase.of(context).fieldRequired;
} else {
doctorError = null;
}
if (_selectedFrequency == null) {
frequencyError =
TranslationBase.of(context).fieldRequired;
} else {
frequencyError = null;
}
});
if (_selectedFrequency == null ||
_selectedBranch == null ||
_selectedClinic == null ||
_selectedDoctor == null ||
_remarksController.text == null ||
_extController.text == null) return;{
await model.makeInPatientReferral(
patient: patient,
projectID: _selectedBranch['facilityId'],
clinicID: _selectedClinic['ClinicID'],
doctorID: _selectedDoctor['DoctorID'],
frequencyCode: _selectedFrequency['ParameterCode'],
ext: _extController.text,
remarks: _remarksController.text,
priority: _activePriority,
referralDate: appointmentDate
);
if(model.state == ViewState.ErrorLocal)
DrAppToastMsg.showErrorToast(model.error);
else{
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsg);
Navigator.pop(context);
}
Column(
children: [
_remarksController.text.isEmpty
? SizedBox()
: Container(
margin: EdgeInsets.all(5),
child: Expanded(
child: AppButton(
title: TranslationBase.of(context).clearText,
onPressed: () {
setState(() {
_remarksController.text = '';
});
},
))),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton(
title: TranslationBase.of(context).refer,
fontWeight: FontWeight.w700,
color: Color(0XFF359846),
onPressed: () async {
setState(() {
if (_referTo == null) {
branchError =
TranslationBase.of(context).fieldRequired;
} else {
branchError = null;
}
if (_selectedBranch == null) {
hospitalError =
TranslationBase.of(context).fieldRequired;
} else {
hospitalError = null;
}
if (_selectedClinic == null) {
clinicError =
TranslationBase.of(context).fieldRequired;
} else {
clinicError = null;
}
if (_selectedDoctor == null) {
doctorError =
TranslationBase.of(context).fieldRequired;
} else {
doctorError = null;
}
if (_selectedFrequency == null) {
frequencyError =
TranslationBase.of(context).fieldRequired;
} else {
frequencyError = null;
}
});
if (_selectedFrequency == null ||
_selectedBranch == null ||
_selectedClinic == null ||
_selectedDoctor == null ||
_remarksController.text == null ||
_extController.text == null) return;
{
await model.makeInPatientReferral(
patient: patient,
projectID: _selectedBranch['facilityId'],
clinicID: _selectedClinic['ClinicID'],
doctorID: _selectedDoctor['DoctorID'],
frequencyCode:
_selectedFrequency['ParameterCode'],
ext: _extController.text,
remarks: _remarksController.text,
priority: _activePriority,
referralDate: appointmentDate);
if (model.state == ViewState.ErrorLocal)
DrAppToastMsg.showErrorToast(model.error);
else {
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.referralSuccessMsg);
Navigator.pop(context);
}
}
},
),
},
),
)
],
)
],
),

@ -403,7 +403,7 @@ class ReferralPatientDetailScreen extends StatelessWidget {
CrossAxisAlignment.start,
children: [
AppText(
"Dr ${referredPatient.referringDoctorName}",
"${TranslationBase.of(context).dr} ${referredPatient.referringDoctorName}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w800,
fontSize: 1.5 *

@ -103,7 +103,7 @@ class ReferredPatientScreen extends StatelessWidget {
.getReferredPatientItem(index)
.doctorImageURL,
referralDoctorName:
"Dr. ${model.getReferredPatientItem(index).referralDoctorName}",
"${TranslationBase.of(context).dr} ${model.getReferredPatientItem(index).referralDoctorName}",
clinicDescription: model
.getReferredPatientItem(index)
.referralClinicDescription,

@ -407,7 +407,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
CrossAxisAlignment.start,
children: [
AppText(
"Dr ${referredPatient.referralDoctorName}",
"${TranslationBase.of(context).dr} ${referredPatient.referralDoctorName}",
fontFamily: 'Poppins',
fontWeight: FontWeight.w800,
fontSize: 1.5 *
@ -517,7 +517,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
referredPatient
.referredDoctorRemarks.isNotEmpty
? referredPatient.referredDoctorRemarks
: " Not Replied yet",
: TranslationBase.of(context).notRepliedYet,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.6 * SizeConfig.textMultiplier,

@ -33,7 +33,6 @@ class SOAPStepHeader extends StatelessWidget {
child: StepsWidget(
index: currentIndex,
changeCurrentTab: changePageViewIndex,
height: 100,
),
),
SizedBox(

@ -20,23 +20,26 @@ class StepsWidget extends StatelessWidget {
? Stack(
children: [
Container(
height: height == 0 ? 150 : height,
height: height == 0 ? 100 : height,
width: MediaQuery.of(context).size.width * 0.9,
color: Colors.transparent,
),
Positioned(
top: 30
,
child: Center(
child: Container(
width: MediaQuery.of(context).size.width * 0.9,
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
,
child: Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width * 0.9,
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
)),
),
),),
Positioned(
top: 10,
left: 0,
@ -260,17 +263,26 @@ class StepsWidget extends StatelessWidget {
: Stack(
children: [
Container(
height: height == 0 ? 150 : height,
width: MediaQuery.of(context).size.width,
height: height == 0 ? 100 : height,
width: MediaQuery.of(context).size.width * 0.9,
color: Colors.transparent,
),
Positioned(
top: 30
,
child: Center(
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
child: Container(
width: MediaQuery
.of(context)
.size
.width * 0.9,
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
),
),
),
),),
Positioned(
top: 10,
right: 0,
@ -303,7 +315,7 @@ class StepsWidget extends StatelessWidget {
color: Colors.white,
)),
),
SizedBox(height: 5),
SizedBox(height: 3),
Column(
children: [
AppText(

@ -438,7 +438,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
width: MediaQuery.of(context)
.size
.width *
0.550,
0.450,
child: TextFields(
inputFormatters: [
LengthLimitingTextInputFormatter(
@ -513,7 +513,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
width: MediaQuery.of(context)
.size
.width *
0.350,
0.450,
child: InkWell(
onTap:
model.itemMedicineListUnit !=
@ -561,14 +561,13 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: TextField(
decoration:
textFieldSelectorDecoration(
TranslationBase.of(
context)
.unit,
'Select',
model.itemMedicineListUnit
.length ==
1
? model.itemMedicineListUnit[
0][
? units = model
.itemMedicineListUnit[0]
[
'description']
: units !=
null
@ -640,10 +639,16 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
TranslationBase.of(
context)
.route,
route != null
? route[
'description']
: null,
model.itemMedicineListRoute
.length ==
1
? model.itemMedicineListRoute[
0]
['description']
: route != null
? route[
'description']
: null,
true),
enabled: false,
),
@ -725,10 +730,16 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
TranslationBase.of(
context)
.frequency,
frequency != null
? frequency[
'description']
: null,
model.itemMedicineList
.length ==
1
? model.itemMedicineList[
0]
['description']
: frequency != null
? frequency[
'description']
: null,
true),
enabled: false,
),
@ -1138,12 +1149,13 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
formKey.currentState.save();
// Navigator.pop(context);
// openDrugToDrug();
if (route == null ||
frequency == null ||
if (frequency == null ||
strengthController
.text ==
"" ||
doseTime == null ||
duration == null ||
selectedDate == null ||
units == null) {
selectedDate == null) {
DrAppToastMsg.showErrorToast(
TranslationBase.of(
context)
@ -1206,27 +1218,48 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
// // .trim())
// // .toList()
// // .join(' '),
// dose:
// strengthController
// .text,
// doseUnit: units[
// 'parameterCode']
// .toString(),
// patient:
// widget.patient,
// dose: strengthController
// .text,
// doseUnit: model
// .itemMedicineListUnit
// .length ==
// 1
// ? model
// .itemMedicineListUnit[
// 0][
// 'parameterCode']
// .toString()
// : units['parameterCode']
// .toString(),
// patient: widget.patient,
// doseTimeIn:
// doseTime['id']
// .toString(),
// model: widget.model,
// duration:
// duration['id']
// .toString(),
// frequency: frequency[
// 'parameterCode']
// .toString(),
// route: route[
// 'parameterCode']
// duration: duration['id']
// .toString(),
// frequency: model
// .itemMedicineList
// .length ==
// 1
// ? model
// .itemMedicineList[
// 0][
// 'parameterCode']
// .toString()
// : frequency[
// 'parameterCode']
// .toString(),
// route: model.itemMedicineListRoute
// .length ==
// 1
// ? model
// .itemMedicineListRoute[
// 0][
// 'parameterCode']
// .toString()
// : route['parameterCode']
// .toString(),
// drugId:
// _selectedMedication
// .itemId
@ -1240,8 +1273,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
// instruction:
// instructionController
// .text,
// doseTime:
// selectedDate,
// doseTime: selectedDate,
// );
}
}
@ -1350,7 +1382,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
children: [
DrugToDrug(
widget.patient,
getPriscriptionforDrug(widget.prescriptionList),
getPriscriptionforDrug(widget.prescriptionList, model),
model.patientAssessmentList),
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 3),
@ -1382,8 +1414,12 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
doseTimeIn: doseTime['id'].toString(),
model: widget.model,
duration: duration['id'].toString(),
frequency: frequency['parameterCode'].toString(),
route: route['parameterCode'].toString(),
frequency: model.itemMedicineList.length == 1
? model.itemMedicineList[0]['parameterCode']
: frequency['parameterCode'].toString(),
route: model.itemMedicineListRoute.length == 1
? model.itemMedicineListRoute[0]['parameterCode']
: route['parameterCode'].toString(),
drugId: _selectedMedication.itemId.toString(),
strength: strengthController.text,
indication: indicationController.text,
@ -1431,7 +1467,17 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
});
}
getPriscriptionforDrug(List<PrescriptionModel> prescriptionList) {
// selectedValue(itemMdeicationList,key){
// // String selected = "";
// // units[key]=itemMdeicationList.length==1? itemMdeicationList[0][key]:units[key].toString();
// //
// // selected = units[key];
// //
// // return selected;
// // }
getPriscriptionforDrug(
List<PrescriptionModel> prescriptionList, MedicineViewModel model) {
var prescriptionDetails = [];
if (prescriptionList.length > 0) {
prescriptionList[0].entityList.forEach((element) {
@ -1455,11 +1501,19 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
'DrugId': _selectedMedication.mediSpanGPICode,
'DrugName': _selectedMedication.description,
'Dose': strengthController.text,
'DoseType': units['parameterCode'].toString(),
'Unit': units['description'],
'FrequencyType': frequency['parameterCode'].toString(),
'DoseType': model.itemMedicineListUnit.length == 1
? model.itemMedicineListUnit[0]['parameterCode'].toString()
: units['parameterCode'].toString(),
'Unit': model.itemMedicineListUnit.length == 1
? model.itemMedicineListUnit[0]['description']
: units['description'],
'FrequencyType': model.itemMedicineList.length == 1
? model.itemMedicineList[0]['parameterCode']
: frequency['parameterCode'].toString(),
'Duration': duration['id'].toString(),
'RouteID': route['parameterCode'].toString(),
'RouteID': model.itemMedicineListRoute.length == 1
? model.itemMedicineListRoute[0]['parameterCode'].toString()
: route['parameterCode'].toString(),
'IsScreen': true
});
}

@ -1,6 +1,7 @@
import 'package:connectivity/connectivity.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart';
import 'package:doctor_app_flutter/screens/auth/login_screen.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
@ -16,6 +17,7 @@ import '../util/dr_app_toast_msg.dart';
import 'dr_app_shared_pref.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class Helpers {
static int cupertinoPickerIndex = 0;
@ -82,7 +84,6 @@ class Helpers {
style: TextStyle(fontSize: SizeConfig.textMultiplier * 2),
);
}).toList(),
itemExtent: 25,
looping: false,
onSelectedItemChanged: (int index) {
@ -100,6 +101,7 @@ class Helpers {
DrAppToastMsg.showErrorToast(localMsg);
}
static Future<bool> checkConnection() async {
ConnectivityResult connectivityResult =
await (Connectivity().checkConnectivity());
@ -144,8 +146,13 @@ class Helpers {
String lang = await sharedPref.getString(APP_Language);
await clearSharedPref();
sharedPref.setString(APP_Language, lang);
Navigator.pushAndRemoveUntil(AppGlobal.CONTEX, FadePage(page: Loginsreen(),), (r) => false);
ProjectViewModel().isLogin = false;
Navigator.pushAndRemoveUntil(
AppGlobal.CONTEX,
FadePage(
page: Loginsreen(),
),
(r) => false);
}
navigateToUpdatePage(String message, String androidLink, iosLink) {
@ -158,7 +165,7 @@ class Helpers {
iosLink: iosLink,
),
),
(r) => false);
(r) => false);
}
static String parseHtmlString(String htmlString) {

@ -1301,40 +1301,34 @@ class TranslationBase {
String get insurance22 => localizedValues["insurance22"][locale.languageCode];
String get approvals22 => localizedValues["approvals22"][locale.languageCode];
String get severe => localizedValues["severe"][locale.languageCode];
String get graphDetails => localizedValues["graphDetails"][locale.languageCode];
String get graphDetails =>
localizedValues["graphDetails"][locale.languageCode];
String get discharged => localizedValues["discharged"][locale.languageCode];
String get addNewOrderSheet =>
localizedValues["addNewOrderSheet"][locale.languageCode];
String get addNewProgressNote =>
localizedValues["addNewProgressNote"][locale.languageCode];
String get notePending =>
localizedValues["notePending"][locale.languageCode];
String get notePending => localizedValues["notePending"][locale.languageCode];
String get noteCanceled =>
localizedValues["noteCanceled"][locale.languageCode];
String get noteVerified =>
localizedValues["noteVerified"][locale.languageCode];
String get noteVerify =>
localizedValues["noteVerify"][locale.languageCode];
String get noteConfirm =>
localizedValues["noteConfirm"][locale.languageCode];
String get noteAdd =>
localizedValues["noteAdd"][locale.languageCode];
String get noteUpdate =>
localizedValues["noteUpdate"][locale.languageCode];
String get orderSheet =>
localizedValues["orderSheet"][locale.languageCode];
String get order =>
localizedValues["order"][locale.languageCode];
String get sheet =>
localizedValues["sheet"][locale.languageCode];
String get medical =>
localizedValues["medical"][locale.languageCode];
String get report =>
localizedValues["report"][locale.languageCode];
String get discharge =>
localizedValues["discharge"][locale.languageCode];
String get noteVerify => localizedValues["noteVerify"][locale.languageCode];
String get noteConfirm => localizedValues["noteConfirm"][locale.languageCode];
String get noteAdd => localizedValues["noteAdd"][locale.languageCode];
String get noteUpdate => localizedValues["noteUpdate"][locale.languageCode];
String get orderSheet => localizedValues["orderSheet"][locale.languageCode];
String get order => localizedValues["order"][locale.languageCode];
String get sheet => localizedValues["sheet"][locale.languageCode];
String get medical => localizedValues["medical"][locale.languageCode];
String get report => localizedValues["report"][locale.languageCode];
String get discharge => localizedValues["discharge"][locale.languageCode];
String get none => localizedValues["none"][locale.languageCode];
String get notRepliedYet =>
localizedValues["notRepliedYet"][locale.languageCode];
String get clearText => localizedValues["clearText"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -69,15 +69,15 @@ class SMSOTP {
}
return Container(
color: Colors.white,
height: SizeConfig.realScreenHeight * 0.5,
width: SizeConfig.realScreenWidth * 0.8,
height: MediaQuery.of(context).size.height * 0.50,
width: MediaQuery.of(context).size.width * 0.84,
child: Center(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.all(10),
padding: EdgeInsets.all(12),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -249,23 +249,27 @@ class SMSOTP {
)),
),
),
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).validationMessage + ' ',
fontWeight: FontWeight.w600,
fontSize: 14,
),
AppText(
displayTime,
color: Colors.red,
textAlign: TextAlign.start,
fontWeight: FontWeight.bold,
fontSize: 14,
)
])
Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).validationMessage +
' ',
fontWeight: FontWeight.w600,
fontSize: 14,
),
AppText(
displayTime,
color: Colors.red,
textAlign: TextAlign.start,
fontWeight: FontWeight.bold,
fontSize: 14,
)
]),
)
],
))),
);

@ -85,15 +85,14 @@ class PatientProfileButton extends StatelessWidget {
children: [
AppText(
!projectsProvider.isArabic ? this.nameLine1 : nameLine2,
color: Colors.black,
/*Color(0xFFB9382C),*/
color: Color(0xFF2B353E),
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 1.5,
),
AppText(
!projectsProvider.isArabic ? this.nameLine2 : nameLine1,
color: Colors.black,
color: Color(0xFF2B353E),
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 1.5,
@ -112,14 +111,6 @@ class PatientProfileButton extends StatelessWidget {
color: Color(0xffBBBBBB),
width: 1,
)),
/*boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.2),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
),
],*/
),
);
}

@ -303,7 +303,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
"${TranslationBase.of(context).numOfDays}: ",
fontSize: 15,
),
if(isDischargedPatient)
if(isDischargedPatient && patient.dischargeDate!=null)
AppText(
"${DateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}",
fontSize: 15,

@ -573,7 +573,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
version: "0.6.3-nullsafety.1"
json_annotation:
dependency: transitive
description:
@ -615,7 +615,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:
@ -907,7 +907,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:
@ -1098,5 +1098,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