Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into register_patient_feature
Conflicts: lib/screens/patients/register_patient/RegisterSearchPatientPage.dartregister_patient_feature
commit
c147635a38
@ -0,0 +1,112 @@
|
||||
class CheckActivationCodeModel {
|
||||
int patientMobileNumber;
|
||||
String mobileNo;
|
||||
int projectOutSA;
|
||||
int loginType;
|
||||
String zipCode;
|
||||
bool isRegister;
|
||||
String logInTokenID;
|
||||
int searchType;
|
||||
int patientID;
|
||||
int nationalID;
|
||||
int patientIdentificationID;
|
||||
bool forRegisteration;
|
||||
String activationCode;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
Null sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
String dOB;
|
||||
int isHijri;
|
||||
String healthId;
|
||||
|
||||
CheckActivationCodeModel(
|
||||
{this.patientMobileNumber,
|
||||
this.mobileNo,
|
||||
this.projectOutSA,
|
||||
this.loginType,
|
||||
this.zipCode,
|
||||
this.isRegister,
|
||||
this.logInTokenID,
|
||||
this.searchType,
|
||||
this.patientID,
|
||||
this.nationalID,
|
||||
this.patientIdentificationID,
|
||||
this.forRegisteration,
|
||||
this.activationCode,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.dOB,
|
||||
this.isHijri,
|
||||
this.healthId});
|
||||
|
||||
CheckActivationCodeModel.fromJson(Map<String, dynamic> json) {
|
||||
patientMobileNumber = json['PatientMobileNumber'];
|
||||
mobileNo = json['MobileNo'];
|
||||
projectOutSA = json['ProjectOutSA'];
|
||||
loginType = json['LoginType'];
|
||||
zipCode = json['ZipCode'];
|
||||
isRegister = json['isRegister'];
|
||||
logInTokenID = json['LogInTokenID'];
|
||||
searchType = json['SearchType'];
|
||||
patientID = json['PatientID'];
|
||||
nationalID = json['NationalID'];
|
||||
patientIdentificationID = json['PatientIdentificationID'];
|
||||
forRegisteration = json['ForRegisteration'];
|
||||
activationCode = json['activationCode'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
dOB = json['DOB'];
|
||||
isHijri = json['IsHijri'];
|
||||
healthId = json['HealthId'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||
data['MobileNo'] = this.mobileNo;
|
||||
data['ProjectOutSA'] = this.projectOutSA;
|
||||
data['LoginType'] = this.loginType;
|
||||
data['ZipCode'] = this.zipCode;
|
||||
data['isRegister'] = this.isRegister;
|
||||
data['LogInTokenID'] = this.logInTokenID;
|
||||
data['SearchType'] = this.searchType;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['NationalID'] = this.nationalID;
|
||||
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||
data['ForRegisteration'] = this.forRegisteration;
|
||||
data['activationCode'] = this.activationCode;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['DOB'] = this.dOB;
|
||||
data['IsHijri'] = this.isHijri;
|
||||
data['HealthId'] = this.healthId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
class CheckPatientForRegistrationModel {
|
||||
int patientIdentificationID;
|
||||
int patientMobileNumber;
|
||||
String zipCode;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
Null sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
String tokenID;
|
||||
int patientID;
|
||||
bool isRegister;
|
||||
String dOB;
|
||||
int isHijri;
|
||||
|
||||
CheckPatientForRegistrationModel(
|
||||
{this.patientIdentificationID,
|
||||
this.patientMobileNumber,
|
||||
this.zipCode,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.tokenID,
|
||||
this.patientID,
|
||||
this.isRegister,
|
||||
this.dOB,
|
||||
this.isHijri});
|
||||
|
||||
CheckPatientForRegistrationModel.fromJson(Map<String, dynamic> json) {
|
||||
patientIdentificationID = json['PatientIdentificationID'];
|
||||
patientMobileNumber = json['PatientMobileNumber'];
|
||||
zipCode = json['ZipCode'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
tokenID = json['TokenID'];
|
||||
patientID = json['PatientID'];
|
||||
isRegister = json['isRegister'];
|
||||
dOB = json['DOB'];
|
||||
isHijri = json['IsHijri'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||
data['ZipCode'] = this.zipCode;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['isRegister'] = this.isRegister;
|
||||
data['DOB'] = this.dOB;
|
||||
data['IsHijri'] = this.isHijri;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,185 @@
|
||||
class PatientRegistrationModel {
|
||||
Patientobject patientobject;
|
||||
String patientIdentificationID;
|
||||
String patientMobileNumber;
|
||||
String logInTokenID;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
Null sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
String tokenID;
|
||||
String dOB;
|
||||
int isHijri;
|
||||
String healthId;
|
||||
String zipCode;
|
||||
|
||||
PatientRegistrationModel(
|
||||
{this.patientobject,
|
||||
this.patientIdentificationID,
|
||||
this.patientMobileNumber,
|
||||
this.logInTokenID,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.tokenID,
|
||||
this.dOB,
|
||||
this.isHijri,
|
||||
this.healthId,
|
||||
this.zipCode});
|
||||
|
||||
PatientRegistrationModel.fromJson(Map<String, dynamic> json) {
|
||||
patientobject = json['Patientobject'] != null
|
||||
? new Patientobject.fromJson(json['Patientobject'])
|
||||
: null;
|
||||
patientIdentificationID = json['PatientIdentificationID'];
|
||||
patientMobileNumber = json['PatientMobileNumber'];
|
||||
logInTokenID = json['LogInTokenID'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
tokenID = json['TokenID'];
|
||||
dOB = json['DOB'];
|
||||
isHijri = json['IsHijri'];
|
||||
healthId = json['HealthId'];
|
||||
zipCode = json['ZipCode'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.patientobject != null) {
|
||||
data['Patientobject'] = this.patientobject.toJson();
|
||||
}
|
||||
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||
data['LogInTokenID'] = this.logInTokenID;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['DOB'] = this.dOB;
|
||||
data['IsHijri'] = this.isHijri;
|
||||
data['HealthId'] = this.healthId;
|
||||
data['ZipCode'] = this.zipCode;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Patientobject {
|
||||
bool tempValue;
|
||||
int patientIdentificationType;
|
||||
String patientIdentificationNo;
|
||||
int mobileNumber;
|
||||
int patientOutSA;
|
||||
String firstNameN;
|
||||
String middleNameN;
|
||||
String lastNameN;
|
||||
String firstName;
|
||||
String middleName;
|
||||
String lastName;
|
||||
String strDateofBirth;
|
||||
String dateofBirth;
|
||||
int gender;
|
||||
String nationalityID;
|
||||
String dateofBirthN;
|
||||
String emailAddress;
|
||||
String sourceType;
|
||||
String preferredLanguage;
|
||||
String marital;
|
||||
String eHealthIDField;
|
||||
|
||||
Patientobject(
|
||||
{this.tempValue,
|
||||
this.patientIdentificationType,
|
||||
this.patientIdentificationNo,
|
||||
this.mobileNumber,
|
||||
this.patientOutSA,
|
||||
this.firstNameN,
|
||||
this.middleNameN,
|
||||
this.lastNameN,
|
||||
this.firstName,
|
||||
this.middleName,
|
||||
this.lastName,
|
||||
this.strDateofBirth,
|
||||
this.dateofBirth,
|
||||
this.gender,
|
||||
this.nationalityID,
|
||||
this.dateofBirthN,
|
||||
this.emailAddress,
|
||||
this.sourceType,
|
||||
this.preferredLanguage,
|
||||
this.marital,
|
||||
this.eHealthIDField});
|
||||
|
||||
Patientobject.fromJson(Map<String, dynamic> json) {
|
||||
tempValue = json['TempValue'];
|
||||
patientIdentificationType = json['PatientIdentificationType'];
|
||||
patientIdentificationNo = json['PatientIdentificationNo'];
|
||||
mobileNumber = json['MobileNumber'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
firstNameN = json['FirstNameN'];
|
||||
middleNameN = json['MiddleNameN'];
|
||||
lastNameN = json['LastNameN'];
|
||||
firstName = json['FirstName'];
|
||||
middleName = json['MiddleName'];
|
||||
lastName = json['LastName'];
|
||||
strDateofBirth = json['StrDateofBirth'];
|
||||
dateofBirth = json['DateofBirth'];
|
||||
gender = json['Gender'];
|
||||
nationalityID = json['NationalityID'];
|
||||
dateofBirthN = json['DateofBirthN'];
|
||||
emailAddress = json['EmailAddress'];
|
||||
sourceType = json['SourceType'];
|
||||
preferredLanguage = json['PreferredLanguage'];
|
||||
marital = json['Marital'];
|
||||
eHealthIDField = json['eHealthIDField'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['TempValue'] = this.tempValue;
|
||||
data['PatientIdentificationType'] = this.patientIdentificationType;
|
||||
data['PatientIdentificationNo'] = this.patientIdentificationNo;
|
||||
data['MobileNumber'] = this.mobileNumber;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['FirstNameN'] = this.firstNameN;
|
||||
data['MiddleNameN'] = this.middleNameN;
|
||||
data['LastNameN'] = this.lastNameN;
|
||||
data['FirstName'] = this.firstName;
|
||||
data['MiddleName'] = this.middleName;
|
||||
data['LastName'] = this.lastName;
|
||||
data['StrDateofBirth'] = this.strDateofBirth;
|
||||
data['DateofBirth'] = this.dateofBirth;
|
||||
data['Gender'] = this.gender;
|
||||
data['NationalityID'] = this.nationalityID;
|
||||
data['DateofBirthN'] = this.dateofBirthN;
|
||||
data['EmailAddress'] = this.emailAddress;
|
||||
data['SourceType'] = this.sourceType;
|
||||
data['PreferredLanguage'] = this.preferredLanguage;
|
||||
data['Marital'] = this.marital;
|
||||
data['eHealthIDField'] = this.eHealthIDField;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
class SendActivationCodeByOTPNotificationTypeForRegistrationModel {
|
||||
int patientMobileNumber;
|
||||
String mobileNo;
|
||||
int projectOutSA;
|
||||
int loginType;
|
||||
String zipCode;
|
||||
bool isRegister;
|
||||
String logInTokenID;
|
||||
int searchType;
|
||||
int patientID;
|
||||
int nationalID;
|
||||
int patientIdentificationID;
|
||||
int oTPSendType;
|
||||
int languageID;
|
||||
double versionID;
|
||||
int channel;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
Null sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
String dOB;
|
||||
int isHijri;
|
||||
String healthId;
|
||||
|
||||
SendActivationCodeByOTPNotificationTypeForRegistrationModel(
|
||||
{this.patientMobileNumber,
|
||||
this.mobileNo,
|
||||
this.projectOutSA,
|
||||
this.loginType,
|
||||
this.zipCode,
|
||||
this.isRegister,
|
||||
this.logInTokenID,
|
||||
this.searchType,
|
||||
this.patientID,
|
||||
this.nationalID,
|
||||
this.patientIdentificationID,
|
||||
this.oTPSendType,
|
||||
this.languageID,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.dOB,
|
||||
this.isHijri,
|
||||
this.healthId});
|
||||
|
||||
SendActivationCodeByOTPNotificationTypeForRegistrationModel.fromJson(
|
||||
Map<String, dynamic> json) {
|
||||
patientMobileNumber = json['PatientMobileNumber'];
|
||||
mobileNo = json['MobileNo'];
|
||||
projectOutSA = json['ProjectOutSA'];
|
||||
loginType = json['LoginType'];
|
||||
zipCode = json['ZipCode'];
|
||||
isRegister = json['isRegister'];
|
||||
logInTokenID = json['LogInTokenID'];
|
||||
searchType = json['SearchType'];
|
||||
patientID = json['PatientID'];
|
||||
nationalID = json['NationalID'];
|
||||
patientIdentificationID = json['PatientIdentificationID'];
|
||||
oTPSendType = json['OTP_SendType'];
|
||||
languageID = json['LanguageID'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
dOB = json['DOB'];
|
||||
isHijri = json['IsHijri'];
|
||||
healthId = json['HealthId'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||
data['MobileNo'] = this.mobileNo;
|
||||
data['ProjectOutSA'] = this.projectOutSA;
|
||||
data['LoginType'] = this.loginType;
|
||||
data['ZipCode'] = this.zipCode;
|
||||
data['isRegister'] = this.isRegister;
|
||||
data['LogInTokenID'] = this.logInTokenID;
|
||||
data['SearchType'] = this.searchType;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['NationalID'] = this.nationalID;
|
||||
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||
data['OTP_SendType'] = this.oTPSendType;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['DOB'] = this.dOB;
|
||||
data['IsHijri'] = this.isHijri;
|
||||
data['HealthId'] = this.healthId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
class DiabeticType {
|
||||
int value;
|
||||
String nameEn;
|
||||
String nameAr;
|
||||
|
||||
DiabeticType({this.value, this.nameEn, this.nameAr});
|
||||
|
||||
DiabeticType.fromJson(Map<String, dynamic> json) {
|
||||
value = json['value'];
|
||||
nameEn = json['nameEn'];
|
||||
nameAr = json['nameAr'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['value'] = this.value;
|
||||
data['nameEn'] = this.nameEn;
|
||||
data['nameAr'] = this.nameAr;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
class GetDiabeticChartValuesRequestModel {
|
||||
int deviceTypeID;
|
||||
int patientID;
|
||||
int resultType;
|
||||
int admissionNo;
|
||||
String setupID;
|
||||
bool patientOutSA;
|
||||
int patientType;
|
||||
int patientTypeID;
|
||||
|
||||
GetDiabeticChartValuesRequestModel(
|
||||
{this.deviceTypeID,
|
||||
this.patientID,
|
||||
this.resultType,
|
||||
this.admissionNo,
|
||||
this.setupID,
|
||||
this.patientOutSA,
|
||||
this.patientType,
|
||||
this.patientTypeID});
|
||||
|
||||
GetDiabeticChartValuesRequestModel.fromJson(Map<String, dynamic> json) {
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
patientID = json['PatientID'];
|
||||
resultType = json['ResultType'];
|
||||
admissionNo = json['AdmissionNo'];
|
||||
setupID = json['SetupID'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
patientType = json['PatientType'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['ResultType'] = this.resultType;
|
||||
data['AdmissionNo'] = this.admissionNo;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
class GetDiabeticChartValuesResponseModel {
|
||||
String resultType;
|
||||
int admissionNo;
|
||||
String dateChart;
|
||||
int resultValue;
|
||||
int createdBy;
|
||||
String createdOn;
|
||||
|
||||
GetDiabeticChartValuesResponseModel(
|
||||
{this.resultType,
|
||||
this.admissionNo,
|
||||
this.dateChart,
|
||||
this.resultValue,
|
||||
this.createdBy,
|
||||
this.createdOn});
|
||||
|
||||
GetDiabeticChartValuesResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
resultType = json['ResultType'];
|
||||
admissionNo = json['AdmissionNo'];
|
||||
dateChart = json['DateChart'];
|
||||
resultValue = json['ResultValue'];
|
||||
createdBy = json['CreatedBy'];
|
||||
createdOn = json['CreatedOn'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ResultType'] = this.resultType;
|
||||
data['AdmissionNo'] = this.admissionNo;
|
||||
data['DateChart'] = this.dateChart;
|
||||
data['ResultValue'] = this.resultValue;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckActivationCodeModel.dart';
|
||||
import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart';
|
||||
import 'package:doctor_app_flutter/core/model/PatientRegistration/PatientRegistrationModel.dart';
|
||||
import 'package:doctor_app_flutter/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart';
|
||||
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||
|
||||
class PatientRegistrationService extends BaseService {
|
||||
checkPatientForRegistration(
|
||||
CheckPatientForRegistrationModel registrationModel) async {
|
||||
hasError = false;
|
||||
await baseAppClient.post(CHECK_PATIENT_FOR_REGISTRATION,
|
||||
onSuccess: (dynamic response, int statusCode) {},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: registrationModel.toJson());
|
||||
}
|
||||
|
||||
sendActivationCodeByOTPNotificationType(
|
||||
SendActivationCodeByOTPNotificationTypeForRegistrationModel
|
||||
registrationModel) async {
|
||||
hasError = false;
|
||||
await baseAppClient.post(SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE,
|
||||
onSuccess: (dynamic response, int statusCode) {},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: registrationModel.toJson());
|
||||
}
|
||||
|
||||
checkActivationCode(CheckActivationCodeModel registrationModel) async {
|
||||
hasError = false;
|
||||
await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_PATIENT,
|
||||
onSuccess: (dynamic response, int statusCode) {},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: registrationModel.toJson());
|
||||
}
|
||||
|
||||
registrationPatient(PatientRegistrationModel registrationModel) async {
|
||||
hasError = false;
|
||||
await baseAppClient.post(PATIENT_REGISTRATION,
|
||||
onSuccess: (dynamic response, int statusCode) {},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: registrationModel.toJson());
|
||||
}
|
||||
}
|
||||
@ -1,42 +1,68 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_operation_report_model.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_operation_report_request_model.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_operation_details_request_modle.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_operation_details_response_modle.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_reservations_response_model.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_reservations_request_model.dart';
|
||||
|
||||
class OperationReportService extends BaseService {
|
||||
List<GetOperationReportModel> get _operationReportList => List();
|
||||
List<GetOperationReportModel> get operationReportList => _operationReportList;
|
||||
List<GetReservationsResponseModel> _reservationList = [];
|
||||
List<GetReservationsResponseModel> get reservationList => _reservationList;
|
||||
|
||||
Future getOperationReport(
|
||||
{GetOperationReportRequestModel getOperationReportRequestModel,
|
||||
List<GetOperationDetailsResponseModel> _operationDetailsList = [];
|
||||
List<GetOperationDetailsResponseModel> get operationDetailsList => _operationDetailsList;
|
||||
|
||||
Future getReservations(
|
||||
{GetReservationsRequestModel getReservationsRequestModel,
|
||||
int patientId}) async {
|
||||
getOperationReportRequestModel =
|
||||
GetOperationReportRequestModel(patientID: patientId);
|
||||
getReservationsRequestModel =
|
||||
GetReservationsRequestModel(patientID: patientId, doctorID: "");
|
||||
|
||||
hasError = false;
|
||||
await baseAppClient.post(GET_OPERATION_REPORT,
|
||||
await baseAppClient.post(GET_RESERVATIONS,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
print("Success");
|
||||
_operationReportList.clear();
|
||||
_reservationList.clear();
|
||||
response['List_OTReservationDetails'].forEach(
|
||||
(v) {
|
||||
_operationReportList.add(GetOperationReportModel.fromJson(v));
|
||||
_reservationList.add(GetReservationsResponseModel.fromJson(v));
|
||||
},
|
||||
);
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: getOperationReportRequestModel.toJson());
|
||||
}, body: getReservationsRequestModel.toJson());
|
||||
}
|
||||
|
||||
Future updateOperationReport(CreateUpdateOperationReportRequestModel createUpdateOperationReport) async {
|
||||
await baseAppClient.post(UPDATE_OPERATION_REPORT,
|
||||
Future getOperationReportDetails(
|
||||
{GetOperationDetailsRequestModel getOperationReportRequestModel,
|
||||
}) async {
|
||||
|
||||
hasError = false;
|
||||
await baseAppClient.post(GET_OPERATION_DETAILS,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
print("Success");
|
||||
_operationDetailsList.clear();
|
||||
response['List_OperationDetails'].forEach(
|
||||
(v) {
|
||||
_operationDetailsList.add(GetOperationDetailsResponseModel.fromJson(v));
|
||||
},
|
||||
);
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: getOperationReportRequestModel.toJson());
|
||||
}
|
||||
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: createUpdateOperationReport.toJson(),isFallLanguage: true);
|
||||
Future updateOperationReport(
|
||||
CreateUpdateOperationReportRequestModel
|
||||
createUpdateOperationReport) async {
|
||||
await baseAppClient.post(UPDATE_OPERATION_REPORT,
|
||||
onSuccess: (dynamic response, int statusCode) {},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: createUpdateOperationReport.toJson(), isFallLanguage: true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||
|
||||
class PatientRegisterService extends BaseService{
|
||||
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
import 'package:doctor_app_flutter/core/service/patient/PatientRegisterService.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||
|
||||
import '../../locator.dart';
|
||||
|
||||
class PatientRegisterViewModel extends BaseViewModel {
|
||||
PatientRegisterService _service = locator<PatientRegisterService>();
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||
import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckActivationCodeModel.dart';
|
||||
import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart';
|
||||
import 'package:doctor_app_flutter/core/model/PatientRegistration/PatientRegistrationModel.dart';
|
||||
import 'package:doctor_app_flutter/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart';
|
||||
import 'package:doctor_app_flutter/core/service/PatientRegistrationService.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||
|
||||
import '../../locator.dart';
|
||||
|
||||
class PatientRegistrationViewModel extends BaseViewModel {
|
||||
PatientRegistrationService _patientRegistrationService =
|
||||
locator<PatientRegistrationService>();
|
||||
|
||||
Future checkPatientForRegistration(
|
||||
CheckPatientForRegistrationModel registrationModel) async {
|
||||
setState(ViewState.Busy);
|
||||
await _patientRegistrationService
|
||||
.checkPatientForRegistration(registrationModel);
|
||||
if (_patientRegistrationService.hasError) {
|
||||
error = _patientRegistrationService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
|
||||
Future sendActivationCodeByOTPNotificationType(
|
||||
SendActivationCodeByOTPNotificationTypeForRegistrationModel
|
||||
registrationModel) async {
|
||||
setState(ViewState.Busy);
|
||||
await _patientRegistrationService
|
||||
.sendActivationCodeByOTPNotificationType(registrationModel);
|
||||
if (_patientRegistrationService.hasError) {
|
||||
error = _patientRegistrationService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
|
||||
Future checkActivationCode(CheckActivationCodeModel registrationModel) async {
|
||||
setState(ViewState.Busy);
|
||||
await _patientRegistrationService.checkActivationCode(registrationModel);
|
||||
if (_patientRegistrationService.hasError) {
|
||||
error = _patientRegistrationService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
|
||||
Future registrationPatient(PatientRegistrationModel registrationModel) async {
|
||||
setState(ViewState.Busy);
|
||||
await _patientRegistrationService.registrationPatient(registrationModel);
|
||||
if (_patientRegistrationService.hasError) {
|
||||
error = _patientRegistrationService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
class GetOperationDetailsRequestModel {
|
||||
bool isDentalAllowedBackend;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int deviceTypeID;
|
||||
String tokenID;
|
||||
int patientID;
|
||||
int reservationNo;
|
||||
String sessionID;
|
||||
int projectID;
|
||||
String setupID;
|
||||
bool patientOutSA;
|
||||
|
||||
GetOperationDetailsRequestModel(
|
||||
{this.isDentalAllowedBackend = false,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.deviceTypeID,
|
||||
this.tokenID,
|
||||
this.patientID,
|
||||
this.reservationNo,
|
||||
this.sessionID,
|
||||
this.projectID,
|
||||
this.setupID,
|
||||
this.patientOutSA});
|
||||
|
||||
GetOperationDetailsRequestModel.fromJson(Map<String, dynamic> json) {
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
tokenID = json['TokenID'];
|
||||
patientID = json['PatientID'];
|
||||
reservationNo = json['reservationNo'];
|
||||
sessionID = json['SessionID'];
|
||||
projectID = json['ProjectID'];
|
||||
setupID = json['SetupID'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['reservationNo'] = this.reservationNo;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,148 @@
|
||||
class GetOperationDetailsResponseModel {
|
||||
String setupID;
|
||||
int projectID;
|
||||
int reservationNo;
|
||||
int patientID;
|
||||
int admissionID;
|
||||
dynamic surgeryDate;
|
||||
String preOpDiagnosis;
|
||||
String postOpDiagnosis;
|
||||
String surgeon;
|
||||
String assistant;
|
||||
String anasthetist;
|
||||
String operation;
|
||||
String inasion;
|
||||
String finding;
|
||||
String surgeryProcedure;
|
||||
String postOpInstruction;
|
||||
bool isActive;
|
||||
int createdBy;
|
||||
String createdName;
|
||||
dynamic createdNameN;
|
||||
String createdOn;
|
||||
dynamic editedBy;
|
||||
dynamic editedByName;
|
||||
dynamic editedByNameN;
|
||||
dynamic editedOn;
|
||||
dynamic oRBookStatus;
|
||||
String complicationDetail;
|
||||
String bloodLossDetail;
|
||||
String histopathSpecimen;
|
||||
String microbiologySpecimen;
|
||||
String otherSpecimen;
|
||||
dynamic scrubNurse;
|
||||
dynamic circulatingNurse;
|
||||
dynamic bloodTransfusedDetail;
|
||||
|
||||
GetOperationDetailsResponseModel(
|
||||
{this.setupID,
|
||||
this.projectID,
|
||||
this.reservationNo,
|
||||
this.patientID,
|
||||
this.admissionID,
|
||||
this.surgeryDate,
|
||||
this.preOpDiagnosis,
|
||||
this.postOpDiagnosis,
|
||||
this.surgeon,
|
||||
this.assistant,
|
||||
this.anasthetist,
|
||||
this.operation,
|
||||
this.inasion,
|
||||
this.finding,
|
||||
this.surgeryProcedure,
|
||||
this.postOpInstruction,
|
||||
this.isActive,
|
||||
this.createdBy,
|
||||
this.createdName,
|
||||
this.createdNameN,
|
||||
this.createdOn,
|
||||
this.editedBy,
|
||||
this.editedByName,
|
||||
this.editedByNameN,
|
||||
this.editedOn,
|
||||
this.oRBookStatus,
|
||||
this.complicationDetail,
|
||||
this.bloodLossDetail,
|
||||
this.histopathSpecimen,
|
||||
this.microbiologySpecimen,
|
||||
this.otherSpecimen,
|
||||
this.scrubNurse,
|
||||
this.circulatingNurse,
|
||||
this.bloodTransfusedDetail});
|
||||
|
||||
GetOperationDetailsResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
setupID = json['SetupID'];
|
||||
projectID = json['ProjectID'];
|
||||
reservationNo = json['ReservationNo'];
|
||||
patientID = json['PatientID'];
|
||||
admissionID = json['AdmissionID'];
|
||||
surgeryDate = json['SurgeryDate'];
|
||||
preOpDiagnosis = json['PreOpDiagnosis'];
|
||||
postOpDiagnosis = json['PostOpDiagnosis'];
|
||||
surgeon = json['Surgeon'];
|
||||
assistant = json['Assistant'];
|
||||
anasthetist = json['Anasthetist'];
|
||||
operation = json['Operation'];
|
||||
inasion = json['Inasion'];
|
||||
finding = json['Finding'];
|
||||
surgeryProcedure = json['SurgeryProcedure'];
|
||||
postOpInstruction = json['PostOpInstruction'];
|
||||
isActive = json['IsActive'];
|
||||
createdBy = json['CreatedBy'];
|
||||
createdName = json['CreatedName'];
|
||||
createdNameN = json['CreatedNameN'];
|
||||
createdOn = json['CreatedOn'];
|
||||
editedBy = json['EditedBy'];
|
||||
editedByName = json['EditedByName'];
|
||||
editedByNameN = json['EditedByNameN'];
|
||||
editedOn = json['EditedOn'];
|
||||
oRBookStatus = json['ORBookStatus'];
|
||||
complicationDetail = json['ComplicationDetail'];
|
||||
bloodLossDetail = json['BloodLossDetail'];
|
||||
histopathSpecimen = json['HistopathSpecimen'];
|
||||
microbiologySpecimen = json['MicrobiologySpecimen'];
|
||||
otherSpecimen = json['OtherSpecimen'];
|
||||
scrubNurse = json['ScrubNurse'];
|
||||
circulatingNurse = json['CirculatingNurse'];
|
||||
bloodTransfusedDetail = json['BloodTransfusedDetail'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['SetupID'] = this.setupID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ReservationNo'] = this.reservationNo;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['AdmissionID'] = this.admissionID;
|
||||
data['SurgeryDate'] = this.surgeryDate;
|
||||
data['PreOpDiagnosis'] = this.preOpDiagnosis;
|
||||
data['PostOpDiagnosis'] = this.postOpDiagnosis;
|
||||
data['Surgeon'] = this.surgeon;
|
||||
data['Assistant'] = this.assistant;
|
||||
data['Anasthetist'] = this.anasthetist;
|
||||
data['Operation'] = this.operation;
|
||||
data['Inasion'] = this.inasion;
|
||||
data['Finding'] = this.finding;
|
||||
data['SurgeryProcedure'] = this.surgeryProcedure;
|
||||
data['PostOpInstruction'] = this.postOpInstruction;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['CreatedName'] = this.createdName;
|
||||
data['CreatedNameN'] = this.createdNameN;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['EditedByName'] = this.editedByName;
|
||||
data['EditedByNameN'] = this.editedByNameN;
|
||||
data['EditedOn'] = this.editedOn;
|
||||
data['ORBookStatus'] = this.oRBookStatus;
|
||||
data['ComplicationDetail'] = this.complicationDetail;
|
||||
data['BloodLossDetail'] = this.bloodLossDetail;
|
||||
data['HistopathSpecimen'] = this.histopathSpecimen;
|
||||
data['MicrobiologySpecimen'] = this.microbiologySpecimen;
|
||||
data['OtherSpecimen'] = this.otherSpecimen;
|
||||
data['ScrubNurse'] = this.scrubNurse;
|
||||
data['CirculatingNurse'] = this.circulatingNurse;
|
||||
data['BloodTransfusedDetail'] = this.bloodTransfusedDetail;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,255 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||
import 'package:doctor_app_flutter/core/model/diabetic_chart/DiabeticType.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
|
||||
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart';
|
||||
import 'package:doctor_app_flutter/util/date-utils.dart';
|
||||
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
|
||||
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.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:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'diabetic_details_blood_pressurewideget.dart';
|
||||
|
||||
class DiabeticChart extends StatefulWidget {
|
||||
DiabeticChart({
|
||||
Key key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DiabeticChartState createState() => _DiabeticChartState();
|
||||
}
|
||||
|
||||
class _DiabeticChartState extends State<DiabeticChart> {
|
||||
List<TimeSeriesSales2> timeSeriesData1 = [];
|
||||
|
||||
List<TimeSeriesSales2> timeSeriesData2 = [];
|
||||
|
||||
List<DiabeticType> diabeticType = [
|
||||
DiabeticType(nameAr: "Urine Glucose", nameEn: "Urine Glucose", value: 1),
|
||||
DiabeticType(nameAr: "Urine Acet", nameEn: "Urine Acet", value: 2),
|
||||
DiabeticType(nameAr: "Blood Glucose", nameEn: "Blood Glucose", value: 3),
|
||||
DiabeticType(nameAr: "Blood Glucose(Glucometer)", nameEn: "Blood Glucose(Glucometer)", value: 4)
|
||||
];
|
||||
|
||||
DiabeticType selectedDiabeticType;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||
PatiantInformtion patient = routeArgs['patient'];
|
||||
ProjectViewModel projectsProvider = Provider.of(context);
|
||||
return BaseView<PatientViewModel>(
|
||||
onModelReady: (model) async {
|
||||
selectedDiabeticType = diabeticType[2];
|
||||
|
||||
await model.getDiabeticChartValues(patient, selectedDiabeticType.value, isLocalBusy: false);
|
||||
generateData(model);
|
||||
},
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
baseViewModel: model,
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
appBar: PatientProfileAppBar(
|
||||
patient,
|
||||
isInpatient: true,
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.7,
|
||||
child: DropdownButtonHideUnderline(
|
||||
child: DropdownButton(
|
||||
dropdownColor: Colors.white,
|
||||
iconEnabledColor: Colors.black,
|
||||
isExpanded: true,
|
||||
value: selectedDiabeticType.value,
|
||||
iconSize: 25,
|
||||
elevation: 16,
|
||||
selectedItemBuilder: (BuildContext context) {
|
||||
return diabeticType
|
||||
.map((item) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
|
||||
padding: EdgeInsets.all(2),
|
||||
margin: EdgeInsets.all(2),
|
||||
decoration: new BoxDecoration(
|
||||
color: Colors.red[800],
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
20),
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 20,
|
||||
minHeight: 20,
|
||||
),
|
||||
child: Center(
|
||||
child: AppText(
|
||||
diabeticType
|
||||
.length
|
||||
.toString(),
|
||||
color: Colors.white,
|
||||
fontSize: projectsProvider
|
||||
.isArabic
|
||||
? 10
|
||||
: 11,
|
||||
textAlign:
|
||||
TextAlign.center,
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
AppText(
|
||||
selectedDiabeticType.nameEn,
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
textAlign: TextAlign.end),
|
||||
],
|
||||
);
|
||||
}).toList();
|
||||
},
|
||||
onChanged: (newValue) async {
|
||||
await onChangeFunc(newValue, model, patient);
|
||||
setState(() {
|
||||
|
||||
});
|
||||
},
|
||||
items: diabeticType
|
||||
.map((item) {
|
||||
return DropdownMenuItem(
|
||||
child: AppText(
|
||||
item.nameEn,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
value: item.value,
|
||||
);
|
||||
}).toList(),
|
||||
)),
|
||||
),
|
||||
timeSeriesData1.length != 0 || timeSeriesData2.length != 0
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12)),
|
||||
child: LineChartForDiabetic(
|
||||
title: selectedDiabeticType.nameEn,
|
||||
isOX: false,
|
||||
timeSeries1: timeSeriesData1,
|
||||
// timeSeries2: timeSeriesData2,
|
||||
indexes: timeSeriesData1.length ~/ 5.5,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
horizontal: 8, vertical: 16),
|
||||
padding: EdgeInsets.only(
|
||||
top: 16, right: 18.0, left: 16.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12)),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
TranslationBase.of(context).graphDetails,
|
||||
fontSize: SizeConfig.textMultiplier * 2.3,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Poppins',
|
||||
),
|
||||
SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
DiabeticDetails(
|
||||
diabeticDetailsList:
|
||||
model.diabeticChartValuesList,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: ErrorMessage(error: TranslationBase.of(context).noItem),
|
||||
],
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
generateData(PatientViewModel model) {
|
||||
if (model.diabeticChartValuesList.length > 0) {
|
||||
model.diabeticChartValuesList.toList().forEach(
|
||||
(element) {
|
||||
DateTime elementDate =
|
||||
AppDateUtils.getDateTimeFromServerFormat(element.dateChart);
|
||||
if (element.resultValue.toInt() != 0)
|
||||
timeSeriesData1.add(
|
||||
TimeSeriesSales2(
|
||||
new DateTime(
|
||||
elementDate.year, elementDate.month, elementDate.day),
|
||||
element.resultValue.toDouble(),
|
||||
),
|
||||
);
|
||||
if (element.resultValue.toInt() != 0)
|
||||
timeSeriesData2.add(
|
||||
TimeSeriesSales2(
|
||||
new DateTime(
|
||||
elementDate.year, elementDate.month, elementDate.day),
|
||||
element.resultValue.toDouble(),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
onChangeFunc(newValue, PatientViewModel model, patient) async {
|
||||
GifLoaderDialogUtils.showMyDialog(context);
|
||||
setState(() {
|
||||
selectedDiabeticType = diabeticType[newValue-1];
|
||||
timeSeriesData1.clear();
|
||||
timeSeriesData2.clear();
|
||||
});
|
||||
|
||||
await model.getDiabeticChartValues(patient, selectedDiabeticType.value,isLocalBusy:true);
|
||||
if(model.state == ViewState.ErrorLocal){
|
||||
Helpers.showErrorToast(model.error);
|
||||
}
|
||||
generateData(model);
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
|
||||
import 'package:doctor_app_flutter/util/date-utils.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/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class DiabeticDetails extends StatefulWidget {
|
||||
final List<GetDiabeticChartValuesResponseModel> diabeticDetailsList;
|
||||
|
||||
DiabeticDetails(
|
||||
{Key key, this.diabeticDetailsList,});
|
||||
|
||||
@override
|
||||
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
|
||||
}
|
||||
|
||||
class _VitalSignDetailsWidgetState extends State<DiabeticDetails> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
return Container(
|
||||
margin: EdgeInsets.all(0),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
child: AppText(
|
||||
TranslationBase.of(context).date,
|
||||
fontSize: SizeConfig.textMultiplier * 1.5,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
fontFamily: 'Poppins',
|
||||
),
|
||||
// height: 60,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
child: Container(
|
||||
child: AppText(
|
||||
"Result",
|
||||
fontSize: SizeConfig.textMultiplier * 1.5,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Poppins',
|
||||
),
|
||||
// height: 60
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Divider(
|
||||
height: 1,
|
||||
thickness: 1,
|
||||
color: Colors.black,
|
||||
),
|
||||
Table(
|
||||
border: TableBorder(
|
||||
horizontalInside: BorderSide(width: 1.0, color: Colors.grey[300]),
|
||||
),
|
||||
children: fullData(projectViewModel),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
List<TableRow> fullData(ProjectViewModel projectViewModel) {
|
||||
List<TableRow> tableRow = [];
|
||||
widget.diabeticDetailsList.forEach((diabetic) {
|
||||
var data = diabetic.resultValue;
|
||||
DateTime elementDate =
|
||||
AppDateUtils.getDateTimeFromServerFormat(diabetic.dateChart);
|
||||
if (data != 0)
|
||||
tableRow.add(TableRow(children: [
|
||||
Container(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
color: Colors.white,
|
||||
child: AppText(
|
||||
'${projectViewModel.isArabic ? AppDateUtils.getWeekDayArabic(elementDate.weekday) : AppDateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? AppDateUtils.getMonthArabic(elementDate.month) : AppDateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${AppDateUtils.getHour(elementDate)}',
|
||||
// textAlign: TextAlign.center,
|
||||
fontSize: SizeConfig.textMultiplier * 1.6,
|
||||
fontWeight: FontWeight.w600,
|
||||
|
||||
fontFamily: 'Poppins',
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
color: Colors.white,
|
||||
child: AppText(
|
||||
'${diabetic.resultValue}',
|
||||
// textAlign: TextAlign.center,
|
||||
fontSize: SizeConfig.textMultiplier * 1.6,
|
||||
fontWeight: FontWeight.w600,
|
||||
|
||||
fontFamily: 'Poppins',
|
||||
),
|
||||
),
|
||||
),
|
||||
]));
|
||||
});
|
||||
return tableRow;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,237 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LineChartForDiabetic extends StatelessWidget {
|
||||
final String title;
|
||||
final List<TimeSeriesSales2> timeSeries1;
|
||||
final int indexes;
|
||||
final bool isOX;
|
||||
|
||||
LineChartForDiabetic(
|
||||
{this.title, this.timeSeries1, this.indexes, this.isOX= false});
|
||||
|
||||
List<int> xAxixs = List();
|
||||
List<double> yAxixs = List();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
getXaxix();
|
||||
return AspectRatio(
|
||||
aspectRatio: 1.1,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(18)),
|
||||
// color: Colors.white,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
const SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(right: 18.0, left: 16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
title,
|
||||
fontSize: SizeConfig.textMultiplier * 2.1,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Poppins',
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(right: 18.0, left: 16.0, top: 15),
|
||||
child: LineChart(
|
||||
sampleData1(context),
|
||||
swapAnimationDuration: const Duration(milliseconds: 250),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
getXaxix() {
|
||||
for (int index = 0; index < timeSeries1.length; index++) {
|
||||
int mIndex = indexes * index;
|
||||
if (mIndex < timeSeries1.length) {
|
||||
xAxixs.add(mIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LineChartData sampleData1(context) {
|
||||
return LineChartData(
|
||||
lineTouchData: LineTouchData(
|
||||
touchTooltipData: LineTouchTooltipData(
|
||||
tooltipBgColor: Colors.white,
|
||||
),
|
||||
touchCallback: (LineTouchResponse touchResponse) {},
|
||||
handleBuiltInTouches: true,
|
||||
),
|
||||
gridData: FlGridData(
|
||||
show: true, drawVerticalLine: true, drawHorizontalLine: true),
|
||||
titlesData: FlTitlesData(
|
||||
bottomTitles: SideTitles(
|
||||
showTitles: true,
|
||||
getTextStyles: (value) => const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 10,
|
||||
),
|
||||
rotateAngle: -65,
|
||||
//rotateAngle:-65,
|
||||
interval: 100,
|
||||
margin: 22,
|
||||
getTitles: (value) {
|
||||
if (timeSeries1.length < 15) {
|
||||
if (timeSeries1.length > value.toInt()) {
|
||||
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
|
||||
} else
|
||||
return '';
|
||||
} else {
|
||||
if (value.toInt() == 0)
|
||||
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
|
||||
if (value.toInt() == timeSeries1.length - 1)
|
||||
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
|
||||
if (xAxixs.contains(value.toInt())) {
|
||||
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
),
|
||||
leftTitles: SideTitles(
|
||||
showTitles: true,
|
||||
getTextStyles: (value) => const TextStyle(
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 10,
|
||||
),
|
||||
interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200,
|
||||
|
||||
margin: 12,
|
||||
),
|
||||
),
|
||||
borderData: FlBorderData(
|
||||
show: true,
|
||||
border: const Border(
|
||||
bottom: BorderSide(
|
||||
color: Colors.black,
|
||||
width: 0.5,
|
||||
),
|
||||
left: BorderSide(
|
||||
color: Colors.black,
|
||||
),
|
||||
right: BorderSide(
|
||||
color: Colors.black,
|
||||
),
|
||||
top: BorderSide(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
),
|
||||
),
|
||||
minX: 0,
|
||||
maxX: (timeSeries1.length - 1).toDouble(),
|
||||
maxY: getMaxY() + 0.3,
|
||||
minY: getMinY(),
|
||||
lineBarsData: getData(context),
|
||||
);
|
||||
}
|
||||
|
||||
double getMaxY() {
|
||||
double max = 0;
|
||||
timeSeries1.forEach((element) {
|
||||
double resultValueDouble = element.sales;
|
||||
if (resultValueDouble > max) max = resultValueDouble;
|
||||
});
|
||||
// timeSeries2.forEach((element) {
|
||||
// double resultValueDouble = element.sales;
|
||||
// if (resultValueDouble > max) max = resultValueDouble;
|
||||
// });
|
||||
|
||||
return max.roundToDouble();
|
||||
}
|
||||
|
||||
double getMinY() {
|
||||
double min = timeSeries1[0].sales;
|
||||
timeSeries1.forEach((element) {
|
||||
double resultValueDouble = element.sales;
|
||||
if (resultValueDouble < min) min = resultValueDouble;
|
||||
});
|
||||
// timeSeries2.forEach((element) {
|
||||
// double resultValueDouble = element.sales;
|
||||
// if (resultValueDouble < min) min = resultValueDouble;
|
||||
// });
|
||||
|
||||
int value = min.toInt();
|
||||
|
||||
return value.toDouble();
|
||||
}
|
||||
|
||||
List<LineChartBarData> getData(context) {
|
||||
List<FlSpot> spots = List();
|
||||
for (int index = 0; index < timeSeries1.length; index++) {
|
||||
spots.add(FlSpot(index.toDouble(), timeSeries1[index].sales));
|
||||
}
|
||||
|
||||
List<FlSpot> spots2 = List();
|
||||
// for (int index = 0; index < timeSeries2.length; index++) {
|
||||
// spots2.add(FlSpot(index.toDouble(), timeSeries2[index].sales));
|
||||
// }
|
||||
|
||||
final LineChartBarData lineChartBarData1 = LineChartBarData(
|
||||
spots: spots,
|
||||
isCurved: true,
|
||||
colors: [Colors.red],
|
||||
barWidth: 5,
|
||||
isStrokeCapRound: true,
|
||||
dotData: FlDotData(
|
||||
show: false,
|
||||
),
|
||||
belowBarData: BarAreaData(
|
||||
show: false,
|
||||
),
|
||||
);
|
||||
final LineChartBarData lineChartBarData2 = LineChartBarData(
|
||||
spots: spots2,
|
||||
isCurved: true,
|
||||
colors: [Colors.red],
|
||||
barWidth: 5,
|
||||
isStrokeCapRound: true,
|
||||
dotData: FlDotData(
|
||||
show: false,
|
||||
),
|
||||
belowBarData: BarAreaData(
|
||||
show: false,
|
||||
),
|
||||
);
|
||||
|
||||
List<LineChartBarData> lineChartData = List();
|
||||
if(spots.isNotEmpty){
|
||||
lineChartData.add(lineChartBarData1);
|
||||
}
|
||||
if(spots2.isNotEmpty){
|
||||
lineChartData.add(lineChartBarData2);
|
||||
}
|
||||
return lineChartData;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,87 @@
|
||||
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomEditableText extends StatefulWidget {
|
||||
CustomEditableText({
|
||||
Key key,
|
||||
@required this.controller,
|
||||
this.hint,
|
||||
this.isEditable = false,
|
||||
}) : super(key: key);
|
||||
|
||||
final TextEditingController controller;
|
||||
|
||||
final String hint;
|
||||
bool isEditable;
|
||||
|
||||
@override
|
||||
_CustomEditableTextState createState() => _CustomEditableTextState();
|
||||
}
|
||||
|
||||
class _CustomEditableTextState extends State<CustomEditableText> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
if(!widget.isEditable)
|
||||
Container(
|
||||
height: 60,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[300],
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
border: Border.fromBorderSide(
|
||||
BorderSide(
|
||||
color: Colors.grey[300],
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(widget.hint, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
widget.controller.text,
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
InkWell(
|
||||
child: Icon(
|
||||
DoctorApp.edit_1,
|
||||
size: 20,
|
||||
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
widget.isEditable = true;
|
||||
});
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if(widget.isEditable)
|
||||
AppTextFieldCustom(
|
||||
hintText: widget.hint,
|
||||
//TranslationBase.of(context).addoperationReports,
|
||||
controller: widget.controller,
|
||||
maxLines: 1,
|
||||
minLines: 1,
|
||||
hasBorder: true,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,342 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
|
||||
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
|
||||
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
|
||||
import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/operation_report_view_model.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
|
||||
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
||||
import 'package:doctor_app_flutter/util/helpers.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_texts_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/speech-text-popup.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:speech_to_text/speech_recognition_error.dart';
|
||||
import 'package:speech_to_text/speech_to_text.dart' as stt;
|
||||
|
||||
import 'CustomEditableText.dart';
|
||||
|
||||
class RegisterConfirmationPatientPage extends StatefulWidget {
|
||||
final OperationReportViewModel operationReportViewModel;
|
||||
final PatiantInformtion patient;
|
||||
final int visitType;
|
||||
final bool isUpdate;
|
||||
|
||||
const RegisterConfirmationPatientPage(
|
||||
{Key key,
|
||||
this.operationReportViewModel,
|
||||
this.patient,
|
||||
this.visitType,
|
||||
this.isUpdate})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_RegisterConfirmationPatientPageState createState() =>
|
||||
_RegisterConfirmationPatientPageState();
|
||||
}
|
||||
|
||||
class _RegisterConfirmationPatientPageState
|
||||
extends State<RegisterConfirmationPatientPage> {
|
||||
int selectedType;
|
||||
bool isSubmitted = false;
|
||||
stt.SpeechToText speech = stt.SpeechToText();
|
||||
var reconizedWord;
|
||||
var event = RobotProvider();
|
||||
ProjectViewModel projectViewModel;
|
||||
TextEditingController firstName = TextEditingController(text: "Elham");
|
||||
TextEditingController middleName = TextEditingController(text: "Ali");
|
||||
TextEditingController lastName = TextEditingController(text: "Rababah");
|
||||
TextEditingController emailAddressController = TextEditingController(text: "Elham@Rababah.com");
|
||||
|
||||
setSelectedType(int val) {
|
||||
setState(() {
|
||||
selectedType = val;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
projectViewModel = Provider.of(context);
|
||||
return AppScaffold(
|
||||
isShowAppBar: false,
|
||||
backgroundColor: Color(0xFFF8F8F8),
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height * 1.0,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(0.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Center(
|
||||
child: FractionallySizedBox(
|
||||
widthFactor: 0.9,
|
||||
child: Column(
|
||||
children: [
|
||||
CustomEditableText(
|
||||
controller: firstName, hint: TranslationBase.of(context).firstName),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
CustomEditableText(
|
||||
controller: middleName, hint: TranslationBase.of(context).middleName),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
CustomEditableText(
|
||||
controller: lastName, hint: TranslationBase.of(context).lastName),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
|
||||
FractionallySizedBox(
|
||||
widthFactor: .9,
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(TranslationBase.of(context).healthID, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
"123456",
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(TranslationBase.of(context).identityNumber, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
"ss",
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 20,)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(TranslationBase.of(context).nationality, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
"Jordanian",
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(TranslationBase.of(context).occupation, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
"--",
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 20,)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(TranslationBase.of(context).mobileNo, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
"075XXXXXX",
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 20,)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
AppTextFieldCustom(
|
||||
height: Helpers.getTextFieldHeight(),
|
||||
enabled: false,
|
||||
onClick: () {
|
||||
// MasterKeyDailog dialog =
|
||||
// MasterKeyDailog(
|
||||
// list:
|
||||
// model.medicationDoseTimeList,
|
||||
// okText:
|
||||
// TranslationBase.of(context)
|
||||
// .ok,
|
||||
// selectedValue:
|
||||
// _selectedMedicationDose,
|
||||
// okFunction: (selectedValue) {
|
||||
// setState(() {
|
||||
// _selectedMedicationDose =
|
||||
// selectedValue;
|
||||
//
|
||||
// doseController
|
||||
// .text = projectViewModel
|
||||
// .isArabic
|
||||
// ? _selectedMedicationDose
|
||||
// .nameAr
|
||||
// : _selectedMedicationDose
|
||||
// .nameEn;
|
||||
// });
|
||||
// },
|
||||
// );
|
||||
// showDialog(
|
||||
// barrierDismissible: false,
|
||||
// context: context,
|
||||
// builder: (BuildContext context) {
|
||||
// return dialog;
|
||||
// },
|
||||
// );
|
||||
},
|
||||
hintText:
|
||||
TranslationBase.of(context).maritalStatus,
|
||||
maxLines: 1,
|
||||
minLines: 1,
|
||||
isTextFieldHasSuffix: true,
|
||||
// controller: doseController,
|
||||
// validationError: isFormSubmitted &&
|
||||
// _selectedMedicationDose == null
|
||||
// ? TranslationBase.of(context)
|
||||
// .emptyMessage
|
||||
// : null,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
AppTextFieldCustom(
|
||||
height: Helpers.getTextFieldHeight(),
|
||||
enabled: false,
|
||||
onClick: () {
|
||||
// MasterKeyDailog dialog =
|
||||
// MasterKeyDailog(
|
||||
// list:
|
||||
// model.medicationDoseTimeList,
|
||||
// okText:
|
||||
// TranslationBase.of(context)
|
||||
// .ok,
|
||||
// selectedValue:
|
||||
// _selectedMedicationDose,
|
||||
// okFunction: (selectedValue) {
|
||||
// setState(() {
|
||||
// _selectedMedicationDose =
|
||||
// selectedValue;
|
||||
//
|
||||
// doseController
|
||||
// .text = projectViewModel
|
||||
// .isArabic
|
||||
// ? _selectedMedicationDose
|
||||
// .nameAr
|
||||
// : _selectedMedicationDose
|
||||
// .nameEn;
|
||||
// });
|
||||
// },
|
||||
// );
|
||||
// showDialog(
|
||||
// barrierDismissible: false,
|
||||
// context: context,
|
||||
// builder: (BuildContext context) {
|
||||
// return dialog;
|
||||
// },
|
||||
// );
|
||||
},
|
||||
hintText:
|
||||
TranslationBase.of(context).lanEnglish,
|
||||
maxLines: 1,
|
||||
minLines: 1,
|
||||
isTextFieldHasSuffix: true,
|
||||
// controller: doseController,
|
||||
// validationError: isFormSubmitted &&
|
||||
// _selectedMedicationDose == null
|
||||
// ? TranslationBase.of(context)
|
||||
// .emptyMessage
|
||||
// : null,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
AppTextFieldCustom(
|
||||
hintText: "Email Address",
|
||||
//TranslationBase.of(context).addoperationReports,
|
||||
controller: emailAddressController,
|
||||
maxLines: 1,
|
||||
minLines: 1,
|
||||
hasBorder: true,
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
height: 400,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue