Merge branch 'master' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into mohammad
Conflicts: lib/models/patient/patiant_info_model.dart pubspec.lockmerge-requests/65/head
commit
111d90d56f
@ -1,4 +1,8 @@
|
|||||||
final TOKEN = 'token';
|
final TOKEN = 'token';
|
||||||
final PROJECT_ID="projectID";
|
final PROJECT_ID='projectID';
|
||||||
final SLECTED_PATIENT_TYPE="slectedPatientType";
|
//===========amjad============
|
||||||
final APP_Language = "language";
|
final DOCTOR_ID='doctorID';
|
||||||
|
//=======================
|
||||||
|
final SLECTED_PATIENT_TYPE='slectedPatientType';
|
||||||
|
final APP_Language = 'language';
|
||||||
|
final DOCTOR_PROFILE = 'doctorProfile';
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
*@author: Elham Rababah
|
||||||
|
*@Date:17/5/2020
|
||||||
|
*@param:
|
||||||
|
*@return:
|
||||||
|
*@desc: Clinic Model
|
||||||
|
*/
|
||||||
|
class ClinicModel {
|
||||||
|
Null setupID;
|
||||||
|
int projectID;
|
||||||
|
int doctorID;
|
||||||
|
int clinicID;
|
||||||
|
bool isActive;
|
||||||
|
String clinicName;
|
||||||
|
|
||||||
|
ClinicModel(
|
||||||
|
{this.setupID,
|
||||||
|
this.projectID,
|
||||||
|
this.doctorID,
|
||||||
|
this.clinicID,
|
||||||
|
this.isActive,
|
||||||
|
this.clinicName});
|
||||||
|
|
||||||
|
ClinicModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
clinicID = json['ClinicID'];
|
||||||
|
isActive = json['IsActive'];
|
||||||
|
clinicName = json['ClinicName'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
data['ClinicID'] = this.clinicID;
|
||||||
|
data['IsActive'] = this.isActive;
|
||||||
|
data['ClinicName'] = this.clinicName;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,176 @@
|
|||||||
|
class DoctorProfileModel {
|
||||||
|
int doctorID;
|
||||||
|
String doctorName;
|
||||||
|
Null doctorNameN;
|
||||||
|
int clinicID;
|
||||||
|
String clinicDescription;
|
||||||
|
Null clinicDescriptionN;
|
||||||
|
Null licenseExpiry;
|
||||||
|
int employmentType;
|
||||||
|
Null setupID;
|
||||||
|
int projectID;
|
||||||
|
String projectName;
|
||||||
|
String nationalityID;
|
||||||
|
String nationalityName;
|
||||||
|
Null nationalityNameN;
|
||||||
|
int gender;
|
||||||
|
String genderDescription;
|
||||||
|
Null genderDescriptionN;
|
||||||
|
Null doctorTitle;
|
||||||
|
Null projectNameN;
|
||||||
|
bool isAllowWaitList;
|
||||||
|
String titleDescription;
|
||||||
|
Null titleDescriptionN;
|
||||||
|
Null isRegistered;
|
||||||
|
Null isDoctorDummy;
|
||||||
|
bool isActive;
|
||||||
|
Null isDoctorAppointmentDisplayed;
|
||||||
|
bool doctorClinicActive;
|
||||||
|
Null isbookingAllowed;
|
||||||
|
String doctorCases;
|
||||||
|
Null doctorPicture;
|
||||||
|
String doctorProfileInfo;
|
||||||
|
List<String> specialty;
|
||||||
|
int actualDoctorRate;
|
||||||
|
String doctorImageURL;
|
||||||
|
int doctorRate;
|
||||||
|
String doctorTitleForProfile;
|
||||||
|
bool isAppointmentAllowed;
|
||||||
|
String nationalityFlagURL;
|
||||||
|
int noOfPatientsRate;
|
||||||
|
String qR;
|
||||||
|
int serviceID;
|
||||||
|
|
||||||
|
DoctorProfileModel(
|
||||||
|
{this.doctorID,
|
||||||
|
this.doctorName,
|
||||||
|
this.doctorNameN,
|
||||||
|
this.clinicID,
|
||||||
|
this.clinicDescription,
|
||||||
|
this.clinicDescriptionN,
|
||||||
|
this.licenseExpiry,
|
||||||
|
this.employmentType,
|
||||||
|
this.setupID,
|
||||||
|
this.projectID,
|
||||||
|
this.projectName,
|
||||||
|
this.nationalityID,
|
||||||
|
this.nationalityName,
|
||||||
|
this.nationalityNameN,
|
||||||
|
this.gender,
|
||||||
|
this.genderDescription,
|
||||||
|
this.genderDescriptionN,
|
||||||
|
this.doctorTitle,
|
||||||
|
this.projectNameN,
|
||||||
|
this.isAllowWaitList,
|
||||||
|
this.titleDescription,
|
||||||
|
this.titleDescriptionN,
|
||||||
|
this.isRegistered,
|
||||||
|
this.isDoctorDummy,
|
||||||
|
this.isActive,
|
||||||
|
this.isDoctorAppointmentDisplayed,
|
||||||
|
this.doctorClinicActive,
|
||||||
|
this.isbookingAllowed,
|
||||||
|
this.doctorCases,
|
||||||
|
this.doctorPicture,
|
||||||
|
this.doctorProfileInfo,
|
||||||
|
this.specialty,
|
||||||
|
this.actualDoctorRate,
|
||||||
|
this.doctorImageURL,
|
||||||
|
this.doctorRate,
|
||||||
|
this.doctorTitleForProfile,
|
||||||
|
this.isAppointmentAllowed,
|
||||||
|
this.nationalityFlagURL,
|
||||||
|
this.noOfPatientsRate,
|
||||||
|
this.qR,
|
||||||
|
this.serviceID});
|
||||||
|
|
||||||
|
DoctorProfileModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
doctorName = json['DoctorName'];
|
||||||
|
doctorNameN = json['DoctorNameN'];
|
||||||
|
clinicID = json['ClinicID'];
|
||||||
|
clinicDescription = json['ClinicDescription'];
|
||||||
|
clinicDescriptionN = json['ClinicDescriptionN'];
|
||||||
|
licenseExpiry = json['LicenseExpiry'];
|
||||||
|
employmentType = json['EmploymentType'];
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
projectName = json['ProjectName'];
|
||||||
|
nationalityID = json['NationalityID'];
|
||||||
|
nationalityName = json['NationalityName'];
|
||||||
|
nationalityNameN = json['NationalityNameN'];
|
||||||
|
gender = json['Gender'];
|
||||||
|
genderDescription = json['Gender_Description'];
|
||||||
|
genderDescriptionN = json['Gender_DescriptionN'];
|
||||||
|
doctorTitle = json['DoctorTitle'];
|
||||||
|
projectNameN = json['ProjectNameN'];
|
||||||
|
isAllowWaitList = json['IsAllowWaitList'];
|
||||||
|
titleDescription = json['Title_Description'];
|
||||||
|
titleDescriptionN = json['Title_DescriptionN'];
|
||||||
|
isRegistered = json['IsRegistered'];
|
||||||
|
isDoctorDummy = json['IsDoctorDummy'];
|
||||||
|
isActive = json['IsActive'];
|
||||||
|
isDoctorAppointmentDisplayed = json['IsDoctorAppointmentDisplayed'];
|
||||||
|
doctorClinicActive = json['DoctorClinicActive'];
|
||||||
|
isbookingAllowed = json['IsbookingAllowed'];
|
||||||
|
doctorCases = json['DoctorCases'];
|
||||||
|
doctorPicture = json['DoctorPicture'];
|
||||||
|
doctorProfileInfo = json['DoctorProfileInfo'];
|
||||||
|
specialty = json['Specialty'].cast<String>();
|
||||||
|
actualDoctorRate = json['ActualDoctorRate'];
|
||||||
|
doctorImageURL = json['DoctorImageURL'];
|
||||||
|
doctorRate = json['DoctorRate'];
|
||||||
|
doctorTitleForProfile = json['DoctorTitleForProfile'];
|
||||||
|
isAppointmentAllowed = json['IsAppointmentAllowed'];
|
||||||
|
nationalityFlagURL = json['NationalityFlagURL'];
|
||||||
|
noOfPatientsRate = json['NoOfPatientsRate'];
|
||||||
|
qR = json['QR'];
|
||||||
|
serviceID = json['ServiceID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
data['DoctorName'] = this.doctorName;
|
||||||
|
data['DoctorNameN'] = this.doctorNameN;
|
||||||
|
data['ClinicID'] = this.clinicID;
|
||||||
|
data['ClinicDescription'] = this.clinicDescription;
|
||||||
|
data['ClinicDescriptionN'] = this.clinicDescriptionN;
|
||||||
|
data['LicenseExpiry'] = this.licenseExpiry;
|
||||||
|
data['EmploymentType'] = this.employmentType;
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['ProjectName'] = this.projectName;
|
||||||
|
data['NationalityID'] = this.nationalityID;
|
||||||
|
data['NationalityName'] = this.nationalityName;
|
||||||
|
data['NationalityNameN'] = this.nationalityNameN;
|
||||||
|
data['Gender'] = this.gender;
|
||||||
|
data['Gender_Description'] = this.genderDescription;
|
||||||
|
data['Gender_DescriptionN'] = this.genderDescriptionN;
|
||||||
|
data['DoctorTitle'] = this.doctorTitle;
|
||||||
|
data['ProjectNameN'] = this.projectNameN;
|
||||||
|
data['IsAllowWaitList'] = this.isAllowWaitList;
|
||||||
|
data['Title_Description'] = this.titleDescription;
|
||||||
|
data['Title_DescriptionN'] = this.titleDescriptionN;
|
||||||
|
data['IsRegistered'] = this.isRegistered;
|
||||||
|
data['IsDoctorDummy'] = this.isDoctorDummy;
|
||||||
|
data['IsActive'] = this.isActive;
|
||||||
|
data['IsDoctorAppointmentDisplayed'] = this.isDoctorAppointmentDisplayed;
|
||||||
|
data['DoctorClinicActive'] = this.doctorClinicActive;
|
||||||
|
data['IsbookingAllowed'] = this.isbookingAllowed;
|
||||||
|
data['DoctorCases'] = this.doctorCases;
|
||||||
|
data['DoctorPicture'] = this.doctorPicture;
|
||||||
|
data['DoctorProfileInfo'] = this.doctorProfileInfo;
|
||||||
|
data['Specialty'] = this.specialty;
|
||||||
|
data['ActualDoctorRate'] = this.actualDoctorRate;
|
||||||
|
data['DoctorImageURL'] = this.doctorImageURL;
|
||||||
|
data['DoctorRate'] = this.doctorRate;
|
||||||
|
data['DoctorTitleForProfile'] = this.doctorTitleForProfile;
|
||||||
|
data['IsAppointmentAllowed'] = this.isAppointmentAllowed;
|
||||||
|
data['NationalityFlagURL'] = this.nationalityFlagURL;
|
||||||
|
data['NoOfPatientsRate'] = this.noOfPatientsRate;
|
||||||
|
data['QR'] = this.qR;
|
||||||
|
data['ServiceID'] = this.serviceID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
*@author: Elham Rababah
|
||||||
|
*@Date:17/5/2020
|
||||||
|
*@param:
|
||||||
|
*@return:
|
||||||
|
*@desc: ProfileReqModel
|
||||||
|
*/
|
||||||
|
class ProfileReqModel {
|
||||||
|
int projectID;
|
||||||
|
int clinicID;
|
||||||
|
int doctorID;
|
||||||
|
bool isRegistered;
|
||||||
|
bool license;
|
||||||
|
int languageID;
|
||||||
|
String stamp;
|
||||||
|
String iPAdress;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
String tokenID;
|
||||||
|
String sessionID;
|
||||||
|
bool isLoginForDoctorApp;
|
||||||
|
|
||||||
|
ProfileReqModel(
|
||||||
|
{this.projectID,
|
||||||
|
this.clinicID,
|
||||||
|
this.doctorID,
|
||||||
|
this.isRegistered =true,
|
||||||
|
this.license,
|
||||||
|
this.languageID,
|
||||||
|
this.stamp = '2020-04-26T09:32:18.317Z',
|
||||||
|
this.iPAdress='11.11.11.11',
|
||||||
|
this.versionID=1.2,
|
||||||
|
this.channel=9,
|
||||||
|
this.sessionID='E2bsEeYEJo',
|
||||||
|
this.tokenID,
|
||||||
|
this.isLoginForDoctorApp = true});
|
||||||
|
|
||||||
|
ProfileReqModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
clinicID = json['ClinicID'];
|
||||||
|
doctorID = json['doctorID'];
|
||||||
|
isRegistered = json['IsRegistered'];
|
||||||
|
license = json['License'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
stamp = json['stamp'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['ClinicID'] = this.clinicID;
|
||||||
|
data['doctorID'] = this.doctorID;
|
||||||
|
data['IsRegistered'] = this.isRegistered;
|
||||||
|
data['License'] = this.license;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['stamp'] = this.stamp;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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,28 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
/*
|
||||||
|
*@author: Elham Rababah
|
||||||
|
*@Date:12/5/2020
|
||||||
|
*@param: error
|
||||||
|
*@return: StatelessWidget
|
||||||
|
*@desc: DrAppEmbeddedError class
|
||||||
|
*/
|
||||||
|
class DrAppEmbeddedError extends StatelessWidget {
|
||||||
|
const DrAppEmbeddedError({
|
||||||
|
Key key,
|
||||||
|
@required this.error,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final String error;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Center(
|
||||||
|
child: Text(
|
||||||
|
error,
|
||||||
|
style: TextStyle(color: Theme.of(context).errorColor),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue