screen fixes

dev_v2.8_reverting
Elham Rababh 4 years ago
parent 9292b38d5a
commit fbb029e320

@ -82,8 +82,7 @@ List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList =>
// setState(ViewState.Idle);
}
Future changeClinic(
int clinicId, AuthenticationViewModel authProvider) async {
Future changeClinic(var clinicId, AuthenticationViewModel authProvider) async {
setState(ViewState.BusyLocal);
await getDoctorProfile();
ClinicModel clinicModel = ClinicModel(

@ -73,7 +73,7 @@ class _LoginScreenState extends State<LoginScreen> {
height: 10,
),
Text(
TranslationBase.of(context).welcomeTo,
TranslationBase.of(context).welcomeTo!,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
@ -81,7 +81,7 @@ class _LoginScreenState extends State<LoginScreen> {
),
Text(
TranslationBase.of(context)
.drSulaimanAlHabib,
.drSulaimanAlHabib!,
style: TextStyle(
color: Color(0xFF2B353E),
fontWeight: FontWeight.bold,

@ -150,7 +150,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
children: [
Text(
TranslationBase.of(context)
.lastLoginAt,
.lastLoginAt!,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontFamily: 'Poppins',
@ -170,7 +170,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
text: TextSpan(
text: TranslationBase.of(
context)
.verifyWith +
.verifyWith! +
':',
style: TextStyle(
color:

@ -34,7 +34,7 @@ class _BaseViewState<T extends BaseViewModel> extends State<BaseView<T>> {
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider<T>.value(
value: model,
value: model!,
child: Consumer<T>(builder: widget.builder),
);
}

@ -30,10 +30,10 @@ class _AllDoctorQuestionsState extends State<AllDoctorQuestions> {
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).replay2,
appBarTitle: TranslationBase.of(context).replay2!,
isShowAppBar: false,
body: model.listDoctorWorkingHoursTable.isEmpty
?ErrorMessage(error: TranslationBase.of(context).noItem)// DrAppEmbeddedError(error: TranslationBase.of(context).noItem)
?ErrorMessage(error: TranslationBase.of(context).noItem!)// DrAppEmbeddedError(error: TranslationBase.of(context).noItem)
: Column(
children: [
Expanded(

@ -71,7 +71,7 @@ class _DoctorReplyScreenState extends State<DoctorReplyScreen>
return false;
},
child: AppScaffold(
appBarTitle: TranslationBase.of(context).replay2,
appBarTitle: TranslationBase.of(context).replay2!,
isShowAppBar: false,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -107,7 +107,7 @@ class _DoctorReplyScreenState extends State<DoctorReplyScreen>
screenSize,
_activeTab == 1,
TranslationBase.of(context).all,
TranslationBase.of(context)!.all!,
isLast: true,
context: context
),

@ -191,7 +191,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
isCopyable:false,
),
CustomRow(
label: TranslationBase.of(context).age + " : ",
label: TranslationBase.of(context).age! + " : ",
isCopyable:false,
value:
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth!, context)}",
@ -216,7 +216,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
children: <TextSpan>[
new TextSpan(
text:
TranslationBase.of(context).requestType +
TranslationBase.of(context).requestType! +
": ",
style: TextStyle(
fontSize: SizeConfig

@ -32,10 +32,10 @@ class _NotRepliedDoctorQuestionsState extends State<NotRepliedDoctorQuestions> {
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).replay2,
appBarTitle: TranslationBase.of(context).replay2!,
isShowAppBar: false,
body: model.listDoctorNotRepliedQuestions.isEmpty
? ErrorMessage(error: TranslationBase.of(context).noItem)
? ErrorMessage(error: TranslationBase.of(context).noItem!)
: Column(
children: [
Expanded(

@ -53,7 +53,7 @@ class _PatientArrivalScreen extends State<PatientArrivalScreen> with SingleTicke
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).arrivalpatient,
appBarTitle: TranslationBase.of(context).arrivalpatient ?? "",
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(

@ -95,20 +95,20 @@ class DashboardReferralPatient extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RowCounts(
dashboardItemList[2].summaryoptions[0].kPIParameter,
dashboardItemList[2].summaryoptions[0].value,
dashboardItemList![2].summaryoptions![0].kPIParameter,
dashboardItemList![2].summaryoptions![0].value!,
AppGlobal.appTextColor,
height: height,
),
RowCounts(
dashboardItemList[2].summaryoptions[1].kPIParameter,
dashboardItemList[2].summaryoptions[1].value,
dashboardItemList![2].summaryoptions![1].kPIParameter!,
dashboardItemList![2].summaryoptions![1].value!,
Color(0xFFC8D0DC),
height: height,
),
RowCounts(
dashboardItemList[2].summaryoptions[2].kPIParameter,
dashboardItemList[2].summaryoptions[2].value,
dashboardItemList![2].summaryoptions![2].kPIParameter!,
dashboardItemList![2].summaryoptions![2].value!,
Color(0xFFEC6666),
height: height,
@ -122,20 +122,20 @@ class DashboardReferralPatient extends StatelessWidget {
Expanded(
flex: 3,
child: Stack(children: [
Container(padding: EdgeInsets.all(0), child: GaugeChart(_createReferralData(dashboardItemList))),
Container(padding: EdgeInsets.all(0), child: GaugeChart(_createReferralData(dashboardItemList!))),
Positioned(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
AppText(
model.getPatientCount(dashboardItemList[2]).toString(),
model?.getPatientCount(dashboardItemList![2]).toString(),
fontSize: SizeConfig.textMultiplier * 3.2,
color: AppGlobal.appTextColor,
fontWeight: FontWeight.bold,
)
],
),
top: height * (SizeConfig.isHeightVeryShort ? 0.35 : 0.35),
top: height! * (SizeConfig.isHeightVeryShort ? 0.35 : 0.35),
left: 0,
right: 0)
]),
@ -148,12 +148,12 @@ class DashboardReferralPatient extends StatelessWidget {
static List<charts.Series<GaugeSegment, String>> _createReferralData(List<DashboardModel> dashboardItemList) {
final data = [
new GaugeSegment(dashboardItemList[2].summaryoptions[0].kPIParameter,
getValue(dashboardItemList[1].summaryoptions[0].value), charts.ColorUtil.fromDartColor(AppGlobal.appTextColor)),
new GaugeSegment(dashboardItemList[2].summaryoptions[1].kPIParameter,
getValue(dashboardItemList[1].summaryoptions[1].value), charts.ColorUtil.fromDartColor(Color(0xFFC6CEDA),),),
new GaugeSegment(dashboardItemList[2].summaryoptions[2].kPIParameter,
getValue(dashboardItemList[1].summaryoptions[2].value), charts.ColorUtil.fromDartColor(Color(0xFFEC6666),),),
new GaugeSegment(dashboardItemList![2].summaryoptions![0].kPIParameter!,
getValue(dashboardItemList![1].summaryoptions![0].value), charts.ColorUtil.fromDartColor(AppGlobal.appTextColor)),
new GaugeSegment(dashboardItemList![2].summaryoptions![1].kPIParameter!,
getValue(dashboardItemList![1].summaryoptions![1].value), charts.ColorUtil.fromDartColor(Color(0xFFC6CEDA),),),
new GaugeSegment(dashboardItemList[2].summaryoptions![2].kPIParameter!,
getValue(dashboardItemList![1].summaryoptions![2].value), charts.ColorUtil.fromDartColor(Color(0xFFEC6666),),),
];
return [

@ -104,16 +104,16 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
List<DashboardModel> dashboardItemList) {
final data = [
new GaugeSegment(
dashboardItemList[2].summaryoptions[0].kPIParameter,
getValue(dashboardItemList[1].summaryoptions[0].value),
dashboardItemList![2].summaryoptions![0].kPIParameter!,
getValue(dashboardItemList![1].summaryoptions![0].value!),
charts.MaterialPalette.black),
new GaugeSegment(
dashboardItemList[2].summaryoptions[1].kPIParameter,
getValue(dashboardItemList[1].summaryoptions[1].value),
dashboardItemList[2].summaryoptions![1].kPIParameter!,
getValue(dashboardItemList[1].summaryoptions![1].value),
charts.MaterialPalette.gray.shadeDefault),
new GaugeSegment(
dashboardItemList[2].summaryoptions[2].kPIParameter,
getValue(dashboardItemList[1].summaryoptions[2].value),
dashboardItemList![2].summaryoptions![2].kPIParameter!,
getValue(dashboardItemList[1].summaryoptions![2].value),
charts.MaterialPalette.red.shadeDefault),
];

@ -11,7 +11,7 @@ class HomePageCard extends StatelessWidget {
Key? key,
required this.color,
this.opacity = 0.4,
required this.margin, this.width})
required this.margin, this.width, this.gradient})
: super(key: key);
final bool hasBorder;
final String? imageName;
@ -21,6 +21,8 @@ class HomePageCard extends StatelessWidget {
final double opacity;
final double? width;
final EdgeInsets margin;
final LinearGradient? gradient;
@override
Widget build(BuildContext context) {
return InkWell(

@ -4,10 +4,10 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class HomePatientCard extends StatelessWidget {
final Color backgroundColor;
final Color? backgroundColor;
final IconData cardIcon;
final String? cardIconImage;
final Color backgroundIconColor;
final Color? backgroundIconColor;
final String text;
final Color textColor;
final VoidCallback onTap;
@ -15,7 +15,7 @@ class HomePatientCard extends StatelessWidget {
final LinearGradient gradient;
HomePatientCard({
required this.backgroundColor,
this.backgroundColor,
required this.backgroundIconColor,
required this.cardIcon,
this.cardIconImage,
@ -30,7 +30,7 @@ class HomePatientCard extends StatelessWidget {
double width = SizeConfig.heightMultiplier*
(SizeConfig.isHeightVeryShort ? 16 : SizeConfig.isHeightLarge?15:13);
return HomePageCard(
color: backgroundColor,
color: backgroundColor!,
width: width,
gradient: gradient,
margin: EdgeInsets.all(SizeConfig.widthMultiplier *1.121),
@ -77,7 +77,7 @@ class HomePatientCard extends StatelessWidget {
color: textColor,
)
: Image.asset(
cardIconImage,
cardIconImage!,
height: iconSize,
width: iconSize,
),

@ -78,12 +78,12 @@ class _HomeScreenState extends State<HomeScreen> {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
appBar: HomeScreenHeader(
model: model,
onOpenDrawer: () {
Scaffold.of(context).openDrawer();
},
),
// appBar: HomeScreenHeader(
// model: model,
// onOpenDrawer: () {
// Scaffold.of(context).openDrawer();
// },
// ),
body: ListView(children: [
Column(children: <Widget>[
StickyHeader(
@ -182,7 +182,7 @@ class _HomeScreenState extends State<HomeScreen> {
)),
],
),
AppText(Helpers.convertToTitleCase(item.clinicName),
AppText(Helpers.convertToTitleCase(item.clinicName!),
fontSize: 14,
letterSpacing: -0.96,
color: AppGlobal.appTextColor,
@ -197,7 +197,7 @@ class _HomeScreenState extends State<HomeScreen> {
clinicId = newValue;
GifLoaderDialogUtils.showMyDialog(
context);
await model.changeClinic(newValue,
await model.changeClinic(newValue??0,
authenticationViewModel);
GifLoaderDialogUtils.hideDialog(
context);
@ -212,7 +212,7 @@ class _HomeScreenState extends State<HomeScreen> {
.map((item) {
return DropdownMenuItem(
child: AppText(
Helpers.convertToTitleCase(item.clinicName),
Helpers.convertToTitleCase(item.clinicName??""),
fontSize: 14,
letterSpacing: -0.96,
color: AppGlobal.appTextColor,
@ -339,7 +339,7 @@ class _HomeScreenState extends State<HomeScreen> {
DashboardViewModel model, projectsProvider) {
colorIndex = 0;
List<LinearGradient> backgroundColors = List(3);
List<LinearGradient> backgroundColors = [];
backgroundColors[0] = LinearGradient(
begin: Alignment(-1.0, -2.0),
end: Alignment(1.0, 2.0),
@ -358,11 +358,11 @@ class _HomeScreenState extends State<HomeScreen> {
colors: [
Color(0xFF71787E),AppGlobal.appTextColor
]);
List<Color> backgroundIconColors = List(3);
List<Color> backgroundIconColors = [];
backgroundIconColors[0] = Colors.white12;
backgroundIconColors[1] = Colors.white38;
backgroundIconColors[2] = Colors.white10;
List<Color> textColors = List(3);
List<Color> textColors = [];
textColors[0] = Colors.white;
textColors[1] = Color(0xFF353E47);
textColors[2] = Colors.white;
@ -412,7 +412,7 @@ class _HomeScreenState extends State<HomeScreen> {
backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.inpatient,
textColor: textColors[colorIndex],
text: TranslationBase.of(context).myInPatient,
text: TranslationBase.of(context).myInPatient!,
onTap: () {
Navigator.push(
context,
@ -433,7 +433,7 @@ class _HomeScreenState extends State<HomeScreen> {
//TODO Elham* match the of the icon
cardIcon: DoctorApp.arrival_patients,
textColor: textColors[colorIndex],
text: TranslationBase.of(context).registerNewPatient,
text: TranslationBase.of(context).registerNewPatient!,
onTap: () {
Navigator.push(
context,
@ -450,7 +450,7 @@ class _HomeScreenState extends State<HomeScreen> {
backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.arrival_patients,
textColor: textColors[colorIndex],
text: TranslationBase.of(context).myOutPatient_2lines,
text: TranslationBase.of(context).myOutPatient_2lines!,
onTap: () {
String date = AppDateUtils.convertDateToFormat(
DateTime(
@ -477,7 +477,7 @@ class _HomeScreenState extends State<HomeScreen> {
backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.referral_1,
textColor: textColors[colorIndex],
text: TranslationBase.of(context).myPatientsReferral,
text: TranslationBase.of(context).myPatientsReferral!,
onTap: () {
Navigator.push(
context,
@ -495,7 +495,7 @@ class _HomeScreenState extends State<HomeScreen> {
backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.search,
textColor: textColors[colorIndex],
text: TranslationBase.of(context).searchPatientDashBoard,
text: TranslationBase.of(context).searchPatientDashBoard!,
onTap: () {
Navigator.push(
context,
@ -512,7 +512,7 @@ class _HomeScreenState extends State<HomeScreen> {
backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.search_medicines,
textColor: textColors[colorIndex],
text: TranslationBase.of(context).searchMedicineDashboard,
text: TranslationBase.of(context).searchMedicineDashboard!,
onTap: () {
Navigator.push(
context,

@ -110,27 +110,27 @@ class _LivaCareTransferToAdminState extends State<LivaCareTransferToAdmin> {
onPressed: () {
setState(() {
if (noteController.text.isEmpty) {
noteError = TranslationBase.of(context).emptyMessage;
noteError = TranslationBase.of(context).emptyMessage!;
} else {
noteError = null;
noteError = null!;
}
if (noteController.text.isNotEmpty) {
Helpers.showConfirmationDialog(context,
"${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).transferTo}${TranslationBase.of(context).admin} ?",
() async {
Navigator.of(context).pop();
GifLoaderDialogUtils.showMyDialog(context);
await model.transferToAdmin(widget.patient.vcId, noteController.text);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
DrAppToastMsg.showSuccesToast("You successfully transfer to admin");
Navigator.of(context).pop();
Navigator.of(context).pop();
Navigator.of(context).pop();
}
});
() async {
Navigator.of(context).pop();
GifLoaderDialogUtils.showMyDialog(context);
await model.transferToAdmin(widget.patient.vcId!, noteController.text);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
DrAppToastMsg.showSuccesToast("You successfully transfer to admin");
Navigator.of(context).pop();
Navigator.of(context).pop();
Navigator.of(context).pop();
}
});
}
});
},

@ -85,11 +85,13 @@ class _LiveCarePatientScreenState extends State<LiveCarePatientScreen> {
},
marginTop: 5,
suffixIcon: IconButton(
icon: Icon(
DoctorApp.filter_1,
color: Colors.black,
),
iconSize: 20,
onPressed: () {},
icon: Icon(
DoctorApp.filter_1,
color: Colors.black,
),
iconSize: 20,
),
),
model.state == ViewState.Idle
@ -99,7 +101,7 @@ class _LiveCarePatientScreenState extends State<LiveCarePatientScreen> {
? Center(
child: ErrorMessage(
error: TranslationBase.of(context)
.youDontHaveAnyPatient,
.youDontHaveAnyPatient!,
),
)
: ListView.builder(

@ -45,7 +45,7 @@ class _LiveCarePandingListState extends State<LiveCarePandingListScreen> {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).livecare,
appBarTitle: TranslationBase.of(context).livecare!,
body: Container(
child: ListView(scrollDirection: Axis.vertical,
@ -98,7 +98,7 @@ class _LiveCarePandingListState extends State<LiveCarePandingListScreen> {
Colors.grey[
100]!,
Colors.grey[
200],
200]!,
]),
boxShadow: [
BoxShadow(
@ -154,7 +154,7 @@ class _LiveCarePandingListState extends State<LiveCarePandingListScreen> {
AppText(
TranslationBase.of(
context)
.fileNo +
.fileNo! +
item.patientID
.toString(),
fontSize: 2.0 *
@ -167,7 +167,7 @@ class _LiveCarePandingListState extends State<LiveCarePandingListScreen> {
AppText(
TranslationBase.of(
context)
.age +
.age! +
' ' +
item.age
.toString(),
@ -255,9 +255,9 @@ class _LiveCarePandingListState extends State<LiveCarePandingListScreen> {
MyGlobals myGlobals = new MyGlobals();
class MyGlobals {
GlobalKey _scaffoldKey;
GlobalKey? _scaffoldKey;
MyGlobals() {
_scaffoldKey = GlobalKey();
}
GlobalKey get scaffoldKey => _scaffoldKey;
GlobalKey get scaffoldKey => _scaffoldKey!;
}

@ -238,7 +238,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
child: RaisedButton(
onPressed: () => {endCall()},
child:
Text(TranslationBase.of(context).endcall),
Text(TranslationBase.of(context).endcall!),
color: Colors.red,
textColor: Colors.white,
)),
@ -247,8 +247,8 @@ class _VideoCallPageState extends State<VideoCallPage> {
child: RaisedButton(
onPressed: () => {resumeCall()},
child:
Text(TranslationBase.of(context).resumecall),
color: AppGlobal.appGreenColor,
Text(TranslationBase.of(context).resumecall!),
color: Colors.green[900],
textColor: Colors.white,
),
),
@ -257,7 +257,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
child: RaisedButton(
onPressed: () => {endCallWithCharge()},
child: Text(TranslationBase.of(context)
.endcallwithcharge),
.endcallwithcharge!),
textColor: Colors.white,
),
),
@ -268,7 +268,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
setState(() => {isTransfer = true})
},
child: Text(
TranslationBase.of(context).transfertoadmin),
TranslationBase.of(context).transfertoadmin!),
color: Colors.yellow[900],
),
),

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart';
import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';

File diff suppressed because it is too large Load Diff

@ -89,9 +89,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
});
}
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{IconData icon}) {
InputDecoration textFieldSelectorDecoration(String hintText, String selectedText, bool isDropDown, {IconData? icon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
@ -124,10 +122,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
return AppScaffold(
// baseViewModel: model,
isShowAppBar: true,
appBar: PatientSearchHeader(
title: TranslationBase.of(context).searchMedicine,
),
//appBarTitle: TranslationBase.of(context).searchMedicine + "6",
appBarTitle: TranslationBase.of(context).searchMedicine!,
body: SingleChildScrollView(
child: FractionallySizedBox(
widthFactor: 0.97,
@ -179,12 +174,10 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).youCanFind +
(myController.text != ''
? model.pharmacyItemsList.length.toString()
: '0') +
TranslationBase.of(context).youCanFind! +
(myController.text != '' ? model.pharmacyItemsList.length.toString() : '0') +
" " +
TranslationBase.of(context).itemsInSearch,
TranslationBase.of(context).itemsInSearch!,
fontWeight: FontWeight.bold,
),
],

@ -40,7 +40,7 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
onModelReady: (model) => model.getPharmaciesList(widget.itemID),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).pharmaciesList,
appBarTitle: TranslationBase.of(context).pharmaciesList!,
body: Container(
height: SizeConfig.screenHeight,
child: ListView(

@ -85,7 +85,7 @@ class PatientSickLeaveScreen extends StatelessWidget {
),
),
AddNewOrder(
label: TranslationBase.of(context).noSickLeaveApplied,
label: TranslationBase.of(context).noSickLeaveApplied!,
onTap: () async {
await locator<AnalyticsService>().logEvent(
eventCategory: "Add Sick Leave Screen"
@ -194,7 +194,7 @@ class PatientSickLeaveScreen extends StatelessWidget {
CustomRow(
label: TranslationBase.of(
context)
.startDate +
.startDate! +
' ' ??
"",
labelSize: SizeConfig
@ -218,7 +218,7 @@ class PatientSickLeaveScreen extends StatelessWidget {
CustomRow(
label: TranslationBase.of(
context)
.endDate +
.endDate! +
' ' ??
"",
labelSize: SizeConfig
@ -270,7 +270,7 @@ class PatientSickLeaveScreen extends StatelessWidget {
)
: patient.patientStatusType != 43
? ErrorMessage(
error: TranslationBase.of(context).noSickLeave,
error: TranslationBase.of(context).noSickLeave!,
)
: SizedBox(),
SizedBox(

@ -13,7 +13,7 @@ class NoData extends StatelessWidget {
child: SingleChildScrollView(
child: Container(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable)),
error: TranslationBase.of(context).noDataAvailable!)),
),
);
}

@ -141,13 +141,13 @@ class _InPatientScreenState extends State<InPatientScreen>
// unselectedLabelColor: Colors.grey[800],
tabs: [
tabWidget(screenSize, _activeTab == 0,
TranslationBase.of(context).inPatientAll,context: context,
TranslationBase.of(context).inPatientAll!,context: context,
counter: model.inPatientList.length, isFirst: true),
tabWidget(screenSize, _activeTab == 1,
TranslationBase.of(context).myInPatientTitle,
TranslationBase.of(context).myInPatientTitle!,
counter: model.myIinPatientList.length, isMiddle: true, context: context,),
tabWidget(screenSize, _activeTab == 2,
TranslationBase.of(context).discharged, isLast:true, context: context,),
TranslationBase.of(context).discharged!, isLast:true, context: context,),
],
),
),
@ -200,7 +200,7 @@ class _InPatientScreenState extends State<InPatientScreen>
{int counter = -1,
bool isFirst = false,
bool isMiddle = false,
bool isLast = false,BuildContext context}) {
bool isLast = false,required BuildContext context}) {
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context);

@ -69,7 +69,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
TranslationBase.of(context).fromDate!,
widget.patientSearchViewModel.selectedFromDate != null
? "${AppDateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedFromDate.toString(), "yyyy-MM-dd")}"
: null,
: "",
true,
suffixIcon: Icon(
Icons.calendar_today,
@ -94,7 +94,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
TranslationBase.of(context).toDate!,
widget.patientSearchViewModel.selectedToDate != null
? "${AppDateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedToDate.toString(), "yyyy-MM-dd")}"
: null,
: "",
true,
suffixIcon: Icon(
Icons.calendar_today,
@ -145,18 +145,18 @@ class _FilterDatePageState extends State<FilterDatePage> {
"Please Select All The date Fields ");
} else {
Duration difference = widget
.patientSearchViewModel.selectedToDate
.patientSearchViewModel.selectedToDate!
.difference(widget
.patientSearchViewModel.selectedFromDate);
.patientSearchViewModel!.selectedFromDate!);
if (difference.inDays > 90) {
Helpers.showErrorToast(
"The difference between from date and end date must be less than 3 months");
} else {
String dateTo = AppDateUtils.convertDateToFormat(
widget.patientSearchViewModel.selectedToDate,
widget.patientSearchViewModel.selectedToDate!,
'yyyy-MM-dd');
String dateFrom = AppDateUtils.convertDateToFormat(
widget.patientSearchViewModel.selectedFromDate,
widget.patientSearchViewModel.selectedFromDate!,
'yyyy-MM-dd');
PatientSearchRequestModel currentModel =
@ -240,9 +240,8 @@ class _FilterDatePageState extends State<FilterDatePage> {
}
}
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {
InputDecoration textFieldSelectorDecoration(String? hintText, String? selectedText, bool isDropDown,
{Icon? suffixIcon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),

@ -35,13 +35,13 @@ class OutPatientsScreen extends StatefulWidget {
final isAppbar;
final arrivalType;
final isView;
final PatientType selectedPatientType;
final PatientSearchRequestModel patientSearchRequestModel;
final PatientType? selectedPatientType;
final PatientSearchRequestModel? patientSearchRequestModel;
final bool isSearchWithKeyInfo;
final bool isSearch;
final bool isInpatient;
final bool isSearchAndOut;
final String searchKey;
final String? searchKey;
OutPatientsScreen(
{this.patientSearchForm,
@ -62,21 +62,21 @@ class OutPatientsScreen extends StatefulWidget {
}
class _OutPatientsScreenState extends State<OutPatientsScreen> {
int clinicId;
AuthenticationViewModel authenticationViewModel;
late int clinicId;
late AuthenticationViewModel authenticationViewModel;
List<String> _times = [];
int _activeLocation = 1;
String patientType;
String patientTypeTitle;
String? patientType;
late String patientTypeTitle;
var selectedFilter = 1;
String arrivalType;
ProjectViewModel projectsProvider;
late String arrivalType;
late ProjectViewModel projectsProvider;
var isView;
final _controller = TextEditingController();
PatientModel patient;
late PatientModel patient;
OutPatientFilterType outPatientFilterType = OutPatientFilterType.Today;
bool isSortDes = true;
@ -85,15 +85,15 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context);
_times = [
TranslationBase.of(context).previous,
TranslationBase.of(context).today,
TranslationBase.of(context).nextWeek,
TranslationBase.of(context).previous!,
TranslationBase.of(context).today!,
TranslationBase.of(context).nextWeek!,
];
final screenSize = MediaQuery.of(context).size;
return BaseView<PatientSearchViewModel>(
onModelReady: (model) async {
await model.getOutPatient(widget.patientSearchRequestModel);
await model.getOutPatient(widget.patientSearchRequestModel!);
},
builder: (_, model, w) => AppScaffold(
appBarTitle: "Search Patient",
@ -223,8 +223,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
child: model.filterData.isEmpty
? Center(
child: ErrorMessage(
error: TranslationBase.of(context)
.youDontHaveAnyPatient,
error: TranslationBase.of(context).youDontHaveAnyPatient ?? "",
),
)
: ListView.builder(
@ -243,8 +242,8 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
horizontal: 8, vertical: 0),
child: PatientCard(
patientInfo: model.filterData[index],
patientType: patientType,
arrivalType: arrivalType,
patientType: "1",
arrivalType: "1",
isFromSearch: widget.isSearchAndOut,
isInpatient: widget.isInpatient,
onTap: () {
@ -255,9 +254,9 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
"patient": model.filterData[index],
"patientType": "1",
"from": widget
.patientSearchRequestModel.from,
.patientSearchRequestModel!.from,
"to": widget
.patientSearchRequestModel.from,
.patientSearchRequestModel!.from!,
"isSearch": false,
"isInpatient": false,
"arrivalType": "7",

@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
class PatientSearchHeader extends StatelessWidget with PreferredSizeWidget {
final String title;
const PatientSearchHeader({Key key, this.title}) : super(key: key);
const PatientSearchHeader({Key? key, required this.title}) : super(key: key);
@override
Widget build(BuildContext context) {

@ -31,12 +31,12 @@ class PatientsSearchResultScreen extends StatefulWidget {
final String searchKey;
PatientsSearchResultScreen(
{this.selectedPatientType,
this.patientSearchRequestModel,
{required this.selectedPatientType,
required this.patientSearchRequestModel,
this.isSearchWithKeyInfo = true,
this.isSearch = false,
this.isInpatient = false,
this.searchKey,
required this.searchKey,
this.isSearchAndOut = false});
@override
@ -44,20 +44,19 @@ class PatientsSearchResultScreen extends StatefulWidget {
_PatientsSearchResultScreenState();
}
class _PatientsSearchResultScreenState
extends State<PatientsSearchResultScreen> {
int clinicId;
AuthenticationViewModel authenticationViewModel;
class _PatientsSearchResultScreenState extends State<PatientsSearchResultScreen> {
late int clinicId;
late AuthenticationViewModel authenticationViewModel;
String patientType;
String patientTypeTitle;
String? patientType;
String? patientTypeTitle;
var selectedFilter = 1;
String arrivalType;
ProjectViewModel projectsProvider;
String? arrivalType;
late ProjectViewModel projectsProvider;
var isView;
final _controller = TextEditingController();
PatientModel patient;
late PatientModel patient;
@override
Widget build(BuildContext context) {
@ -89,14 +88,15 @@ class _PatientsSearchResultScreenState
},
marginTop: 5,
suffixIcon: IconButton(
icon: Icon(
DoctorApp.filter_1,
color: Colors.black,
),
iconSize: 20,
// padding: EdgeInsets.only(bottom: 30),
),
),
icon: Icon(
DoctorApp.filter_1,
color: Colors.black,
),
iconSize: 20,
// padding: EdgeInsets.only(bottom: 30),
onPressed: () {},
),
),
SizedBox(
height: 10.0,
),
@ -105,8 +105,7 @@ class _PatientsSearchResultScreenState
child: model.filterData.isEmpty
? Center(
child: ErrorMessage(
error: TranslationBase.of(context)
.youDontHaveAnyPatient,
error: TranslationBase.of(context).youDontHaveAnyPatient ?? "",
),
)
: ListView.builder(
@ -118,8 +117,8 @@ class _PatientsSearchResultScreenState
padding: EdgeInsets.all(8.0),
child: PatientCard(
patientInfo: model.filterData[index],
patientType: patientType,
arrivalType: arrivalType,
patientType: patientType ?? "",
arrivalType: arrivalType ?? "",
isFromSearch: widget.isSearchAndOut,
isInpatient: widget.isInpatient,
onTap: () {

@ -30,7 +30,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
TextEditingController middleNameInfoController = TextEditingController();
TextEditingController lastNameFileInfoController = TextEditingController();
PatientType selectedPatientType = PatientType.inPatient;
AuthenticationViewModel authenticationViewModel;
late AuthenticationViewModel authenticationViewModel;
@override
Widget build(BuildContext context) {
@ -45,8 +45,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
child: Center(
child: Column(
children: [
BottomSheetTitle(
title: TranslationBase.of(context).searchPatient),
BottomSheetTitle(title: TranslationBase.of(context).searchPatient!),
FractionallySizedBox(
// widthFactor: 0.9,
child: Container(

@ -16,7 +16,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class AdmissionOrdersScreen extends StatefulWidget {
const AdmissionOrdersScreen({Key key}) : super(key: key);
const AdmissionOrdersScreen({Key? key}) : super(key: key);
@override
_AdmissionOrdersScreenState createState() => _AdmissionOrdersScreenState();
@ -25,23 +25,23 @@ class AdmissionOrdersScreen extends StatefulWidget {
class _AdmissionOrdersScreenState extends State<AdmissionOrdersScreen> {
bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel;
late AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String arrivalType = routeArgs['arrivalType'];
if (routeArgs.containsKey('isDischargedPatient'))
isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<PendingOrdersViewModel>(
onModelReady: (model) => model.getAdmissionOrders(
admissionNo: int.parse(patient.admissionNo),
patientId: patient.patientMRN),
admissionNo: int.parse(patient!.admissionNo!),
patientId: patient!.patientMRN!),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
@ -53,11 +53,8 @@ class _AdmissionOrdersScreenState extends State<AdmissionOrdersScreen> {
isShowAppBar: true,
body: model.admissionOrderList == null ||
model.admissionOrderList.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
),
)
? DrAppEmbeddedError(
error: TranslationBase.of(context).noDataAvailable!)
: Container(
color: Colors.grey[200],
child: Column(

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-view
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -41,16 +42,16 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScree
bool _isSickLeaveRequired = false;
bool _patientPregnant = false;
String clinicError;
String doctorError;
String sickLeaveCommentError;
String dietTypeError;
String medicalHistoryError;
String surgicalHistoryError;
String? clinicError;
String? doctorError;
String? sickLeaveCommentError;
String? dietTypeError;
String? medicalHistoryError;
String? surgicalHistoryError;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
@ -61,8 +62,8 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScree
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: PatientProfileAppBar(patient),
appBarTitle: TranslationBase.of(context).admissionRequest,
patientProfileAppBarModel: PatientProfileAppBarModel(patient:patient),
appBarTitle: TranslationBase.of(context)!.admissionRequest!,
body: GestureDetector(
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
@ -217,7 +218,7 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScree
activeColor: HexColor("#D02127"),
onChanged: (newValue) {
setState(() {
_patientPregnant = newValue;
_patientPregnant = newValue!;
});
},
controlAffinity: ListTileControlAffinity.leading,
@ -234,7 +235,7 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScree
activeColor: HexColor("#D02127"),
onChanged: (newValue) {
setState(() {
_isSickLeaveRequired = newValue;
_isSickLeaveRequired = newValue!;
});
},
controlAffinity: ListTileControlAffinity.leading,
@ -339,7 +340,7 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScree
_sickLeaveCommentsController.text != "" &&
_postMedicalHistoryController.text != "" &&
_postSurgicalHistoryController.text != "") {
model.admissionRequestData.patientMRN = patient.patientMRN;
model.admissionRequestData.patientMRN = patient.patientMRN!;
model.admissionRequestData.appointmentNo = patient.appointmentNo;
model.admissionRequestData.episodeID = patient.episodeNo;
model.admissionRequestData.admissionRequestNo = 0;

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-view
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -33,13 +34,13 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestThirdScree
dynamic _selectedIcd;
dynamic _selectedDiagnosisType;
String diagnosisError;
String icdError;
String diagnosisTypeError;
String? diagnosisError;
String? icdError;
String? diagnosisTypeError;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
@ -52,8 +53,9 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestThirdScree
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: PatientProfileAppBar(patient),
appBarTitle: TranslationBase.of(context).admissionRequest,
patientProfileAppBarModel: PatientProfileAppBarModel(patient:patient),
appBarTitle: TranslationBase.of(context).admissionRequest!,
body: GestureDetector(
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
@ -154,7 +156,7 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestThirdScree
: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model
.getICDCodes(patient.patientMRN)
.getICDCodes(patient!.patientMRN!)
.then((_) => GifLoaderDialogUtils.hideDialog(context));
if (model.state == ViewState.Idle && model.icdCodes.length > 0) {
openListDialogField('description', 'code', model.icdCodes, (selectedValue) {

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-view
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
@ -40,28 +41,28 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
final _complicationsController = TextEditingController();
final _otherProceduresController = TextEditingController();
DateTime _expectedAdmissionDate;
DateTime? _expectedAdmissionDate;
dynamic _selectedFloor;
dynamic _selectedWard;
dynamic _selectedRoomCategory;
dynamic _selectedAdmissionType;
String costError;
String plansError;
String otherInterventionsError;
String expectedDaysError;
String expectedDatesError;
String floorError;
String roomError;
String treatmentsError;
String complicationsError;
String proceduresError;
String admissionTypeError;
String? costError;
String? plansError;
String? otherInterventionsError;
String? expectedDaysError;
String? expectedDatesError;
String? floorError;
String? roomError;
String? treatmentsError;
String? complicationsError;
String? proceduresError;
String? admissionTypeError;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
@ -74,8 +75,8 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: PatientProfileAppBar(patient),
appBarTitle: TranslationBase.of(context).admissionRequest,
patientProfileAppBarModel: PatientProfileAppBarModel(patient:patient),
appBarTitle: TranslationBase.of(context).admissionRequest!,
body: GestureDetector(
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
@ -187,15 +188,16 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
isTextFieldHasSuffix: true,
validationError: expectedDatesError,
suffixIcon: IconButton(
onPressed: () {},
icon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
Icons.calendar_today,
color: Colors.black,
)),
onClick: () {
if (_expectedAdmissionDate == null) {
_expectedAdmissionDate = DateTime.now();
}
_selectDate(context, _expectedAdmissionDate, (picked) {
_selectDate(context, _expectedAdmissionDate!, (picked) {
setState(() {
_expectedAdmissionDate = picked;
});
@ -431,7 +433,7 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
_postPlansEstimatedCostController.text;
model.admissionRequestData.expectedDays = int.parse(_expectedDaysController.text);
model.admissionRequestData.admissionDate = _expectedAdmissionDate.toIso8601String();
model.admissionRequestData.admissionDate = _expectedAdmissionDate!.toIso8601String();
model.admissionRequestData.otherDepartmentInterventions =
_otherDepartmentsInterventionsController.text;
model.admissionRequestData.admissionLocationID = _selectedFloor['floorID'];
@ -536,7 +538,7 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
}
Future _selectDate(BuildContext context, DateTime dateTime, Function(DateTime picked) updateDate) async {
final DateTime picked = await showDatePicker(
final DateTime? picked = await showDatePicker(
context: context,
initialDate: dateTime,
firstDate: DateTime.now(),

@ -27,7 +27,7 @@ import 'diabetic_details_blood_pressurewideget.dart';
class DiabeticChart extends StatefulWidget {
DiabeticChart({
Key key,
Key? key,
}) : super(key: key);
@override
@ -46,18 +46,19 @@ class _DiabeticChartState extends State<DiabeticChart> {
DiabeticType(nameAr: "Blood Glucose(Glucometer)", nameEn: "Blood Glucose(Glucometer)", value: 4)
];
DiabeticType selectedDiabeticType;
late DiabeticType selectedDiabeticType;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
ProjectViewModel projectsProvider = Provider.of(context);
return BaseView<PatientViewModel>(
onModelReady: (model) async {
selectedDiabeticType = diabeticType[2];
await model.getDiabeticChartValues(patient, selectedDiabeticType.value, isLocalBusy: false);
await model.getDiabeticChartValues(patient, selectedDiabeticType.value!,
isLocalBusy: false);
generateData(model);
},
builder: (_, model, w) => AppScaffold(
@ -164,7 +165,7 @@ class _DiabeticChartState extends State<DiabeticChart> {
color: Colors.white,
borderRadius: BorderRadius.circular(12)),
child: LineChartForDiabetic(
title: selectedDiabeticType.nameEn,
title: selectedDiabeticType.nameEn!,
isOX: false,
timeSeries1: timeSeriesData1,
// timeSeries2: timeSeriesData2,
@ -201,7 +202,7 @@ class _DiabeticChartState extends State<DiabeticChart> {
],
),
)
: Center(child: ErrorMessage(error: TranslationBase.of(context).noItem)),
: ErrorMessage(error: TranslationBase.of(context).noItem!),
],
),
)),
@ -213,21 +214,21 @@ class _DiabeticChartState extends State<DiabeticChart> {
model.diabeticChartValuesList.toList().forEach(
(element) {
DateTime elementDate =
AppDateUtils.getDateTimeFromServerFormat(element.dateChart);
if (element.resultValue.toInt() != 0)
AppDateUtils.getDateTimeFromServerFormat(element.dateChart!);
if (element.resultValue!.toInt() != 0)
timeSeriesData1.add(
TimeSeriesSales2(
new DateTime(
elementDate.year, elementDate.month, elementDate.day),
element.resultValue.toDouble(),
element.resultValue!.toDouble(),
),
);
if (element.resultValue.toInt() != 0)
if (element.resultValue!.toInt() != 0)
timeSeriesData2.add(
TimeSeriesSales2(
new DateTime(
elementDate.year, elementDate.month, elementDate.day),
element.resultValue.toDouble(),
element.resultValue!.toDouble(),
),
);
},
@ -243,8 +244,9 @@ class _DiabeticChartState extends State<DiabeticChart> {
timeSeriesData2.clear();
});
await model.getDiabeticChartValues(patient, selectedDiabeticType.value,isLocalBusy:true);
if(model.state == ViewState.ErrorLocal){
await model.getDiabeticChartValues(patient, selectedDiabeticType.value!,
isLocalBusy: true);
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
generateData(model);

@ -12,8 +12,10 @@ import 'package:provider/provider.dart';
class DiabeticDetails extends StatefulWidget {
final List<GetDiabeticChartValuesResponseModel> diabeticDetailsList;
DiabeticDetails(
{Key key, this.diabeticDetailsList,});
DiabeticDetails({
Key? key,
required this.diabeticDetailsList,
});
@override
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
@ -70,7 +72,8 @@ class _VitalSignDetailsWidgetState extends State<DiabeticDetails> {
),
Table(
border: TableBorder(
horizontalInside: BorderSide(width: 1.0, color: Colors.grey[300]),
horizontalInside:
BorderSide(width: 1.0, color: Colors.grey[300]!),
),
children: fullData(projectViewModel),
),
@ -85,7 +88,7 @@ class _VitalSignDetailsWidgetState extends State<DiabeticDetails> {
widget.diabeticDetailsList.forEach((diabetic) {
var data = diabetic.resultValue;
DateTime elementDate =
AppDateUtils.getDateTimeFromServerFormat(diabetic.dateChart);
AppDateUtils.getDateTimeFromServerFormat(diabetic.dateChart!);
if (data != 0)
tableRow.add(TableRow(children: [
Container(

@ -33,7 +33,7 @@ import 'package:provider/provider.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class DiagnosisScreen extends StatefulWidget {
const DiagnosisScreen({Key ? key}) : super(key: key);
const DiagnosisScreen({Key? key}) : super(key: key);
@override
_ProgressNoteState createState() => _ProgressNoteState();
@ -41,20 +41,20 @@ class DiagnosisScreen extends StatefulWidget {
class _ProgressNoteState extends State<DiagnosisScreen> {
bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel;
late AuthenticationViewModel authenticationViewModel;
late ProjectViewModel projectViewModel;
getDiagnosisForInPatient(BuildContext context, PatientViewModel model,
{bool isLocalBusy = false}) async {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
print(type);
GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel =
GetDiagnosisForInPatientRequestModel(
admissionNo: int.parse(patient.admissionNo),
patientTypeID: patient.patientType,
admissionNo: int.parse(patient!.admissionNo!),
patientTypeID: patient!.patientType!,
patientID: patient.patientId,
setupID: "010266");
model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel);
@ -64,7 +64,7 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
if (routeArgs.containsKey('isDischargedPatient'))
isDischargedPatient = routeArgs['isDischargedPatient'];
@ -82,7 +82,7 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
model.diagnosisForInPatientList.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
error: TranslationBase.of(context)!.noDataAvailable!,
),
)
: Container(

@ -10,10 +10,9 @@ import 'package:flutter/material.dart';
import 'discharge_Summary_widget.dart';
class AllDischargeSummary extends StatefulWidget {
final Function changeCurrentTab;
final PatiantInformtion patient;
const AllDischargeSummary({this.changeCurrentTab, this.patient});
const AllDischargeSummary({ required this.patient});
@override
_AllDischargeSummaryState createState() => _AllDischargeSummaryState();
@ -27,7 +26,7 @@ class _AllDischargeSummaryState extends State<AllDischargeSummary> {
onModelReady: (model) {
model.getAllDischargeSummary(
patientId: widget.patient.patientId,
admissionNo: int.parse(widget.patient.admissionNo),
admissionNo: int.parse(widget.patient.admissionNo!),
);
},
builder: (_, model, w) => AppScaffold(
@ -37,7 +36,7 @@ class _AllDischargeSummaryState extends State<AllDischargeSummary> {
model.allDisChargeSummaryList.isEmpty
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable),
error: TranslationBase.of(context).noDataAvailable!),
)
: Column(
children: [

@ -24,17 +24,17 @@ class LabsHomePage extends StatefulWidget {
}
class _LabsHomePageState extends State<LabsHomePage> {
String patientType;
late String patientType;
String arrivalType;
PatiantInformtion patient;
bool isInpatient;
bool isFromLiveCare;
late String arrivalType;
late PatiantInformtion patient;
late bool isInpatient;
late bool isFromLiveCare;
@override
void didChangeDependencies() {
super.didChangeDependencies();
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
final routeArgs = ModalRoute.of(context)!.settings.arguments as Map;
patient = routeArgs['patient'];
patientType = routeArgs['patientType'];
arrivalType = routeArgs['arrivalType'];
@ -70,8 +70,8 @@ class _LabsHomePageState extends State<LabsHomePage> {
if (model.patientLabOrdersList.isNotEmpty &&
patient.patientStatusType != 43)
ServiceTitle(
title: TranslationBase.of(context).lab,
subTitle: TranslationBase.of(context).result,
title: TranslationBase.of(context).lab!,
subTitle: TranslationBase.of(context).result!,
),
if (patient.patientStatusType != null &&
patient.patientStatusType == 43)
@ -111,7 +111,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
),
);
},
label: TranslationBase.of(context).applyForNewLabOrder,
label: TranslationBase.of(context).applyForNewLabOrder!,
),
...List.generate(
model.patientLabOrdersList.length,
@ -136,10 +136,10 @@ class _LabsHomePageState extends State<LabsHomePage> {
width: 20,
decoration: BoxDecoration(
color: model.patientLabOrdersList[index]
.isLiveCareAppointment
.isLiveCareAppointment!
? Colors.red[900]
: !model.patientLabOrdersList[index]
.isInOutPatient
.isInOutPatient!
? Colors.black
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
@ -161,17 +161,17 @@ class _LabsHomePageState extends State<LabsHomePage> {
child: Center(
child: Text(
model.patientLabOrdersList[index]
.isLiveCareAppointment
.isLiveCareAppointment!
? TranslationBase.of(context)
.liveCare
.liveCare!
.toUpperCase()
: !model.patientLabOrdersList[index]
.isInOutPatient
.isInOutPatient!
? TranslationBase.of(context)
.inPatientLabel
.inPatientLabel!
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.outpatient!
.toUpperCase(),
style: TextStyle(color: Colors.white),
),
@ -198,17 +198,17 @@ class _LabsHomePageState extends State<LabsHomePage> {
),
),
doctorName:
model.patientLabOrdersList[index].doctorName,
model.patientLabOrdersList[index].doctorName!,
invoiceNO:
' ${model.patientLabOrdersList[index].invoiceNo}',
profileUrl: model
.patientLabOrdersList[index].doctorImageURL,
.patientLabOrdersList[index].doctorImageURL!,
branch:
model.patientLabOrdersList[index].projectName,
model.patientLabOrdersList[index].projectName!,
clinic: model
.patientLabOrdersList[index].clinicDescription,
.patientLabOrdersList[index].clinicDescription!,
appointmentDate:
model.patientLabOrdersList[index].orderDate,
model.patientLabOrdersList[index].orderDate!,
orderNo: model.patientLabOrdersList[index].orderNo,
isShowTime: false,
),

@ -298,23 +298,9 @@ class Helpers {
return htmlRegex.hasMatch(text);
}
static getNameFromKPI(String kpi) {
if (kpi.indexOf("(") > -1)
return kpi.substring(0, kpi.indexOf("("));
else
return kpi;
}
static getLabelFromKPI(String kpi) {
if (kpi.indexOf("(") > -1 && kpi.indexOf(")") > -1)
return kpi.substring(kpi.indexOf("(") + 1, kpi.indexOf(")"));
else
return '';
}
static String timeFrom({Duration? duration}) {
static String timeFrom({required Duration duration}) {
String twoDigits(int n) => n.toString().padLeft(2, "0");
String twoDigitMinutes = twoDigits(duration!.inMinutes.remainder(60));
String twoDigitMinutes = twoDigits(duration.inMinutes.remainder(60));
String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60));
return "$twoDigitMinutes:$twoDigitSeconds";
}
@ -327,4 +313,138 @@ class Helpers {
? 8
: 6);
}
static getLabelFromKPI(String kpi) {
if (kpi.indexOf("(") > -1 && kpi.indexOf(")") > -1)
return kpi.substring(kpi.indexOf("(") + 1, kpi.indexOf(")"));
else
return '';
}
static getNameFromKPI(String kpi) {
if (kpi.indexOf("(") > -1)
return kpi.substring(0, kpi.indexOf("("));
else
return kpi;
}
static getBoxTabsBoxDecoration(
{bool isFirst = false,
bool isMiddle = false,
bool isLast = false,
bool isActive = false,
double radius = 6.0, required ProjectViewModel projectViewModel}) {
return BoxDecoration(
color: isActive ? AppGlobal.appRedColor : Color(0xFFEAEAEA),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic?Radius.circular(isActive
? isLast || isMiddle
? radius
: 0
: 0):Radius.circular(isActive
? isFirst || isMiddle
? radius
: 0
: 0),
topLeft: projectViewModel.isArabic? Radius.circular(isActive
? isFirst || isMiddle
? radius
: 0
: 0):Radius.circular(isActive
? isLast || isMiddle
? radius
: 0
: 0),
bottomRight: projectViewModel.isArabic? Radius.circular(isActive
? isLast || isMiddle
? radius
: 0
: 0): Radius.circular(isActive
? isFirst || isMiddle
? radius
: 0
: 0),
bottomLeft:projectViewModel.isArabic? Radius.circular(isActive
? isFirst || isMiddle
? radius
: 0
: 0): Radius.circular(isActive
? isLast || isMiddle
? radius
: 0
: 0)),
);
}
static getBgTabColor() {
return Color(0xFFEAEAEA);
}
static getTabText({
required String title,
bool isActive = false,
}) {
return AppText(
title,
fontSize: SizeConfig.textMultiplier * 1.8,
color: isActive ? Colors.white : AppGlobal.appTextColor,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
);
}
static getTabHeight(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return screenSize.height * 0.07;
}
static getTabCounter({bool isActive: false, int? counter}) {
return Container(
margin: EdgeInsets.all(4),
width: 15,
height: 15,
decoration: BoxDecoration(
color: isActive ? Colors.white : AppGlobal.appRedColor,
shape: BoxShape.circle,
),
child: Center(
child: FittedBox(
child: AppText(
"$counter",
fontSize: SizeConfig.textMultiplier * 1.5,
color: !isActive ? Colors.white : AppGlobal.appRedColor,
fontWeight: FontWeight.w700,
),
),
),
);
}
static String convertToTitleCase(String text) {
if (text.length <= 1) {
return text.toUpperCase();
}
// Split string into multiple words
final List<String> words = text.split(' ');
// Capitalize first letter of each words
final capitalizedWords = words.map((word) {
if (word.trim().isNotEmpty) {
final String firstLetter = word.trim().substring(0, 1).toUpperCase();
final String remainingLetters = word.trim().substring(1).toLowerCase();
return '$firstLetter$remainingLetters';
}
return '';
});
// Join/Merge all words back to one String
return capitalizedWords.join(' ');
}
}

@ -126,7 +126,7 @@ class SMSOTP {
padding: EdgeInsets.only(top: 5, right: 5),
child: AppText(
TranslationBase.of(context)
.verificationMessage +
.verificationMessage! +
' XXXXXX' +
mobileNo.toString().substring(
mobileNo.toString().length - 3),
@ -311,7 +311,7 @@ class SMSOTP {
children: [
AppText(
TranslationBase.of(context)
.validationMessage +
.validationMessage! +
' ',
textAlign: TextAlign.start,
fontWeight: FontWeight.w700,

@ -51,7 +51,7 @@ class _VerificationMethodsListState extends State<VerificationMethodsList> {
onTap: () => {widget.authenticateUser!(AuthMethodTypes.SMS, true)},
label:TranslationBase
.of(context)
.verifyWith+ TranslationBase.of(context)!.verifySMS,
.verifyWith!+ TranslationBase.of(context)!.verifySMS!,
);
break;
case AuthMethodTypes.Fingerprint:
@ -64,7 +64,7 @@ class _VerificationMethodsListState extends State<VerificationMethodsList> {
},
label: TranslationBase
.of(context)
.verifyWith+TranslationBase.of(context).verifyFingerprint,
.verifyWith!+TranslationBase.of(context).verifyFingerprint!,
);
break;
case AuthMethodTypes.FaceID:
@ -77,7 +77,7 @@ class _VerificationMethodsListState extends State<VerificationMethodsList> {
},
label: TranslationBase
.of(context)
.verifyWith+TranslationBase.of(context).verifyFaceID,
.verifyWith!+TranslationBase.of(context).verifyFaceID!,
);
break;

@ -1,43 +0,0 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:flutter/material.dart';
class AppBarChart extends StatelessWidget {
const AppBarChart({
Key ? key,
@required this.seriesList,
}) : super(key: key);
final List<charts.Series> seriesList;
@override
Widget build(BuildContext context) {
return Container(
height: 400,
margin: EdgeInsets.only(top: 60),
child: charts.BarChart(
seriesList,
// animate: animate,
/// Customize the primary measure axis using a small tick renderer.
/// Use String instead of num for ordinal domain axis
/// (typically bar charts).
primaryMeasureAxis: new charts.NumericAxisSpec(
renderSpec: new charts.GridlineRendererSpec(
// Display the measure axis labels below the gridline.
//
// 'Before' & 'after' follow the axis value direction.
// Vertical axes draw 'before' below & 'after' above the tick.
// Horizontal axes draw 'before' left & 'after' right the tick.
labelAnchor: charts.TickLabelAnchor.before,
// Left justify the text in the axis.
//
// Note: outside means that the secondary measure axis would right
// justify.
labelJustification:
charts.TickLabelJustification.outside,
)),
),
);
}
}

@ -26,7 +26,7 @@ class DashboardItemTexts extends StatefulWidget {
}
class _DashboardItemTextsState extends State<DashboardItemTexts> {
ProjectViewModel projectsProvider;
late ProjectViewModel projectsProvider;
@override
Widget build(BuildContext context) {
projectsProvider = Provider.of(context);

@ -15,10 +15,10 @@ class GetOutPatientStack extends StatelessWidget {
double barHeight =
SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 20 : SizeConfig.isHeightLarge?20:17);
value.summaryoptions.sort((Summaryoptions a, Summaryoptions b) => b.value - a.value);
value.summaryoptions.sort((Summaryoptions a, Summaryoptions b) => b.value! - a.value!);
value.summaryoptions
.sort((Summaryoptions a, Summaryoptions b) => b.value - a.value);
.sort((Summaryoptions a, Summaryoptions b) => b.value! - a.value!);
var list = <Widget>[];
value.summaryoptions.forEach((result) =>

@ -1,99 +0,0 @@
// ignore: must_be_immutable
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class ClinicList extends StatelessWidget {
ProjectViewModel projectsProvider;
final int clinicId;
final Function (int value) onClinicChange;
ClinicList({Key ? key, this.clinicId, this.onClinicChange}) : super(key: key);
@override
Widget build(BuildContext context) {
// authProvider = Provider.of(context);
projectsProvider = Provider.of(context);
return Container(
child:
projectsProvider
.doctorClinicsList.length >
0
? FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
Container(
width: MediaQuery.of(context).size.width *0.8,
child: Center(
child: DropdownButtonHideUnderline(
child: DropdownButton(
dropdownColor:
Colors.white,
iconEnabledColor:
Colors.black,
isExpanded: true,
value: clinicId == null
? projectsProvider
.doctorClinicsList[
0]
.clinicID
: clinicId,
iconSize: 25,
elevation: 16,
selectedItemBuilder:
(BuildContext
context) {
return projectsProvider
.doctorClinicsList
.map((item) {
return Row(
mainAxisSize:
MainAxisSize
.max,
children: <Widget>[
AppText(
item.clinicName,
fontSize: SizeConfig
.textMultiplier *
2.1,
color: Colors
.black,
),
],
);
}).toList();
},
onChanged: (newValue){
onClinicChange(newValue);
},
items: projectsProvider
.doctorClinicsList
.map((item) {
return DropdownMenuItem(
child: Text(
item.clinicName,
textAlign:
TextAlign.end,
),
value: item.clinicID,
);
}).toList(),
)),
),
),
],
),
)
: AppText(
TranslationBase
.of(context)
.noClinic),
);
}
}

@ -1,163 +0,0 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/custom_validation_error.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
class DynamicElements extends StatefulWidget {
final PatientModel _patientSearchFormValues;
final bool isFormSubmitted;
DynamicElements(this._patientSearchFormValues, this.isFormSubmitted);
@override
_DynamicElementsState createState() => _DynamicElementsState();
}
class _DynamicElementsState extends State<DynamicElements> {
TextEditingController _toDateController = new TextEditingController();
TextEditingController _fromDateController = new TextEditingController();
void _presentDatePicker(id) {
showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime(2019),
lastDate: DateTime.now(),
).then((pickedDate) {
if (pickedDate == null) {
return;
}
setState(() {
print(id);
var selectedDate = DateFormat.yMd().format(pickedDate);
if (id == '_selectedFromDate') {
// _fromDateController.text = selectedDate;
selectedDate = pickedDate.year.toString() +
"-" +
pickedDate.month.toString().padLeft(2, '0') +
"-" +
pickedDate.day.toString().padLeft(2, '0');
_fromDateController.text = selectedDate;
} else {
selectedDate = pickedDate.year.toString() +
"-" +
pickedDate.month.toString().padLeft(2, '0') +
"-" +
pickedDate.day.toString().padLeft(2, '0');
_toDateController.text = selectedDate;
// _toDateController.text = selectedDate;
}
});
});
}
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
InputDecoration textFieldSelectorDecoration(
{String hintText,
String selectedText,
bool isDropDown,
IconData icon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null,
hintStyle: TextStyle(
fontSize: 14,
color: Colors.grey.shade600,
),
);
}
return LayoutBuilder(
builder: (ctx, constraints) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
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(
borderColor: Colors.white,
onTap: () => _presentDatePicker('_selectedFromDate'),
hintText: TranslationBase.of(context).fromDate,
controller: _fromDateController,
inputFormatter: ONLY_DATE,
onSaved: (value) {
if (_fromDateController.text.toString().trim().isEmpty) {
widget._patientSearchFormValues.From = "0";
} else {
widget._patientSearchFormValues.From =
_fromDateController.text.replaceAll("/", "-");
}
},
readOnly: true,
)),
SizedBox(
height: 5,
),
if (widget._patientSearchFormValues.From == "0" &&
widget.isFormSubmitted)
CustomValidationError(),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
border: Border.all(width: 1.0, color: HexColor("#CCCCCC")),
borderRadius: BorderRadius.all(Radius.circular(6.0))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
readOnly: true,
borderColor: Colors.white,
hintText: TranslationBase.of(context).toDate,
controller: _toDateController,
onTap: () {
_presentDatePicker('_selectedToDate');
},
inputFormatter: ONLY_DATE,
onSaved: (value) {
if (_toDateController.text.toString().trim().isEmpty) {
widget._patientSearchFormValues.To = "0";
} else {
widget._patientSearchFormValues.To =
_toDateController.text.replaceAll("/", "-");
}
},
)),
if (widget._patientSearchFormValues.To == "0" &&
widget.isFormSubmitted)
CustomValidationError(),
SizedBox(
height: 10,
),
],
);
},
);
}
}

@ -51,6 +51,7 @@ class PatientCard extends StatelessWidget {
? patientInfo.nationalityId
: "";
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
width: SizeConfig.screenWidth * 0.9,
margin: EdgeInsets.all(6),

@ -6,7 +6,7 @@ class ServiceTitle extends StatefulWidget {
final String title;
final String subTitle;
const ServiceTitle({Key ? key, this.title, this.subTitle}) : super(key: key);
const ServiceTitle({Key ? key, required this.title, required this.subTitle}) : super(key: key);
@override
_ServiceTitleState createState() => _ServiceTitleState();

@ -1,45 +0,0 @@
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/material.dart';
import './profile_general_info_content_widget.dart';
import '../../../config/size_config.dart';
import '../../shared/rounded_container_widget.dart';
/*
*@author: Elham Rababah
*@Date:21/4/2020
*@param:
*@return: ProfileGeneralInfoWidget
*@desc: Profile General Info Widget class
*/
class ProfileGeneralInfoWidget extends StatelessWidget {
ProfileGeneralInfoWidget({Key ? key, this.patient}) : super(key: key);
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
// PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
// patient = patientsProv.getSelectedPatient();
return RoundedContainer(
child: ListView(
children: <Widget>[
ProfileGeneralInfoContentWidget(
title: "Age",
info: '${patient.age}',
),
ProfileGeneralInfoContentWidget(
title: "Contact Number",
info: '${patient.mobileNumber}',
),
ProfileGeneralInfoContentWidget(
title: "Email",
info: '${patient.emailAddress}',
),
],
),
width: SizeConfig.screenWidth * 0.70,
height: SizeConfig.screenHeight * 0.25,
);
}
}

@ -31,7 +31,7 @@ class LargeAvatar extends StatelessWidget {
borderRadius:BorderRadius.circular(50),
child: Image.network(
url,
url!,
fit: BoxFit.fill,
width: 700,
),

@ -326,7 +326,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
}
convertDateFormat2(String str) {
String newDate;
late String newDate;
const start = "/Date(";
if (str.isNotEmpty) {
const end = "+0300)";

@ -1,45 +0,0 @@
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart';
/*
*@author: Elham Rababah
*@Date:22/4/2020
*@param: title, info
*@return:ProfileGeneralInfoContentWidget
*@desc: Profile General Info Content Widget
*/
class ProfileGeneralInfoContentWidget extends StatelessWidget {
String title;
String info;
ProfileGeneralInfoContentWidget({this.title, this.info});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
AppText(
title,
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.w700,
color: HexColor('#58434F'),
),
AppText(
info,
color: HexColor('#707070'),
fontSize: SizeConfig.textMultiplier * 2,
)
],
),
);
}
}

@ -1,176 +0,0 @@
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ProfileMedicalInfoWidgetInPatient extends StatelessWidget {
final String from;
final String to;
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
final bool isInpatient;
final bool isDischargedPatient;
ProfileMedicalInfoWidgetInPatient(
{Key ? key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to,
this.isInpatient,
this.isDischargedPatient = false});
@override
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {},
builder: (_, model, w) => GridView.count(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1 / 1.0,
crossAxisCount: 3,
children: [
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
isInPatient: true,
icon: 'assets/images/svgs/profile_screen/vital signs.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
isInPatient: true,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/lab results.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInPatient: isInpatient,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).result,
icon: 'assets/images/svgs/profile_screen/health summary.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).prescription,
icon: 'assets/images/svgs/profile_screen/order prescription.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'assets/images/svgs/profile_screen/Progress notes.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_NOTE,
isDischargedPatient: isDischargedPatient,
nameLine1: "Order", //"Text",
nameLine2: "Sheet", //TranslationBase.of(context).orders,
icon: 'assets/images/svgs/profile_screen/Progress notes.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'assets/images/svgs/profile_screen/Order Procedures.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: HEALTH_SUMMARY,
nameLine1: "Health",
//TranslationBase.of(context).medicalReport,
nameLine2: "Summary",
//TranslationBase.of(context).summaryReport,
icon: 'assets/images/svgs/profile_screen/health summary.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: HEALTH_SUMMARY,
nameLine1: "Medical", //Health
//TranslationBase.of(context).medicalReport,
nameLine2: "Report", //Report
//TranslationBase.of(context).summaryReport,
icon: 'assets/images/svgs/profile_screen/health summary.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_IN_PATIENT_TO_DOCTOR,
isInPatient: true,
nameLine1: TranslationBase.of(context).referral,
nameLine2: TranslationBase.of(context).patient,
icon: 'patient/refer_patient.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).approvals,
icon: 'assets/images/svgs/profile_screen/insurance approval.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isDisable: true,
route: null,
nameLine1: "Discharge",
nameLine2: "Summery",
icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'),
],
),
);
}
}
Loading…
Cancel
Save