screen fixes
parent
9292b38d5a
commit
fbb029e320
File diff suppressed because it is too large
Load Diff
@ -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,
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -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,
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -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…
Reference in New Issue