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); // setState(ViewState.Idle);
} }
Future changeClinic( Future changeClinic(var clinicId, AuthenticationViewModel authProvider) async {
int clinicId, AuthenticationViewModel authProvider) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await getDoctorProfile(); await getDoctorProfile();
ClinicModel clinicModel = ClinicModel( ClinicModel clinicModel = ClinicModel(

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

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

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

@ -30,10 +30,10 @@ class _AllDoctorQuestionsState extends State<AllDoctorQuestions> {
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).replay2, appBarTitle: TranslationBase.of(context).replay2!,
isShowAppBar: false, isShowAppBar: false,
body: model.listDoctorWorkingHoursTable.isEmpty 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( : Column(
children: [ children: [
Expanded( Expanded(

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

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

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

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

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

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

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

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

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

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

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

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

@ -238,7 +238,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
child: RaisedButton( child: RaisedButton(
onPressed: () => {endCall()}, onPressed: () => {endCall()},
child: child:
Text(TranslationBase.of(context).endcall), Text(TranslationBase.of(context).endcall!),
color: Colors.red, color: Colors.red,
textColor: Colors.white, textColor: Colors.white,
)), )),
@ -247,8 +247,8 @@ class _VideoCallPageState extends State<VideoCallPage> {
child: RaisedButton( child: RaisedButton(
onPressed: () => {resumeCall()}, onPressed: () => {resumeCall()},
child: child:
Text(TranslationBase.of(context).resumecall), Text(TranslationBase.of(context).resumecall!),
color: AppGlobal.appGreenColor, color: Colors.green[900],
textColor: Colors.white, textColor: Colors.white,
), ),
), ),
@ -257,7 +257,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
child: RaisedButton( child: RaisedButton(
onPressed: () => {endCallWithCharge()}, onPressed: () => {endCallWithCharge()},
child: Text(TranslationBase.of(context) child: Text(TranslationBase.of(context)
.endcallwithcharge), .endcallwithcharge!),
textColor: Colors.white, textColor: Colors.white,
), ),
), ),
@ -268,7 +268,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
setState(() => {isTransfer = true}) setState(() => {isTransfer = true})
}, },
child: Text( child: Text(
TranslationBase.of(context).transfertoadmin), TranslationBase.of(context).transfertoadmin!),
color: Colors.yellow[900], 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/core/viewModel/medical_file_view_model.dart';
import 'package:doctor_app_flutter/locator.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/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/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart';
import 'package:doctor_app_flutter/util/date-utils.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( InputDecoration textFieldSelectorDecoration(String hintText, String selectedText, bool isDropDown, {IconData? icon}) {
String hintText, String selectedText, bool isDropDown,
{IconData icon}) {
return InputDecoration( return InputDecoration(
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
@ -124,10 +122,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
return AppScaffold( return AppScaffold(
// baseViewModel: model, // baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientSearchHeader( appBarTitle: TranslationBase.of(context).searchMedicine!,
title: TranslationBase.of(context).searchMedicine,
),
//appBarTitle: TranslationBase.of(context).searchMedicine + "6",
body: SingleChildScrollView( body: SingleChildScrollView(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.97, widthFactor: 0.97,
@ -179,12 +174,10 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context).youCanFind + TranslationBase.of(context).youCanFind! +
(myController.text != '' (myController.text != '' ? model.pharmacyItemsList.length.toString() : '0') +
? model.pharmacyItemsList.length.toString()
: '0') +
" " + " " +
TranslationBase.of(context).itemsInSearch, TranslationBase.of(context).itemsInSearch!,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
], ],

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

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

@ -13,7 +13,7 @@ class NoData extends StatelessWidget {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
child: ErrorMessage( 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], // unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
tabWidget(screenSize, _activeTab == 0, tabWidget(screenSize, _activeTab == 0,
TranslationBase.of(context).inPatientAll,context: context, TranslationBase.of(context).inPatientAll!,context: context,
counter: model.inPatientList.length, isFirst: true), counter: model.inPatientList.length, isFirst: true),
tabWidget(screenSize, _activeTab == 1, tabWidget(screenSize, _activeTab == 1,
TranslationBase.of(context).myInPatientTitle, TranslationBase.of(context).myInPatientTitle!,
counter: model.myIinPatientList.length, isMiddle: true, context: context,), counter: model.myIinPatientList.length, isMiddle: true, context: context,),
tabWidget(screenSize, _activeTab == 2, 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, {int counter = -1,
bool isFirst = false, bool isFirst = false,
bool isMiddle = false, bool isMiddle = false,
bool isLast = false,BuildContext context}) { bool isLast = false,required BuildContext context}) {
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context); ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context);

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

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

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

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

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

@ -16,7 +16,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class AdmissionOrdersScreen extends StatefulWidget { class AdmissionOrdersScreen extends StatefulWidget {
const AdmissionOrdersScreen({Key key}) : super(key: key); const AdmissionOrdersScreen({Key? key}) : super(key: key);
@override @override
_AdmissionOrdersScreenState createState() => _AdmissionOrdersScreenState(); _AdmissionOrdersScreenState createState() => _AdmissionOrdersScreenState();
@ -25,23 +25,23 @@ class AdmissionOrdersScreen extends StatefulWidget {
class _AdmissionOrdersScreenState extends State<AdmissionOrdersScreen> { class _AdmissionOrdersScreenState extends State<AdmissionOrdersScreen> {
bool isDischargedPatient = false; bool isDischargedPatient = false;
AuthenticationViewModel authenticationViewModel; late AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
authenticationViewModel = Provider.of(context); authenticationViewModel = Provider.of(context);
projectViewModel = 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']; PatiantInformtion patient = routeArgs['patient'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
if (routeArgs.containsKey('isDischargedPatient')) if (routeArgs.containsKey('isDischargedPatient'))
isDischargedPatient = routeArgs['isDischargedPatient']; isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<PendingOrdersViewModel>( return BaseView<PendingOrdersViewModel>(
onModelReady: (model) => model.getAdmissionOrders( onModelReady: (model) => model.getAdmissionOrders(
admissionNo: int.parse(patient.admissionNo), admissionNo: int.parse(patient!.admissionNo!),
patientId: patient.patientMRN), patientId: patient!.patientMRN!),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
@ -53,11 +53,8 @@ class _AdmissionOrdersScreenState extends State<AdmissionOrdersScreen> {
isShowAppBar: true, isShowAppBar: true,
body: model.admissionOrderList == null || body: model.admissionOrderList == null ||
model.admissionOrderList.length == 0 model.admissionOrderList.length == 0
? Center( ? DrAppEmbeddedError(
child: ErrorMessage( error: TranslationBase.of(context).noDataAvailable!)
error: TranslationBase.of(context).noDataAvailable,
),
)
: Container( : Container(
color: Colors.grey[200], color: Colors.grey[200],
child: Column( 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/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/locator.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/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/base/base_view.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -41,16 +42,16 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScree
bool _isSickLeaveRequired = false; bool _isSickLeaveRequired = false;
bool _patientPregnant = false; bool _patientPregnant = false;
String clinicError; String? clinicError;
String doctorError; String? doctorError;
String sickLeaveCommentError; String? sickLeaveCommentError;
String dietTypeError; String? dietTypeError;
String medicalHistoryError; String? medicalHistoryError;
String surgicalHistoryError; String? surgicalHistoryError;
@override @override
Widget build(BuildContext context) { 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']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
@ -61,8 +62,8 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScree
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar(patient), patientProfileAppBarModel: PatientProfileAppBarModel(patient:patient),
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context)!.admissionRequest!,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
@ -217,7 +218,7 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScree
activeColor: HexColor("#D02127"), activeColor: HexColor("#D02127"),
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
_patientPregnant = newValue; _patientPregnant = newValue!;
}); });
}, },
controlAffinity: ListTileControlAffinity.leading, controlAffinity: ListTileControlAffinity.leading,
@ -234,7 +235,7 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScree
activeColor: HexColor("#D02127"), activeColor: HexColor("#D02127"),
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
_isSickLeaveRequired = newValue; _isSickLeaveRequired = newValue!;
}); });
}, },
controlAffinity: ListTileControlAffinity.leading, controlAffinity: ListTileControlAffinity.leading,
@ -339,7 +340,7 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScree
_sickLeaveCommentsController.text != "" && _sickLeaveCommentsController.text != "" &&
_postMedicalHistoryController.text != "" && _postMedicalHistoryController.text != "" &&
_postSurgicalHistoryController.text != "") { _postSurgicalHistoryController.text != "") {
model.admissionRequestData.patientMRN = patient.patientMRN; model.admissionRequestData.patientMRN = patient.patientMRN!;
model.admissionRequestData.appointmentNo = patient.appointmentNo; model.admissionRequestData.appointmentNo = patient.appointmentNo;
model.admissionRequestData.episodeID = patient.episodeNo; model.admissionRequestData.episodeID = patient.episodeNo;
model.admissionRequestData.admissionRequestNo = 0; 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/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/locator.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/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/base/base_view.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -33,13 +34,13 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestThirdScree
dynamic _selectedIcd; dynamic _selectedIcd;
dynamic _selectedDiagnosisType; dynamic _selectedDiagnosisType;
String diagnosisError; String? diagnosisError;
String icdError; String? icdError;
String diagnosisTypeError; String? diagnosisTypeError;
@override @override
Widget build(BuildContext context) { 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']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
@ -52,8 +53,9 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestThirdScree
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar(patient), patientProfileAppBarModel: PatientProfileAppBarModel(patient:patient),
appBarTitle: TranslationBase.of(context).admissionRequest,
appBarTitle: TranslationBase.of(context).admissionRequest!,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
@ -154,7 +156,7 @@ class _AdmissionRequestThirdScreenState extends State<AdmissionRequestThirdScree
: () async { : () async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model await model
.getICDCodes(patient.patientMRN) .getICDCodes(patient!.patientMRN!)
.then((_) => GifLoaderDialogUtils.hideDialog(context)); .then((_) => GifLoaderDialogUtils.hideDialog(context));
if (model.state == ViewState.Idle && model.icdCodes.length > 0) { if (model.state == ViewState.Idle && model.icdCodes.length > 0) {
openListDialogField('description', 'code', model.icdCodes, (selectedValue) { 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/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/locator.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/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/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.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 _complicationsController = TextEditingController();
final _otherProceduresController = TextEditingController(); final _otherProceduresController = TextEditingController();
DateTime _expectedAdmissionDate; DateTime? _expectedAdmissionDate;
dynamic _selectedFloor; dynamic _selectedFloor;
dynamic _selectedWard; dynamic _selectedWard;
dynamic _selectedRoomCategory; dynamic _selectedRoomCategory;
dynamic _selectedAdmissionType; dynamic _selectedAdmissionType;
String costError; String? costError;
String plansError; String? plansError;
String otherInterventionsError; String? otherInterventionsError;
String expectedDaysError; String? expectedDaysError;
String expectedDatesError; String? expectedDatesError;
String floorError; String? floorError;
String roomError; String? roomError;
String treatmentsError; String? treatmentsError;
String complicationsError; String? complicationsError;
String proceduresError; String? proceduresError;
String admissionTypeError; String? admissionTypeError;
@override @override
Widget build(BuildContext context) { 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']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
@ -74,8 +75,8 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar(patient), patientProfileAppBarModel: PatientProfileAppBarModel(patient:patient),
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest!,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
@ -187,15 +188,16 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: expectedDatesError, validationError: expectedDatesError,
suffixIcon: IconButton( suffixIcon: IconButton(
onPressed: () {},
icon: Icon( icon: Icon(
Icons.calendar_today, Icons.calendar_today,
color: Colors.black, color: Colors.black,
)), )),
onClick: () { onClick: () {
if (_expectedAdmissionDate == null) { if (_expectedAdmissionDate == null) {
_expectedAdmissionDate = DateTime.now(); _expectedAdmissionDate = DateTime.now();
} }
_selectDate(context, _expectedAdmissionDate, (picked) { _selectDate(context, _expectedAdmissionDate!, (picked) {
setState(() { setState(() {
_expectedAdmissionDate = picked; _expectedAdmissionDate = picked;
}); });
@ -431,7 +433,7 @@ class _AdmissionRequestSecondScreenState extends State<AdmissionRequestSecondScr
_postPlansEstimatedCostController.text; _postPlansEstimatedCostController.text;
model.admissionRequestData.expectedDays = int.parse(_expectedDaysController.text); model.admissionRequestData.expectedDays = int.parse(_expectedDaysController.text);
model.admissionRequestData.admissionDate = _expectedAdmissionDate.toIso8601String(); model.admissionRequestData.admissionDate = _expectedAdmissionDate!.toIso8601String();
model.admissionRequestData.otherDepartmentInterventions = model.admissionRequestData.otherDepartmentInterventions =
_otherDepartmentsInterventionsController.text; _otherDepartmentsInterventionsController.text;
model.admissionRequestData.admissionLocationID = _selectedFloor['floorID']; 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 { Future _selectDate(BuildContext context, DateTime dateTime, Function(DateTime picked) updateDate) async {
final DateTime picked = await showDatePicker( final DateTime? picked = await showDatePicker(
context: context, context: context,
initialDate: dateTime, initialDate: dateTime,
firstDate: DateTime.now(), firstDate: DateTime.now(),

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

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

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

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

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

@ -298,23 +298,9 @@ class Helpers {
return htmlRegex.hasMatch(text); return htmlRegex.hasMatch(text);
} }
static getNameFromKPI(String kpi) { static String timeFrom({required Duration duration}) {
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}) {
String twoDigits(int n) => n.toString().padLeft(2, "0"); 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)); String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60));
return "$twoDigitMinutes:$twoDigitSeconds"; return "$twoDigitMinutes:$twoDigitSeconds";
} }
@ -327,4 +313,138 @@ class Helpers {
? 8 ? 8
: 6); : 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), padding: EdgeInsets.only(top: 5, right: 5),
child: AppText( child: AppText(
TranslationBase.of(context) TranslationBase.of(context)
.verificationMessage + .verificationMessage! +
' XXXXXX' + ' XXXXXX' +
mobileNo.toString().substring( mobileNo.toString().substring(
mobileNo.toString().length - 3), mobileNo.toString().length - 3),
@ -311,7 +311,7 @@ class SMSOTP {
children: [ children: [
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.validationMessage + .validationMessage! +
' ', ' ',
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,

@ -51,7 +51,7 @@ class _VerificationMethodsListState extends State<VerificationMethodsList> {
onTap: () => {widget.authenticateUser!(AuthMethodTypes.SMS, true)}, onTap: () => {widget.authenticateUser!(AuthMethodTypes.SMS, true)},
label:TranslationBase label:TranslationBase
.of(context) .of(context)
.verifyWith+ TranslationBase.of(context)!.verifySMS, .verifyWith!+ TranslationBase.of(context)!.verifySMS!,
); );
break; break;
case AuthMethodTypes.Fingerprint: case AuthMethodTypes.Fingerprint:
@ -64,7 +64,7 @@ class _VerificationMethodsListState extends State<VerificationMethodsList> {
}, },
label: TranslationBase label: TranslationBase
.of(context) .of(context)
.verifyWith+TranslationBase.of(context).verifyFingerprint, .verifyWith!+TranslationBase.of(context).verifyFingerprint!,
); );
break; break;
case AuthMethodTypes.FaceID: case AuthMethodTypes.FaceID:
@ -77,7 +77,7 @@ class _VerificationMethodsListState extends State<VerificationMethodsList> {
}, },
label: TranslationBase label: TranslationBase
.of(context) .of(context)
.verifyWith+TranslationBase.of(context).verifyFaceID, .verifyWith!+TranslationBase.of(context).verifyFaceID!,
); );
break; 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> { class _DashboardItemTextsState extends State<DashboardItemTexts> {
ProjectViewModel projectsProvider; late ProjectViewModel projectsProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectsProvider = Provider.of(context); projectsProvider = Provider.of(context);

@ -15,10 +15,10 @@ class GetOutPatientStack extends StatelessWidget {
double barHeight = double barHeight =
SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 20 : SizeConfig.isHeightLarge?20:17); 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 value.summaryoptions
.sort((Summaryoptions a, Summaryoptions b) => b.value - a.value); .sort((Summaryoptions a, Summaryoptions b) => b.value! - a.value!);
var list = <Widget>[]; var list = <Widget>[];
value.summaryoptions.forEach((result) => 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 ? patientInfo.nationalityId
: ""; : "";
ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
width: SizeConfig.screenWidth * 0.9, width: SizeConfig.screenWidth * 0.9,
margin: EdgeInsets.all(6), margin: EdgeInsets.all(6),

@ -6,7 +6,7 @@ class ServiceTitle extends StatefulWidget {
final String title; final String title;
final String subTitle; 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 @override
_ServiceTitleState createState() => _ServiceTitleState(); _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), borderRadius:BorderRadius.circular(50),
child: Image.network( child: Image.network(
url, url!,
fit: BoxFit.fill, fit: BoxFit.fill,
width: 700, width: 700,
), ),

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