merge-requests/70/head
unknown 6 years ago
commit 39bf009678

@ -0,0 +1,7 @@
const Map<String, Map<String, String>> localizedValues = {
'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'},
'settings': {'en': 'Settings', 'ar': 'الاعدادات'},
'language': {'en': 'App Language', 'ar': 'لغة التطبيق'},
'lanEnglish': {'en': 'English', 'ar': 'English'},
'lanArabic': {'en': 'العربية', 'ar': 'العربية'}
};

@ -1,3 +1,4 @@
final TOKEN = 'token'; final TOKEN = 'token';
final PROJECT_ID="projectID"; final PROJECT_ID="projectID";
final SLECTED_PATIENT_TYPE="slectedPatientType"; final SLECTED_PATIENT_TYPE="slectedPatientType";
final APP_Language = "language";

@ -1,25 +0,0 @@
// GENERATED FILE, do not edit!
import 'package:i18n/i18n.dart' as i18n;
String get _languageCode => 'en';
String get _localeName => 'en';
String _plural(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.plural(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
String _ordinal(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.ordinal(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
String _cardinal(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.cardinal(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
class Ar {
const Ar();
ButtonAr get button => ButtonAr(this);
}
class ButtonAr {
final Ar _parent;
const ButtonAr(this._parent);
String get save => "حفظ";
String get load => "تحميل";
}

@ -1,3 +0,0 @@
button:
save: حفظ
load: تحميل

@ -1,25 +0,0 @@
// GENERATED FILE, do not edit!
import 'package:i18n/i18n.dart' as i18n;
String get _languageCode => 'en';
String get _localeName => 'en';
String _plural(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.plural(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
String _ordinal(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.ordinal(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
String _cardinal(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.cardinal(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
class En {
const En();
ButtonEn get button => ButtonEn(this);
}
class ButtonEn {
final En _parent;
const ButtonEn(this._parent);
String get save => "Save";
String get load => "Load";
}

@ -1,4 +0,0 @@
button:
save: Save
load: Load

@ -25,6 +25,7 @@ class HttpInterceptor extends InterceptorContract {
Future<RequestData> interceptRequest({RequestData data}) async { Future<RequestData> interceptRequest({RequestData data}) async {
print('RequestData ${data.body}'); print('RequestData ${data.body}');
print('RequestData ${data.url}');
try { try {
data.headers["Content-Type"] = "application/json"; data.headers["Content-Type"] = "application/json";
data.headers["Accept"] = "application/json"; data.headers["Accept"] = "application/json";

@ -1,11 +1,14 @@
import 'package:doctor_app_flutter/providers/project_provider.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import './config/size_config.dart'; import './config/size_config.dart';
import './providers/auth_provider.dart'; import './providers/auth_provider.dart';
import './providers/patients_provider.dart'; import './providers/patients_provider.dart';
import './providers/projects_provider.dart'; import './providers/hospital_provider.dart';
import './routes.dart'; import './routes.dart';
void main() => runApp(MyApp()); void main() => runApp(MyApp());
@ -22,11 +25,23 @@ class MyApp extends StatelessWidget {
providers: [ providers: [
ChangeNotifierProvider<PatientsProvider>(create: (context) => PatientsProvider()), ChangeNotifierProvider<PatientsProvider>(create: (context) => PatientsProvider()),
ChangeNotifierProvider<AuthProvider>(create: (context) => AuthProvider()), ChangeNotifierProvider<AuthProvider>(create: (context) => AuthProvider()),
ChangeNotifierProvider<ProjectsProvider>(create: (context) => ProjectsProvider()), ChangeNotifierProvider<HospitalProvider>(create: (context) => HospitalProvider()),
ChangeNotifierProvider<ProjectProvider>(create: (context) => ProjectProvider(),)
], ],
child: MaterialApp( child: Consumer<ProjectProvider>(
builder: (context,projectProvider,child) => MaterialApp(
showSemanticsDebugger: false, showSemanticsDebugger: false,
title: 'Flutter Demo', title: 'Flutter Demo',
locale: projectProvider.appLocal,
localizationsDelegates: [
TranslationBaseDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: [
const Locale('ar', ''), // Arabic
const Locale('en', ''), // English
],
theme: ThemeData( theme: ThemeData(
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
primaryColor: Hexcolor('#B8382C'), primaryColor: Hexcolor('#B8382C'),
@ -36,6 +51,7 @@ class MyApp extends StatelessWidget {
initialRoute: INIT_ROUTE, initialRoute: INIT_ROUTE,
routes: routes, routes: routes,
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
)
), ),
); );
}); });

@ -1,3 +1,11 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:LabOrdersReqModel
*@desc: LabOrdersReqModel class
*/
class LabOrdersReqModel { class LabOrdersReqModel {
int patientID; int patientID;
int patientTypeID; int patientTypeID;

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:LabOrdersResModel
*@desc: LabOrdersResModel class
*/
class LabOrdersResModel { class LabOrdersResModel {
String setupID; String setupID;
int projectID; int projectID;

@ -50,6 +50,7 @@ class PatiantInformtion {
String age; String age;
String genderDescription; String genderDescription;
String nursingStationName; String nursingStationName;
String appointmentDate;
PatiantInformtion({ PatiantInformtion({
this.list, this.list,
@ -85,6 +86,8 @@ class PatiantInformtion {
this.age, this.age,
this.genderDescription, this.genderDescription,
this.nursingStationName, this.nursingStationName,
this.appointmentDate,
}); });
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion( factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion(
@ -120,6 +123,7 @@ class PatiantInformtion {
age: json["Age"], age: json["Age"],
genderDescription: json["GenderDescription"], genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"], nursingStationName: json["NursingStationName"],
appointmentDate: json["AppointmentDate"],
); );

@ -1,8 +1,18 @@
/*
*@author:Modified by amjad add getter and setter Amjad Amireh
*@Date:11/5/2020
*@param:
*@return:PatientsScreen Search textbox filter
*@desc:
*/
class PatientModel { class PatientModel {
int ProjectID; int ProjectID;
int ClinicID; int ClinicID;
int DoctorID; int DoctorID;
String FirstName; String FirstName;
String MiddleName; String MiddleName;
String LastName; String LastName;
String PatientMobileNumber; String PatientMobileNumber;
@ -21,13 +31,87 @@ class PatientModel {
bool PatientOutSA; bool PatientOutSA;
getFirstName() { int get getProjectID => ProjectID;
return this.FirstName;
} set setProjectID(int ProjectID) => this.ProjectID = ProjectID;
int get getClinicID => ClinicID;
set setClinicID(int ClinicID) => this.ClinicID = ClinicID;
int get getDoctorID => DoctorID;
set setDoctorID(int DoctorID) => this.DoctorID = DoctorID;
String get getFirstName => FirstName;
set setFirstName(String FirstName) => this.FirstName = FirstName;
String get getMiddleName => MiddleName;
set setMiddleName(String MiddleName) => this.MiddleName = MiddleName;
String get getLastName => LastName;
set setLastName(String LastName) => this.LastName = LastName;
String get getPatientMobileNumber => PatientMobileNumber;
set setPatientMobileNumber(String PatientMobileNumber) => this.PatientMobileNumber = PatientMobileNumber;
// String get getPatientIdentificationID => PatientIdentificationID;
// set setPatientIdentificationID(String PatientIdentificationID) => this.PatientIdentificationID = PatientIdentificationID;
int get getPatientID => PatientID;
set setPatientID(int PatientID) => this.PatientID = PatientID;
String get getFrom => From;
set setFrom(String From) => this.From = From;
String get getTo => To;
set setTo(String To) => this.To = To;
int get getLanguageID => LanguageID;
set setLanguageID(int LanguageID) => this.LanguageID = LanguageID;
String get getStamp => stamp;
set setStamp(String stamp) => this.stamp = stamp;
String get getIPAdress => IPAdress;
set setIPAdress(String IPAdress) => this.IPAdress = IPAdress;
double get getVersionID => VersionID;
set setVersionID(double VersionID) => this.VersionID = VersionID;
int get getChannel => Channel;
set setChannel(int Channel) => this.Channel = Channel;
String get getTokenID => TokenID;
set setTokenID(String TokenID) => this.TokenID = TokenID;
String get getSessionID => SessionID;
set setSessionID(String SessionID) => this.SessionID = SessionID;
bool get getIsLoginForDoctorApp => IsLoginForDoctorApp;
set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) => this.IsLoginForDoctorApp = IsLoginForDoctorApp;
bool get getPatientOutSA => PatientOutSA;
set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA;
setFirstName( FirstName) {
this.FirstName = FirstName;
}

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:PrescriptionReqModel
*@desc: PrescriptionReqModel class
*/
class PrescriptionReqModel { class PrescriptionReqModel {
int patientID; int patientID;
int setupID; int setupID;

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:PrescriptionResModel
*@desc: PrescriptionResModel class
*/
class PrescriptionResModel { class PrescriptionResModel {
String setupID; String setupID;
int projectID; int projectID;

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:RadiologyReqModel
*@desc: RadiologyReqModel class
*/
class RadiologyReqModel { class RadiologyReqModel {
int patientID; int patientID;
int projectID; int projectID;

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:RadiologyResModel
*@desc: RadiologyResModel class
*/
class RadiologyResModel { class RadiologyResModel {
String setupID; String setupID;
int projectID; int projectID;

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:VitalSignResModel
*@desc: VitalSignResModel class
*/
class VitalSignResModel { class VitalSignResModel {
var transNo; var transNo;
var projectID; var projectID;

@ -1,7 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/RequestDoctorReply.dart'; import 'package:doctor_app_flutter/models/request_doctor_reply.dart';
import 'package:doctor_app_flutter/models/list_gt_my_pationents_question_model.dart'; import 'package:doctor_app_flutter/models/list_gt_my_pationents_question_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';

@ -1,18 +1,23 @@
import 'dart:convert'; import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import '../interceptor/http_interceptor.dart'; import '../interceptor/http_interceptor.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:http/http.dart'; import 'package:http/http.dart';
import 'package:http_interceptor/http_client_with_interceptor.dart'; import 'package:http_interceptor/http_client_with_interceptor.dart';
const GET_PROJECTS = const GET_PROJECTS = BASE_URL + 'Lists.svc/REST/GetProjectForDoctorAPP';
BASE_URL+'Lists.svc/REST/GetProjectForDoctorAPP';
class HospitalProvider with ChangeNotifier {
class ProjectsProvider with ChangeNotifier {
Client client = Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]); HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
Future<Map> getProjectsList() async { Future<Map> getProjectsList() async {
const url = GET_PROJECTS; const url = GET_PROJECTS;
var info = { var info = {

@ -41,11 +41,12 @@ class PatientsProvider with ChangeNotifier {
Future<Map> getPatientList(PatientModel patient, patientType) async { Future<Map> getPatientList(PatientModel patient, patientType) async {
/* const url = /* const url =
BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';*/ BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';*/
// var srvicePatiant = ["GetMyOutPatient", "GetMyInPatient", "GtMyDischargePatient","GtMyReferredPatient","GtMyDischargeReferralPatient","GtMyTomorrowPatient","GtMyReferralPatient"];
// print("a=SERVICES_PATIANT[patientType]========='=======a");
int val = int.parse(patientType); int val = int.parse(patientType);
final url = //**********Modify url by amjad amireh for patiant type*********
BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val];
final url =BASE_URL+"DoctorApplication.svc/REST/"+ SERVICES_PATIANT[val];
// print("a===========$url=======a"); // print("a===========$url=======a");
try { try {

@ -0,0 +1,43 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:flutter/cupertino.dart';
class ProjectProvider with ChangeNotifier{
DrAppSharedPreferances sharedPref = DrAppSharedPreferances();
Locale _appLocale;
String currentLanguage = 'ar';
bool _isArabic = false;
Locale get appLocal => _appLocale;
bool get isArabic => _isArabic;
ProjectProvider(){
loadSharedPrefLanguage ();
}
void loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getString(APP_Language);
_appLocale = Locale(currentLanguage ?? 'ar');
_isArabic = currentLanguage != null
? currentLanguage == 'ar' ? true : false
: false;
notifyListeners();
}
void changeLanguage(String lan) {
if (lan != "en" && currentLanguage != lan) {
_appLocale = Locale("ar");
_isArabic = true;
currentLanguage = 'ar';
sharedPref.setString(APP_Language, 'ar');
} else if (lan != "ar" && currentLanguage != lan) {
_appLocale = Locale("en");
_isArabic = false;
currentLanguage = 'en';
sharedPref.setString(APP_Language, 'en');
}
notifyListeners();
}
}

@ -8,7 +8,7 @@ import 'package:http_interceptor/http_client_with_interceptor.dart';
import '../interceptor/http_interceptor.dart'; import '../interceptor/http_interceptor.dart';
import '../models/list_doctor_working_hours_table_model.dart'; import '../models/list_doctor_working_hours_table_model.dart';
import '../models/RequestSchedule.dart'; import '../models/request_schedule.dart';
class ScheduleProvider with ChangeNotifier { class ScheduleProvider with ChangeNotifier {
Client client = Client client =
@ -27,6 +27,7 @@ class ScheduleProvider with ChangeNotifier {
getDoctorSchedule() async { getDoctorSchedule() async {
const url = BASE_URL + 'Doctors.svc/REST/GetDoctorWorkingHoursTable'; const url = BASE_URL + 'Doctors.svc/REST/GetDoctorWorkingHoursTable';
try { try {
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await client.post(url, body: json.encode(requestSchedule.toJson())); final response = await client.post(url, body: json.encode(requestSchedule.toJson()));
final int statusCode = response.statusCode; final int statusCode = response.statusCode;

@ -1,3 +1,5 @@
import './screens/patients/profile/vital_sign/body_measurements_screen.dart';
import './screens/QR_reader_screen.dart'; import './screens/QR_reader_screen.dart';
import './screens/auth/change_password_screen.dart'; import './screens/auth/change_password_screen.dart';
import './screens/auth/login_screen.dart'; import './screens/auth/login_screen.dart';
@ -16,6 +18,7 @@ import './screens/patients/profile/lab_result/lab_orders_screen.dart';
import './screens/patients/profile/patient_profile_screen.dart'; import './screens/patients/profile/patient_profile_screen.dart';
import './screens/patients/profile/prescriptions/prescriptions_screen.dart'; import './screens/patients/profile/prescriptions/prescriptions_screen.dart';
import './screens/patients/profile/radiology/radiology_screen.dart'; import './screens/patients/profile/radiology/radiology_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_screen.dart'; import './screens/patients/profile/vital_sign/vital_sign_screen.dart';
import './screens/profile_screen.dart'; import './screens/profile_screen.dart';
import './screens/settings/settings_screen.dart'; import './screens/settings/settings_screen.dart';
@ -40,11 +43,12 @@ const String PHARMACIES_LIST = 'medicine/pharmacies-list';
const String MESSAGES = 'messages'; const String MESSAGES = 'messages';
const String SERVICES = 'services'; const String SERVICES = 'services';
const String SETTINGS = 'settings'; const String SETTINGS = 'settings';
const String VITAL_SIGN = 'vital-sign'; const String VITAL_SIGN = 'patients/vital-sign';
const String LAB_ORDERS = 'lab_orders'; const String LAB_ORDERS = 'patients/lab_orders';
const String PRESCRIPTIONS = 'Prescription'; const String PRESCRIPTIONS = 'patients/prescription';
const String RADIOLOGY = 'Radiology'; const String RADIOLOGY = 'patients/radiology';
const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details';
const String BODY_MEASUREMENTS = 'patients/body-measurements';
var routes = { var routes = {
HOME: (_) => DashboardScreen(), HOME: (_) => DashboardScreen(),
@ -62,11 +66,15 @@ var routes = {
VERIFY_ACCOUNT: (_) => VerifyAccountScreen(), VERIFY_ACCOUNT: (_) => VerifyAccountScreen(),
VERIFICATION_METHODS: (_) => VerificationMethodsScreen(), VERIFICATION_METHODS: (_) => VerificationMethodsScreen(),
PATIENTS_PROFILE: (_) => PatientProfileScreen(), PATIENTS_PROFILE: (_) => PatientProfileScreen(),
PHARMACIES_LIST: (_) => PharmaciesListScreen(itemID: null,), PHARMACIES_LIST: (_) => PharmaciesListScreen(
itemID: null,
),
VITAL_SIGN: (_) => VitalSignScreen(), VITAL_SIGN: (_) => VitalSignScreen(),
MESSAGES: (_) => MessagesScreen(), MESSAGES: (_) => MessagesScreen(),
SERVICES: (_) => ServicesScreen(), SERVICES: (_) => ServicesScreen(),
LAB_ORDERS: (_) => LabOrdersScreen(), LAB_ORDERS: (_) => LabOrdersScreen(),
PRESCRIPTIONS: (_) => PrescriptionScreen(), PRESCRIPTIONS: (_) => PrescriptionScreen(),
RADIOLOGY:(_)=>RadiologyScreen() RADIOLOGY: (_) => RadiologyScreen(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
BODY_MEASUREMENTS: (_) => BodyMeasurementsScreen()
}; };

@ -72,7 +72,7 @@ class _LoginsreenState extends State<Loginsreen> {
return Text('Error: ${snapshot.error}'); return Text('Error: ${snapshot.error}');
} else { } else {
return Container( return Container(
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 30), margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 30),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -1,7 +1,9 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/providers/doctor_reply_provider.dart'; import 'package:doctor_app_flutter/providers/doctor_reply_provider.dart';
import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/providers/medicine_provider.dart';
import 'package:doctor_app_flutter/providers/hospital_provider.dart';
import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../routes.dart'; import '../routes.dart';
@ -25,10 +27,13 @@ class DashboardScreen extends StatefulWidget {
} }
class _DashboardScreenState extends State<DashboardScreen> { class _DashboardScreenState extends State<DashboardScreen> {
HospitalProvider projectsProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectsProvider = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: 'Home', appBarTitle: TranslationBase.of(context).dashboardScreenToolbarTitle,
current: 0, current: 0,
body: Container( body: Container(
child: Column( child: Column(

@ -37,8 +37,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
var _patientSearchFormValues = PatientModel( var _patientSearchFormValues = PatientModel(
ProjectID: 15, ProjectID: 15,
ClinicID: 14, ClinicID: 0,
DoctorID: 243763, DoctorID: 4709,
FirstName: "0", FirstName: "0",
MiddleName: "0", MiddleName: "0",
LastName: "0", LastName: "0",
@ -62,15 +62,32 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
// _patientSearchFormValues.TokenID = // _patientSearchFormValues.TokenID =
if (_formKey.currentState.validate()) { if (_formKey.currentState.validate()) {
// If all data are correct then save data to out variables //*****If all data are correct then save data to out variables****
if (_patientSearchFormValues.getFirstName == null ||
_patientSearchFormValues.getMiddleName == null ||
_patientSearchFormValues.getLastName == null ||
_patientSearchFormValues.getPatientMobileNumber == null) {
_patientSearchFormValues.setFirstName = "0";
_patientSearchFormValues.setLastName = "0";
_patientSearchFormValues.setMiddleName = "0";
_patientSearchFormValues.setPatientMobileNumber = "0";
_patientSearchFormValues.setPatientID = 0;
_patientSearchFormValues.From = "0";
_patientSearchFormValues.To = "0";
//_formKey.currentState.save();
} else {
_formKey.currentState.save();
}
// _formKey.currentState.save(); // _formKey.currentState.save();
// sharedPref.setString(TOKEN,'@dm!n'); //*********************************** */
sharedPref.setString(TOKEN, '@dm!n');
sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType); sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType);
print('_selectedType${_selectedType}'); print('_selectedType${_selectedType}');
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
int projectID = await sharedPref.getInt(PROJECT_ID); int projectID = await sharedPref.getInt(PROJECT_ID);
_patientSearchFormValues.TokenID = token; _patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID = projectID; _patientSearchFormValues.ProjectID = 15; //projectID;
// print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf"); // print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
Navigator.of(context).pushNamed(PATIENTS, arguments: { Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues, "patientSearchForm": _patientSearchFormValues,
@ -173,7 +190,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppTextFormField( AppTextFormField(
hintText: 'First Name', hintText: 'First Name',
onSaved: (value) { onSaved: (value) {
_patientSearchFormValues.FirstName = value; // _patientSearchFormValues.FirstName = value;
_patientSearchFormValues.setFirstName = value;
}, },
// validator: (value) { // validator: (value) {
// return TextValidator().validateName(value); // return TextValidator().validateName(value);

@ -6,6 +6,7 @@
*@desc: *@desc:
*/ */
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/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart'; import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart';
@ -13,7 +14,9 @@ import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
//************* //*************
@ -42,10 +45,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
List<PatiantInformtion> responseModelList; List<PatiantInformtion> responseModelList;
List<PatiantInformtion> responseModelList2; List<PatiantInformtion> responseModelList2;
// List<String> _locations = ['Today', 'Old Date', 'YESTERDAY'];
List<String> _locations = ['Today', 'Tomorrow', 'Next Week']; List<String> _locations = ['Today', 'Tomorrow', 'Next Week'];
int _activeLocation = 0; int _activeLocation = 0;
@ -59,6 +59,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
final _controller = TextEditingController(); final _controller = TextEditingController();
//************** //**************
PatientModel patient; PatientModel patient;
PatientsProvider patientsProv;
@override @override
void didChangeDependencies() { void didChangeDependencies() {
@ -71,13 +72,11 @@ class _PatientsScreenState extends State<PatientsScreen> {
patientType = routeArgs['selectedType']; patientType = routeArgs['selectedType'];
patientTypetitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; patientTypetitle = SERVICES_PATIANT_HEADER[int.parse(patientType)];
print(patientType); print(patientType);
if (_isInit) { if (_isInit) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context); PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
patientsProv.getPatientList(patient, patientType).then((res) { patientsProv.getPatientList(patient, patientType).then((res) {
print('List_MyInPatient${(res['List_MyInPatient'])}');
setState(() { setState(() {
int val2 = int.parse(patientType); int val2 = int.parse(patientType);
litems = res[SERVICES_PATIANT2[val2]]; litems = res[SERVICES_PATIANT2[val2]];
@ -88,51 +87,177 @@ class _PatientsScreenState extends State<PatientsScreen> {
responseModelList2 = responseModelList; responseModelList2 = responseModelList;
//******************** //********************
_isLoading = false; _isLoading = false;
_hasError = res['ErrorEndUserMessage']; _hasError = res['ErrorEndUserMessage'];
}); });
print(res); print(res);
}).catchError((error) { }).catchError((error) {
// patientsProv.isLoading=false;
// patientsProv.isError=true;
print("====================error================");
print(error); print(error);
}); });
} }
_isInit = false; _isInit = false;
super.didChangeDependencies(); super.didChangeDependencies();
} }
/* /*
*@author: Amjad Amireh *@author: Amjad Amireh
*@Date:2/5/2020 *@Date:2/5/2020
*@param: *@param:
*@return:PatientsScreen Search textbox *@return:PatientsScreen Search textbox filter
*@desc: *@desc:
*/ */
searchData(String str) { searchData(String str) {
this.responseModelList = this.responseModelList2;
var strExist = str.length > 0 ? true : false; var strExist = str.length > 0 ? true : false;
if (strExist) { if (strExist) {
List<PatiantInformtion> filterData = []; List<PatiantInformtion> filterData = [];
for (var i = 0; i < responseModelList2.length; i++) {
for (var i = 0; i < responseModelList2.length; i++) {
String firstName = responseModelList[i].firstName.toUpperCase(); String firstName = responseModelList[i].firstName.toUpperCase();
String lastName = responseModelList[i].lastName.toUpperCase(); String lastName = responseModelList[i].lastName.toUpperCase();
if (firstName.contains(str.toUpperCase())||lastName.contains(str.toUpperCase())) { if (firstName.contains(str.toUpperCase()) ||
print("==========data done==========="); lastName.contains(str.toUpperCase())) {
filterData.add(responseModelList[i]); filterData.add(responseModelList[i]);
} }
} }
setState(() { setState(() {
print("==========data good===========");
this.responseModelList = filterData; this.responseModelList = filterData;
}); });
} else { } else {
setState(() { setState(() {
print("==========no data==========="); this.responseModelList = this.responseModelList2;
});
}
}
//***********DateFormat**************
/*
*@author: Amjad Amireh
*@Date:5/5/2020
*@param:
*@return:Convert time from Milesecond to date with time
*@desc:
*/
convertDate(String str) {
String timeConvert;
const start = "/Date(";
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
String newDateformat = date.year.toString() +
"/" +
date.month.toString().padLeft(2, '0') +
"/" +
date.day.toString().padLeft(2, '0') +
" " +
"-" +
" " +
date.hour.toString().padLeft(2, '0') +
":" +
date.minute.toString().toString().padLeft(2, '0');
return newDateformat.toString();
}
/*
*@author: Amjad Amireh
*@Date:5/5/2020
*@param:
*@return:Convert time from Milesecond to date
*@desc:
*/
convertDateFormat(String str) {
String timeConvert;
const start = "/Date(";
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString();
}
filterBooking(String str) {
this.responseModelList = this.responseModelList2;
var strExist = str.length > 0 ? true : false;
if (true) {
List<PatiantInformtion> filterDate = [];
for (var i = 0; i < responseModelList2.length; i++) {
String patiantAppointment =
convertDateFormat(responseModelList[i].appointmentDate);
String dateAppointment = checkDate(patiantAppointment);
if (dateAppointment.contains(str)) {
filterDate.add(responseModelList[i]);
}
}
setState(() {
this.responseModelList = filterDate;
});
} else {
setState(() {
this.responseModelList = this.responseModelList2; this.responseModelList = this.responseModelList2;
}); });
} }
} }
String checkDate(String dateString) {
String date;
DateTime checkedTime = DateTime.parse(dateString);
DateTime currentTime = DateTime.now();
if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month) &&
(currentTime.day == checkedTime.day)) {
return "TODAY";
} else if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month)) {
if ((currentTime.day - checkedTime.day) == 1) {
return "YESTERDAY";
} else if ((currentTime.day - checkedTime.day) == -1) {
return "TOMORROW";
}
if ((currentTime.day - checkedTime.day) <= -2) {
return "Next Week";
} else {
return "Old Date";
}
}
return "Old Date";
}
//*************************
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context); PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
@ -140,64 +265,99 @@ class _PatientsScreenState extends State<PatientsScreen> {
return AppScaffold( return AppScaffold(
appBarTitle: patientTypetitle, appBarTitle: patientTypetitle,
//***********Modify by amjad (create List view to insert all new data webservise in scroll )************* //***********Modify by amjad (create List view to insert all new data webservise in scroll )*************
body: Container( body: patientsProv.isLoading
// margin: EdgeInsets.all(20), ? DrAppCircularProgressIndeicator()
child: ListView(scrollDirection: Axis.vertical, children: <Widget>[ : patientsProv.isError
? Center(
child: Text(
patientsProv.error,
style: TextStyle(color: Theme.of(context).errorColor),
),
)
: Container(
child: ListView(scrollDirection: Axis.vertical, children: <
Widget>[
Container( Container(
child: litems == null child: litems == null
? Column() ? Column(
: children: <Widget>[
Column( Container(
child: Center(
child:
Padding(
padding: const EdgeInsets.fromLTRB(0, 250, 0, 0),
child: DrAppCircularProgressIndeicator(),
)),
),
],
)
: Column(
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: MediaQuery.of(context).size.height * 0.03), top:
child: _locationBar(context), MediaQuery.of(context).size.height *
0.03),
child: SERVICES_PATIANT2[
int.parse(patientType)] ==
"List_MyOutPatient"
? _locationBar(context)
: Container(),
), ),
SizedBox(height: 10.0), SizedBox(height: 10.0),
Container( Container(
width: SizeConfig.screenWidth * 0.80, width: SizeConfig.screenWidth * 0.80,
child: TextField( child: TextField(
controller: _controller, controller: _controller,
onChanged: (String str) { onChanged: (String str) {
// print(str);
this.searchData(str);
this.searchData(str);
}, },
decoration: decoration: buildInputDecoration(
buildInputDecoration(context, 'Search patiant'), context, 'Search patiant'),
), ),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(15, 0, 15, 0), margin: EdgeInsets.fromLTRB(15, 0, 15, 0),
child: Column( child: Column(
children: responseModelList
children: .map((PatiantInformtion item) {
responseModelList.map((PatiantInformtion item) {
return InkWell( return InkWell(
child: CardWithBgWidget( child: CardWithBgWidget(
widget: Column( widget: Column(
crossAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
item.firstName, item.firstName +
fontSize: 2.5 * SizeConfig.textMultiplier, " " +
), item.lastName +
SizedBox( "- " +
height: 8, item.patientId.toString(),
fontSize: 2.5 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
AppText(item.lastName,
fontSize:
2.5 * SizeConfig.textMultiplier),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText(item.middleName, SERVICES_PATIANT2[int.parse(
fontSize: patientType)] ==
2.5 * SizeConfig.textMultiplier), "List_MyOutPatient"
? AppText(
convertDate(item
.appointmentDate
.toString()),
fontSize: 2.5 *
SizeConfig
.textMultiplier)
: AppText(
item.nationalityName,
fontSize: 2.5 *
SizeConfig
.textMultiplier)
], ],
), ),
), ),
@ -243,22 +403,27 @@ class _PatientsScreenState extends State<PatientsScreen> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((l) { children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == l ? true : false; bool _isActive = _locations[_activeLocation] == item ? true : false;
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[ return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
InkWell( InkWell(
child: Text( child: Text(
l, item,
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
onTap: () { onTap: () {
print(l);
print(_locations.indexOf(l)); print(_locations.indexOf(item));
filterBooking(item.toString());
setState(() { setState(() {
_activeLocation = _locations.indexOf(l); _activeLocation = _locations.indexOf(item);
}); });
}), }),
_isActive _isActive

@ -108,8 +108,10 @@ class _LabOrdersScreenState extends State<LabOrdersScreen> {
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
ProfileImageWidget(url:patientsProv ProfileImageWidget(
.patientLabResultOrdersList[index] url: patientsProv
.patientLabResultOrdersList[
index]
.doctorImageURL), .doctorImageURL),
Expanded( Expanded(
child: Padding( child: Padding(
@ -123,15 +125,18 @@ class _LabOrdersScreenState extends State<LabOrdersScreen> {
'${patientsProv.patientLabResultOrdersList[index].doctorName}', '${patientsProv.patientLabResultOrdersList[index].doctorName}',
fontSize: 2.5 * fontSize: 2.5 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
' ${patientsProv.patientLabResultOrdersList[index].clinicName}', ' ${patientsProv.patientLabResultOrdersList[index].clinicName}',
fontSize: 2.5 * fontSize: 2 *
SizeConfig SizeConfig.textMultiplier,
.textMultiplier), color: Theme.of(context)
.primaryColor,
),
SizedBox( SizedBox(
height: 8, height: 8,
), ),

@ -55,8 +55,7 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
tokenID: token, tokenID: token,
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
languageID: 2, languageID: 2,
setupID: 0 setupID: 0);
);
patientsProv.getPatientPrescriptions(prescriptionReqModel.toJson()); patientsProv.getPatientPrescriptions(prescriptionReqModel.toJson());
} }
@ -99,7 +98,8 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
SizeConfig.realScreenWidth * 0.05, SizeConfig.realScreenWidth * 0.05,
0), 0),
child: ListView.builder( child: ListView.builder(
itemCount: patientsProv.patientPrescriptionsList.length, itemCount:
patientsProv.patientPrescriptionsList.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
return InkWell( return InkWell(
child: CardWithBgWidget( child: CardWithBgWidget(
@ -108,7 +108,8 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
ProfileImageWidget(url:patientsProv ProfileImageWidget(
url: patientsProv
.patientPrescriptionsList[index] .patientPrescriptionsList[index]
.doctorImageURL), .doctorImageURL),
Expanded( Expanded(
@ -123,15 +124,18 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
'${patientsProv.patientPrescriptionsList[index].doctorName}', '${patientsProv.patientPrescriptionsList[index].doctorName}',
fontSize: 2.5 * fontSize: 2.5 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
' ${patientsProv.patientPrescriptionsList[index].clinicDescription}', ' ${patientsProv.patientPrescriptionsList[index].clinicDescription}',
fontSize: 2.5 * fontSize: 2 *
SizeConfig SizeConfig
.textMultiplier), .textMultiplier,
color: Theme.of(context)
.primaryColor),
SizedBox( SizedBox(
height: 8, height: 8,
), ),

@ -123,23 +123,27 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
'${patientsProv.patientRadiologyList[index].doctorName}', '${patientsProv.patientRadiologyList[index].doctorName}',
fontSize: 2.5 * fontSize: 2.5 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}', 'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}',
fontSize: 2.5 * fontSize: 2 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
' ${patientsProv.patientRadiologyList[index].clinicName}', ' ${patientsProv.patientRadiologyList[index].clinicName}',
fontSize: 2.5 * fontSize: 2 *
SizeConfig SizeConfig.textMultiplier,
.textMultiplier), color: Theme.of(context)
.primaryColor,
),
SizedBox( SizedBox(
height: 8, height: 8,
), ),

@ -0,0 +1,143 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart';
class BodyMeasurementsScreen extends StatelessWidget {
BodyMeasurementsScreen();
List<VitalSignResModel> vitalList;
@override
Widget build(BuildContext context) {
_seriesData = List<charts.Series<Pollution, String>>();
_seriesPieData = List<charts.Series<Task, String>>();
_seriesLineData = List<charts.Series<Sales, int>>();
_generateData();
return AppScaffold(
appBarTitle: 'Body Measurements',
body: RoundedContainer(
height: SizeConfig.realScreenHeight*0.4,
child: Padding(
padding: EdgeInsets.all(8.0),
child: Container(
child: Center(
child: Column(
children: <Widget>[
Text(
'Body Mass Index',
style: TextStyle(
fontSize: 24.0, fontWeight: FontWeight.bold),
),
Expanded(
child: charts.BarChart(
_seriesData,
animate: true,
barGroupingType: charts.BarGroupingType.grouped,
// behaviors: [new charts.SeriesLegend()],
// primaryMeasureAxis: ,
animationDuration: Duration(seconds: 5),
),
),
],
),
),
),
),
),
);
}
List<charts.Series<Pollution, String>> _seriesData;
List<charts.Series<Task, String>> _seriesPieData;
List<charts.Series<Sales, int>> _seriesLineData;
_generateData() {
var data1 = [
new Pollution(1980, 'USA', 40),
];
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
}
}
class Pollution {
String place;
int year;
int quantity;
Pollution(this.year, this.place, this.quantity);
}
class Task {
String task;
double taskvalue;
Color colorval;
Task(this.task, this.taskvalue, this.colorval);
}
class Sales {
int yearval;
int salesval;
Sales(this.yearval, this.salesval);
}

@ -0,0 +1,76 @@
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart';
import '../../../../config/size_config.dart';
import '../../../../models/patient/vital_sign_res_model.dart';
import '../../../../widgets/patients/profile/profile_medical_info_widget.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/rounded_container_widget.dart';
class VitalSignDetailsScreen extends StatelessWidget {
// VitalSignDetailsScreen({Key key, this.vitalSing}) : super(key: key);
VitalSignResModel vitalSing;
String url = "assets/images/";
final double contWidth = SizeConfig.realScreenWidth * 0.70;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
vitalSing = routeArgs['vitalSing'];
return AppScaffold(
appBarTitle: "vital Sing ",
body: RoundedContainer(
height: SizeConfig.realScreenHeight * 0.7,
child: CustomScrollView(
primary: false,
slivers: <Widget>[
SliverPadding(
padding: const EdgeInsets.all(10),
sliver: SliverGrid.count(
childAspectRatio: 0.7,
crossAxisSpacing: 10,
mainAxisSpacing: 0,
crossAxisCount: 3,
children: <Widget>[
InkWell(
onTap: (){
Navigator.of(context).pushNamed(BODY_MEASUREMENTS);
},
child: CircleAvatarWidget(
des: 'Body Measurements',
url: url + 'heartbeat.png',
),
),
CircleAvatarWidget(
des: 'Temperature',
url: url + 'heartbeat.png',
),
CircleAvatarWidget(
des: 'Pulse',
url: url + 'heartbeat.png',
),
CircleAvatarWidget(
des: 'Respiration',
url: url + 'heartbeat.png',
),
CircleAvatarWidget(
des: 'Blood Pressure',
url: url + 'heartbeat.png',
),
CircleAvatarWidget(
des: 'Oxygenation',
url: url + 'heartbeat.png',
),
CircleAvatarWidget(
des: 'Pain Scale',
url: url + 'heartbeat.png',
),
],
),
),
],
),
// height: 500,
));
}
}

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -109,7 +110,8 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
ProfileImageWidget(url:patientsProv ProfileImageWidget(
url: patientsProv
.patientVitalSignList[index] .patientVitalSignList[index]
.doctorImageURL), .doctorImageURL),
Expanded( Expanded(
@ -124,15 +126,18 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
'${patientsProv.patientVitalSignList[index].doctorName}', '${patientsProv.patientVitalSignList[index].doctorName}',
fontSize: 2.5 * fontSize: 2.5 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
' ${patientsProv.patientVitalSignList[index].clinicName}', ' ${patientsProv.patientVitalSignList[index].clinicName}',
fontSize: 2.5 * fontSize: 2 *
SizeConfig SizeConfig.textMultiplier,
.textMultiplier), color: Theme.of(context)
.primaryColor,
),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
@ -145,7 +150,9 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
], ],
), ),
), ),
onTap: () {}, onTap: () {
Navigator.of(context).pushNamed(VITAL_SIGN_DETAILS,arguments: {'vitalSing':patientsProv.patientVitalSignList[index]});
},
); );
}), }),
), ),

@ -1,11 +1,65 @@
import 'package:doctor_app_flutter/providers/project_provider.dart';
import 'package:doctor_app_flutter/providers/hospital_provider.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class SettingsScreen extends StatelessWidget { class SettingsScreen extends StatelessWidget {
ProjectProvider projectsProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectsProvider = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: "SETTINS", appBarTitle: TranslationBase.of(context).settings.toUpperCase(),
body: Container(), body: ListView(
children: [
AppText(TranslationBase.of(context).language.toUpperCase(),fontSize: 18,margin: 5,fontWeight: FontWeight.bold,),
Container(
margin: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
height: 50,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey[600],width: 2.0),
borderRadius: BorderRadius.circular(8.0)
),
child: ClipRRect(
borderRadius: BorderRadius.circular(7.0),
child: Row(
children: [
Expanded(
child: InkWell(
onTap: () { projectsProvider.changeLanguage('en'); },
child: AnimatedContainer(
duration: Duration(milliseconds: 350),
decoration: BoxDecoration(
color: !projectsProvider.isArabic ? Hexcolor('#58434F') : Colors.transparent,
border: Border(right: BorderSide(color: Colors.grey[200], width: 2.0))
),
child: Center(child: AppText(TranslationBase.of(context).lanEnglish, color: !projectsProvider.isArabic ? Colors.white : Colors.grey[500]))
),
),
),
Expanded(
child: InkWell(
onTap: (){projectsProvider.changeLanguage('ar');},
child: AnimatedContainer(
duration: Duration(milliseconds: 350),
decoration: BoxDecoration(
color: projectsProvider.isArabic ? Hexcolor('#58434F') : Colors.transparent,
border: Border(right: BorderSide(color: Colors.grey[200], width: 2.0))
),
child: Center(child: AppText(TranslationBase.of(context).lanArabic, color: projectsProvider.isArabic ? Colors.white : Colors.grey[500],))
),
),
)
],
),
),
)
],
),
); );
} }
} }

@ -0,0 +1,43 @@
import 'dart:async';
import 'package:doctor_app_flutter/config/localized_values.dart';
import 'package:flutter/foundation.dart' show SynchronousFuture;
import 'package:flutter/material.dart';
class TranslationBase {
TranslationBase(this.locale);
final Locale locale;
static TranslationBase of(BuildContext context) {
return Localizations.of<TranslationBase>(context, TranslationBase);
}
String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode];
String get settings => localizedValues['settings'][locale.languageCode];
String get language => localizedValues['language'][locale.languageCode];
String get lanEnglish => localizedValues['lanEnglish'][locale.languageCode];
String get lanArabic => localizedValues['lanArabic'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {
const TranslationBaseDelegate();
@override
bool isSupported(Locale locale) => ['en', 'ar'].contains(locale.languageCode);
@override
Future<TranslationBase> load(Locale locale) {
return SynchronousFuture<TranslationBase>(TranslationBase(locale));
}
@override
bool shouldReload(TranslationBaseDelegate old) => false;
}

@ -10,7 +10,7 @@ import '../../config/shared_pref_kay.dart';
import '../../config/size_config.dart'; import '../../config/size_config.dart';
import '../../models/user_model.dart'; import '../../models/user_model.dart';
import '../../providers/auth_provider.dart'; import '../../providers/auth_provider.dart';
import '../../providers/projects_provider.dart'; import '../../providers/hospital_provider.dart';
import '../../routes.dart'; import '../../routes.dart';
import '../../util/dr_app_shared_pref.dart'; import '../../util/dr_app_shared_pref.dart';
import '../../util/dr_app_toast_msg.dart'; import '../../util/dr_app_toast_msg.dart';
@ -290,7 +290,7 @@ class _LoginFormState extends State<LoginForm> {
} }
getProjectsList() { getProjectsList() {
ProjectsProvider projectsProv = Provider.of<ProjectsProvider>(context); HospitalProvider projectsProv = Provider.of<HospitalProvider>(context);
projectsProv.getProjectsList().then((res) { projectsProv.getProjectsList().then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {

@ -15,37 +15,6 @@ import './profile_status_info_widget.dart';
*@desc: Patient Profile Widget *@desc: Patient Profile Widget
*/ */
class PatientProfileWidget extends StatelessWidget { class PatientProfileWidget extends StatelessWidget {
// Map patient = {
// "ProjectID": 15,
// "ClinicID": null,
// "DoctorID": 70907,
// "PatientID": 3315674,
// "DoctorName": "MOQBIL ABDULLAH AL HODAITHY",
// "DoctorNameN": null,
// "FirstName": "WALEED",
// "MiddleName": "ALI",
// "LastName": "AL-YAZIDI",
// "FirstNameN": null,
// "MiddleNameN": null,
// "LastNameN": null,
// "Gender": 1,
// "DateofBirth": "/Date(534286800000+0300)/",
// "NationalityID": null,
// "MobileNumber": "0500014559",
// "EmailAddress": "unknown@unknown.com",
// "PatientIdentificationNo": "1063236754",
// "NationalityName": "Saudi",
// "NationalityNameN": null,
// "PatientStatusType": null,
// "PatientType": 1,
// "AppointmentDate": "/Date(1587848400000+0300)/",
// "StartTime": "13:00:00",
// "Age": "34 Yr",
// "ClinicDescription": "INTERNAL MEDICINE CLINIC",
// "GenderDescription": "Male",
// "AdmissionDate": "/Date(1587848400000+0300)/",
// "AdmissionNo": "2020008652"
// };
PatiantInformtion patient; PatiantInformtion patient;

@ -123,11 +123,14 @@ class CircleAvatarWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Container(
child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
height: height, height: height,
width: width, width: width,
// width: 50,
// height: 50,
decoration: new BoxDecoration( decoration: new BoxDecoration(
// color: Colors.green, // border color // color: Colors.green, // border color
shape: BoxShape.circle, shape: BoxShape.circle,
@ -141,8 +144,13 @@ class CircleAvatarWidget extends StatelessWidget {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppText(des) AppText(
des,
fontSize: 2 * SizeConfig.textMultiplier,
textAlign: TextAlign.center,
)
], ],
),
); );
} }
} }

@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// OWNER : Ibrahim albitar // OWNER : Ibrahim albitar
// DATE : 12-04-2020 // DATE : 12-04-2020
// DESCRIPTION : Customization for Texts in app // DESCRIPTION : Customization for Texts in app
@ -19,6 +18,7 @@ class AppText extends StatefulWidget {
final double marginBottom; final double marginBottom;
final double marginLeft; final double marginLeft;
final bool visibility; final bool visibility;
final TextAlign textAlign;
AppText(this.data, AppText(this.data,
{this.color = Colors.black, {this.color = Colors.black,
@ -30,7 +30,8 @@ class AppText extends StatefulWidget {
this.marginRight = 0, this.marginRight = 0,
this.marginBottom = 0, this.marginBottom = 0,
this.marginLeft = 0, this.marginLeft = 0,
this.visibility = true}); this.visibility = true,
this.textAlign});
@override @override
_AppTextState createState() => _AppTextState(); _AppTextState createState() => _AppTextState();
@ -39,18 +40,19 @@ class AppText extends StatefulWidget {
class _AppTextState extends State<AppText> { class _AppTextState extends State<AppText> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Visibility( return Visibility(
visible: widget.visibility, visible: widget.visibility,
child: Container( child: Container(
margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only( margin: widget.margin != null
? EdgeInsets.all(widget.margin)
: EdgeInsets.only(
top: widget.marginTop, top: widget.marginTop,
right: widget.marginRight, right: widget.marginRight,
bottom: widget.marginBottom, bottom: widget.marginBottom,
left: widget.marginLeft left: widget.marginLeft),
),
child: Text( child: Text(
widget.data, widget.data,
textAlign: widget.textAlign,
style: TextStyle( style: TextStyle(
color: widget.color, color: widget.color,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,

@ -35,7 +35,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.4.1" version: "2.4.0"
bazel_worker: bazel_worker:
dependency: transitive dependency: transitive
description: description:
@ -49,7 +49,7 @@ packages:
name: boolean_selector name: boolean_selector
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "1.0.5"
build: build:
dependency: transitive dependency: transitive
description: description:
@ -126,7 +126,7 @@ packages:
name: charcode name: charcode
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.3" version: "1.1.2"
checked_yaml: checked_yaml:
dependency: transitive dependency: transitive
description: description:
@ -134,13 +134,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.2" version: "1.0.2"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
code_builder: code_builder:
dependency: transitive dependency: transitive
description: description:
@ -154,7 +147,7 @@ packages:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.14.12" version: "1.14.11"
connectivity: connectivity:
dependency: "direct main" dependency: "direct main"
description: description:
@ -211,13 +204,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.4" version: "1.3.4"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@ -244,6 +230,11 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.4" version: "0.1.4"
flutter_localizations:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
@ -317,13 +308,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.4" version: "3.1.4"
i18n:
dependency: "direct main"
description:
name: i18n
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.10"
imei_plugin: imei_plugin:
dependency: "direct main" dependency: "direct main"
description: description:
@ -373,6 +357,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.11.4" version: "0.11.4"
maps_launcher:
dependency: "direct main"
description:
name: maps_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
@ -428,7 +419,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.0" version: "1.6.4"
pedantic: pedantic:
dependency: transitive dependency: transitive
description: description:
@ -443,6 +434,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1+1" version: "2.1.1+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform: platform:
dependency: transitive dependency: transitive
description: description:
@ -499,13 +497,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.5" version: "0.1.5"
quick_log:
dependency: transitive
description:
name: quick_log
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.0"
quiver: quiver:
dependency: transitive dependency: transitive
description: description:
@ -513,13 +504,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.5" version: "2.0.5"
rxdart:
dependency: transitive
description:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.23.1"
scratch_space: scratch_space:
dependency: transitive dependency: transitive
description: description:
@ -587,7 +571,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.0" version: "1.5.5"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -629,7 +613,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.15" version: "0.2.11"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -644,6 +628,34 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.6" version: "1.1.6"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "5.4.5"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+5"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.6"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.1+4"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
@ -665,6 +677,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
yaml: yaml:
dependency: transitive dependency: transitive
description: description:

@ -20,11 +20,12 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
hexcolor: ^1.0.1 hexcolor: ^1.0.1
flutter_localizations:
sdk: flutter
flutter_device_type: ^0.2.0 flutter_device_type: ^0.2.0
intl: ^0.16.1 intl: ^0.16.1
http: ^0.12.0+4 http: ^0.12.0+4
provider: ^4.0.5+1 provider: ^4.0.5+1
i18n: any
shared_preferences: ^0.5.6+3 shared_preferences: ^0.5.6+3
imei_plugin: ^1.1.6 imei_plugin: ^1.1.6
flutter_flexible_toast: ^0.1.4 flutter_flexible_toast: ^0.1.4
@ -34,6 +35,7 @@ dependencies:
connectivity: ^0.4.8+2 connectivity: ^0.4.8+2
maps_launcher: ^1.2.0 maps_launcher: ^1.2.0
url_launcher: ^5.4.5 url_launcher: ^5.4.5
charts_flutter: ^0.9.0

Loading…
Cancel
Save