Merge branches 'develop' and 'master' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into develop
commit
40a0c1281a
@ -0,0 +1,7 @@
|
|||||||
|
/// Sample linear data type.
|
||||||
|
class ChartAxis {
|
||||||
|
final int xAxis;
|
||||||
|
final int yAxis;
|
||||||
|
|
||||||
|
ChartAxis(this.xAxis, this.yAxis);
|
||||||
|
}
|
||||||
@ -0,0 +1,221 @@
|
|||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||||
|
|
||||||
|
MyReferredPatientModel myReferredPatientModelFromJson(String str) => MyReferredPatientModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String myReferredPatientModelToJson(MyReferredPatientModel data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class MyReferredPatientModel {
|
||||||
|
MyReferredPatientModel({
|
||||||
|
this.projectId,
|
||||||
|
this.lineItemNo,
|
||||||
|
this.doctorId,
|
||||||
|
this.patientId,
|
||||||
|
this.doctorName,
|
||||||
|
this.doctorNameN,
|
||||||
|
this.firstName,
|
||||||
|
this.middleName,
|
||||||
|
this.lastName,
|
||||||
|
this.firstNameN,
|
||||||
|
this.middleNameN,
|
||||||
|
this.lastNameN,
|
||||||
|
this.gender,
|
||||||
|
this.dateofBirth,
|
||||||
|
this.mobileNumber,
|
||||||
|
this.emailAddress,
|
||||||
|
this.patientIdentificationNo,
|
||||||
|
this.patientType,
|
||||||
|
this.admissionNo,
|
||||||
|
this.admissionDate,
|
||||||
|
this.roomId,
|
||||||
|
this.bedId,
|
||||||
|
this.nursingStationId,
|
||||||
|
this.description,
|
||||||
|
this.nationalityName,
|
||||||
|
this.nationalityNameN,
|
||||||
|
this.clinicDescription,
|
||||||
|
this.clinicDescriptionN,
|
||||||
|
this.referralDoctor,
|
||||||
|
this.referringDoctor,
|
||||||
|
this.referralClinic,
|
||||||
|
this.referringClinic,
|
||||||
|
this.referralStatus,
|
||||||
|
this.referralDate,
|
||||||
|
this.referringDoctorRemarks,
|
||||||
|
this.referredDoctorRemarks,
|
||||||
|
this.referralResponseOn,
|
||||||
|
this.priority,
|
||||||
|
this.frequency,
|
||||||
|
this.maxResponseTime,
|
||||||
|
this.dischargeDate,
|
||||||
|
this.age,
|
||||||
|
this.frequencyDescription,
|
||||||
|
this.genderDescription,
|
||||||
|
this.isDoctorLate,
|
||||||
|
this.isDoctorResponse,
|
||||||
|
this.nursingStationName,
|
||||||
|
this.priorityDescription,
|
||||||
|
this.referralClinicDescription,
|
||||||
|
this.referralDoctorName,
|
||||||
|
});
|
||||||
|
|
||||||
|
int projectId;
|
||||||
|
int lineItemNo;
|
||||||
|
int doctorId;
|
||||||
|
int patientId;
|
||||||
|
String doctorName;
|
||||||
|
dynamic doctorNameN;
|
||||||
|
String firstName;
|
||||||
|
String middleName;
|
||||||
|
String lastName;
|
||||||
|
dynamic firstNameN;
|
||||||
|
dynamic middleNameN;
|
||||||
|
dynamic lastNameN;
|
||||||
|
int gender;
|
||||||
|
String dateofBirth;
|
||||||
|
String mobileNumber;
|
||||||
|
String emailAddress;
|
||||||
|
String patientIdentificationNo;
|
||||||
|
int patientType;
|
||||||
|
String admissionNo;
|
||||||
|
String admissionDate;
|
||||||
|
String roomId;
|
||||||
|
String bedId;
|
||||||
|
dynamic nursingStationId;
|
||||||
|
dynamic description;
|
||||||
|
String nationalityName;
|
||||||
|
dynamic nationalityNameN;
|
||||||
|
String clinicDescription;
|
||||||
|
dynamic clinicDescriptionN;
|
||||||
|
int referralDoctor;
|
||||||
|
int referringDoctor;
|
||||||
|
int referralClinic;
|
||||||
|
int referringClinic;
|
||||||
|
int referralStatus;
|
||||||
|
String referralDate;
|
||||||
|
String referringDoctorRemarks;
|
||||||
|
String referredDoctorRemarks;
|
||||||
|
String referralResponseOn;
|
||||||
|
int priority;
|
||||||
|
int frequency;
|
||||||
|
DateTime maxResponseTime;
|
||||||
|
dynamic dischargeDate;
|
||||||
|
String age;
|
||||||
|
String frequencyDescription;
|
||||||
|
String genderDescription;
|
||||||
|
bool isDoctorLate;
|
||||||
|
bool isDoctorResponse;
|
||||||
|
String nursingStationName;
|
||||||
|
String priorityDescription;
|
||||||
|
String referralClinicDescription;
|
||||||
|
String referralDoctorName;
|
||||||
|
|
||||||
|
factory MyReferredPatientModel.fromJson(Map<String, dynamic> json) => MyReferredPatientModel(
|
||||||
|
projectId: json["ProjectID"],
|
||||||
|
lineItemNo: json["LineItemNo"],
|
||||||
|
doctorId: json["DoctorID"],
|
||||||
|
patientId: json["PatientID"],
|
||||||
|
doctorName: json["DoctorName"],
|
||||||
|
doctorNameN: json["DoctorNameN"],
|
||||||
|
firstName: json["FirstName"],
|
||||||
|
middleName: json["MiddleName"],
|
||||||
|
lastName: json["LastName"],
|
||||||
|
firstNameN: json["FirstNameN"],
|
||||||
|
middleNameN: json["MiddleNameN"],
|
||||||
|
lastNameN: json["LastNameN"],
|
||||||
|
gender: json["Gender"],
|
||||||
|
dateofBirth: json["DateofBirth"],
|
||||||
|
mobileNumber: json["MobileNumber"],
|
||||||
|
emailAddress: json["EmailAddress"],
|
||||||
|
patientIdentificationNo: json["PatientIdentificationNo"],
|
||||||
|
patientType: json["PatientType"],
|
||||||
|
admissionNo: json["AdmissionNo"],
|
||||||
|
admissionDate: json["AdmissionDate"],
|
||||||
|
roomId: json["RoomID"],
|
||||||
|
bedId: json["BedID"],
|
||||||
|
nursingStationId: json["NursingStationID"],
|
||||||
|
description: json["Description"],
|
||||||
|
nationalityName: json["NationalityName"],
|
||||||
|
nationalityNameN: json["NationalityNameN"],
|
||||||
|
clinicDescription: json["ClinicDescription"],
|
||||||
|
clinicDescriptionN: json["ClinicDescriptionN"],
|
||||||
|
referralDoctor: json["ReferralDoctor"],
|
||||||
|
referringDoctor: json["ReferringDoctor"],
|
||||||
|
referralClinic: json["ReferralClinic"],
|
||||||
|
referringClinic: json["ReferringClinic"],
|
||||||
|
referralStatus: json["ReferralStatus"],
|
||||||
|
referralDate: json["ReferralDate"],
|
||||||
|
referringDoctorRemarks: json["ReferringDoctorRemarks"],
|
||||||
|
referredDoctorRemarks: json["ReferredDoctorRemarks"],
|
||||||
|
referralResponseOn: json["ReferralResponseOn"],
|
||||||
|
priority: json["Priority"],
|
||||||
|
frequency: json["Frequency"],
|
||||||
|
maxResponseTime: Helpers.convertStringToDate(json['MAXResponseTime']),//json["MAXResponseTime"],
|
||||||
|
dischargeDate: json["DischargeDate"],
|
||||||
|
age: json["Age"],
|
||||||
|
frequencyDescription: json["FrequencyDescription"],
|
||||||
|
genderDescription: json["GenderDescription"],
|
||||||
|
isDoctorLate: json["IsDoctorLate"],
|
||||||
|
isDoctorResponse: json["IsDoctorResponse"],
|
||||||
|
nursingStationName: json["NursingStationName"],
|
||||||
|
priorityDescription: json["PriorityDescription"],
|
||||||
|
referralClinicDescription: json["ReferralClinicDescription"],
|
||||||
|
referralDoctorName: json["ReferralDoctorName"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"ProjectID": projectId,
|
||||||
|
"LineItemNo": lineItemNo,
|
||||||
|
"DoctorID": doctorId,
|
||||||
|
"PatientID": patientId,
|
||||||
|
"DoctorName": doctorName,
|
||||||
|
"DoctorNameN": doctorNameN,
|
||||||
|
"FirstName": firstName,
|
||||||
|
"MiddleName": middleName,
|
||||||
|
"LastName": lastName,
|
||||||
|
"FirstNameN": firstNameN,
|
||||||
|
"MiddleNameN": middleNameN,
|
||||||
|
"LastNameN": lastNameN,
|
||||||
|
"Gender": gender,
|
||||||
|
"DateofBirth": dateofBirth,
|
||||||
|
"MobileNumber": mobileNumber,
|
||||||
|
"EmailAddress": emailAddress,
|
||||||
|
"PatientIdentificationNo": patientIdentificationNo,
|
||||||
|
"PatientType": patientType,
|
||||||
|
"AdmissionNo": admissionNo,
|
||||||
|
"AdmissionDate": admissionDate,
|
||||||
|
"RoomID": roomId,
|
||||||
|
"BedID": bedId,
|
||||||
|
"NursingStationID": nursingStationId,
|
||||||
|
"Description": description,
|
||||||
|
"NationalityName": nationalityName,
|
||||||
|
"NationalityNameN": nationalityNameN,
|
||||||
|
"ClinicDescription": clinicDescription,
|
||||||
|
"ClinicDescriptionN": clinicDescriptionN,
|
||||||
|
"ReferralDoctor": referralDoctor,
|
||||||
|
"ReferringDoctor": referringDoctor,
|
||||||
|
"ReferralClinic": referralClinic,
|
||||||
|
"ReferringClinic": referringClinic,
|
||||||
|
"ReferralStatus": referralStatus,
|
||||||
|
"ReferralDate": referralDate,
|
||||||
|
"ReferringDoctorRemarks": referringDoctorRemarks,
|
||||||
|
"ReferredDoctorRemarks": referredDoctorRemarks,
|
||||||
|
"ReferralResponseOn": referralResponseOn,
|
||||||
|
"Priority": priority,
|
||||||
|
"Frequency": frequency,
|
||||||
|
"MAXResponseTime": maxResponseTime,
|
||||||
|
"DischargeDate": dischargeDate,
|
||||||
|
"Age": age,
|
||||||
|
"FrequencyDescription": frequencyDescription,
|
||||||
|
"GenderDescription": genderDescription,
|
||||||
|
"IsDoctorLate": isDoctorLate,
|
||||||
|
"IsDoctorResponse": isDoctorResponse,
|
||||||
|
"NursingStationName": nursingStationName,
|
||||||
|
"PriorityDescription": priorityDescription,
|
||||||
|
"ReferralClinicDescription": referralClinicDescription,
|
||||||
|
"ReferralDoctorName": referralDoctorName,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,124 @@
|
|||||||
|
class LabResult {
|
||||||
|
String setupID;
|
||||||
|
int projectID;
|
||||||
|
int orderNo;
|
||||||
|
int lineItemNo;
|
||||||
|
int packageID;
|
||||||
|
int testID;
|
||||||
|
String description;
|
||||||
|
String resultValue;
|
||||||
|
String referenceRange;
|
||||||
|
Null convertedResultValue;
|
||||||
|
Null convertedReferenceRange;
|
||||||
|
Null resultValueFlag;
|
||||||
|
int status;
|
||||||
|
String createdBy;
|
||||||
|
Null createdByN;
|
||||||
|
String createdOn;
|
||||||
|
String editedBy;
|
||||||
|
Null editedByN;
|
||||||
|
String editedOn;
|
||||||
|
String verifiedBy;
|
||||||
|
Null verifiedByN;
|
||||||
|
String verifiedOn;
|
||||||
|
Null patientID;
|
||||||
|
int gender;
|
||||||
|
Null maleInterpretativeData;
|
||||||
|
Null femaleInterpretativeData;
|
||||||
|
String testCode;
|
||||||
|
String statusDescription;
|
||||||
|
|
||||||
|
LabResult(
|
||||||
|
{this.setupID,
|
||||||
|
this.projectID,
|
||||||
|
this.orderNo,
|
||||||
|
this.lineItemNo,
|
||||||
|
this.packageID,
|
||||||
|
this.testID,
|
||||||
|
this.description,
|
||||||
|
this.resultValue,
|
||||||
|
this.referenceRange,
|
||||||
|
this.convertedResultValue,
|
||||||
|
this.convertedReferenceRange,
|
||||||
|
this.resultValueFlag,
|
||||||
|
this.status,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdByN,
|
||||||
|
this.createdOn,
|
||||||
|
this.editedBy,
|
||||||
|
this.editedByN,
|
||||||
|
this.editedOn,
|
||||||
|
this.verifiedBy,
|
||||||
|
this.verifiedByN,
|
||||||
|
this.verifiedOn,
|
||||||
|
this.patientID,
|
||||||
|
this.gender,
|
||||||
|
this.maleInterpretativeData,
|
||||||
|
this.femaleInterpretativeData,
|
||||||
|
this.testCode,
|
||||||
|
this.statusDescription});
|
||||||
|
|
||||||
|
LabResult.fromJson(Map<String, dynamic> json) {
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
orderNo = json['OrderNo'];
|
||||||
|
lineItemNo = json['LineItemNo'];
|
||||||
|
packageID = json['PackageID'];
|
||||||
|
testID = json['TestID'];
|
||||||
|
description = json['Description'];
|
||||||
|
resultValue = json['ResultValue'];
|
||||||
|
referenceRange = json['ReferenceRange'];
|
||||||
|
convertedResultValue = json['ConvertedResultValue'];
|
||||||
|
convertedReferenceRange = json['ConvertedReferenceRange'];
|
||||||
|
resultValueFlag = json['ResultValueFlag'];
|
||||||
|
status = json['Status'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
createdByN = json['CreatedByN'];
|
||||||
|
createdOn = json['CreatedOn'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
editedByN = json['EditedByN'];
|
||||||
|
editedOn = json['EditedOn'];
|
||||||
|
verifiedBy = json['VerifiedBy'];
|
||||||
|
verifiedByN = json['VerifiedByN'];
|
||||||
|
verifiedOn = json['VerifiedOn'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
gender = json['Gender'];
|
||||||
|
maleInterpretativeData = json['MaleInterpretativeData'];
|
||||||
|
femaleInterpretativeData = json['FemaleInterpretativeData'];
|
||||||
|
testCode = json['TestCode'];
|
||||||
|
statusDescription = json['StatusDescription'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['OrderNo'] = this.orderNo;
|
||||||
|
data['LineItemNo'] = this.lineItemNo;
|
||||||
|
data['PackageID'] = this.packageID;
|
||||||
|
data['TestID'] = this.testID;
|
||||||
|
data['Description'] = this.description;
|
||||||
|
data['ResultValue'] = this.resultValue;
|
||||||
|
data['ReferenceRange'] = this.referenceRange;
|
||||||
|
data['ConvertedResultValue'] = this.convertedResultValue;
|
||||||
|
data['ConvertedReferenceRange'] = this.convertedReferenceRange;
|
||||||
|
data['ResultValueFlag'] = this.resultValueFlag;
|
||||||
|
data['Status'] = this.status;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['CreatedByN'] = this.createdByN;
|
||||||
|
data['CreatedOn'] = this.createdOn;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['EditedByN'] = this.editedByN;
|
||||||
|
data['EditedOn'] = this.editedOn;
|
||||||
|
data['VerifiedBy'] = this.verifiedBy;
|
||||||
|
data['VerifiedByN'] = this.verifiedByN;
|
||||||
|
data['VerifiedOn'] = this.verifiedOn;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['Gender'] = this.gender;
|
||||||
|
data['MaleInterpretativeData'] = this.maleInterpretativeData;
|
||||||
|
data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
|
||||||
|
data['TestCode'] = this.testCode;
|
||||||
|
data['StatusDescription'] = this.statusDescription;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
class RequestLabResult {
|
||||||
|
int projectID;
|
||||||
|
String setupID;
|
||||||
|
int orderNo;
|
||||||
|
int invoiceNo;
|
||||||
|
int patientTypeID;
|
||||||
|
int languageID;
|
||||||
|
String stamp;
|
||||||
|
String iPAdress;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
String tokenID;
|
||||||
|
String sessionID;
|
||||||
|
bool isLoginForDoctorApp;
|
||||||
|
bool patientOutSA;
|
||||||
|
|
||||||
|
RequestLabResult(
|
||||||
|
{this.projectID,
|
||||||
|
this.setupID,
|
||||||
|
this.orderNo,
|
||||||
|
this.invoiceNo,
|
||||||
|
this.patientTypeID,
|
||||||
|
this.languageID,
|
||||||
|
this.stamp,
|
||||||
|
this.iPAdress,
|
||||||
|
this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.tokenID,
|
||||||
|
this.sessionID,
|
||||||
|
this.isLoginForDoctorApp,
|
||||||
|
this.patientOutSA});
|
||||||
|
|
||||||
|
RequestLabResult.fromJson(Map<String, dynamic> json) {
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
orderNo = json['OrderNo'];
|
||||||
|
invoiceNo = json['InvoiceNo'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
stamp = json['stamp'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['OrderNo'] = this.orderNo;
|
||||||
|
data['InvoiceNo'] = this.invoiceNo;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
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;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
|
||||||
|
class VerifyReferralDoctorRemarks {
|
||||||
|
int projectID;
|
||||||
|
String admissionNo;
|
||||||
|
int lineItemNo;
|
||||||
|
String referredDoctorRemarks;
|
||||||
|
int editedBy;
|
||||||
|
int patientID;
|
||||||
|
int referringDoctor;
|
||||||
|
int languageID;
|
||||||
|
String stamp;
|
||||||
|
String iPAdress;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
String tokenID;
|
||||||
|
String sessionID;
|
||||||
|
bool isLoginForDoctorApp;
|
||||||
|
bool patientOutSA;
|
||||||
|
String firstName;
|
||||||
|
|
||||||
|
String middleName;
|
||||||
|
String lastName;
|
||||||
|
String patientMobileNumber;
|
||||||
|
String patientIdentificationID;
|
||||||
|
|
||||||
|
VerifyReferralDoctorRemarks(
|
||||||
|
{this.projectID,
|
||||||
|
this.admissionNo,
|
||||||
|
this.lineItemNo,
|
||||||
|
this.referredDoctorRemarks,
|
||||||
|
this.editedBy,
|
||||||
|
this.patientID,
|
||||||
|
this.referringDoctor,
|
||||||
|
this.languageID = LANGUAGE_ID,
|
||||||
|
this.stamp = STAMP,
|
||||||
|
this.iPAdress = IP_ADDRESS,
|
||||||
|
this.versionID = VERSION_ID,
|
||||||
|
this.channel= CHANNEL,
|
||||||
|
this.tokenID,
|
||||||
|
this.sessionID = SESSION_ID,
|
||||||
|
this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP,
|
||||||
|
this.patientOutSA = PATIENT_OUT_SA,
|
||||||
|
this.firstName,
|
||||||
|
this.middleName,
|
||||||
|
this.lastName,
|
||||||
|
this.patientMobileNumber,
|
||||||
|
this.patientIdentificationID,
|
||||||
|
});
|
||||||
|
|
||||||
|
VerifyReferralDoctorRemarks.fromJson(Map<String, dynamic> json) {
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
|
lineItemNo = json['LineItemNo'];
|
||||||
|
referredDoctorRemarks = json['ReferredDoctorRemarks'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
referringDoctor = json['ReferringDoctor'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
stamp = json['stamp'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
firstName= json["FirstName"];
|
||||||
|
middleName= json["MiddleName"];
|
||||||
|
lastName= json["LastName"];
|
||||||
|
patientMobileNumber= json["PatientMobileNumber"];
|
||||||
|
patientIdentificationID = json["PatientIdentificationID"];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
data['LineItemNo'] = this.lineItemNo;
|
||||||
|
data['ReferredDoctorRemarks'] = this.referredDoctorRemarks;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['ReferringDoctor'] = this.referringDoctor;
|
||||||
|
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;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['FirstName'] = this.firstName;
|
||||||
|
data['MiddleName'] = this.middleName;
|
||||||
|
data['LastName'] = this.lastName;
|
||||||
|
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||||
|
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
||||||
|
//import 'package:doctor_app_flutter/models/my_referral_patient_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/my_referred_patient_model.dart';
|
||||||
|
//import 'package:doctor_app_flutter/models/my_referred_patient_model.dart';
|
||||||
|
//import 'package:doctor_app_flutter/models/request_add_referred_doctor_remarks.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/request_my_referral_patient_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/verify_referral_doctor_remarks.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
|
||||||
|
class MyReferredPatientProvider with ChangeNotifier {
|
||||||
|
List<MyReferredPatientModel> listMyReferredPatientModel = [];
|
||||||
|
|
||||||
|
bool isLoading = true;
|
||||||
|
bool isError = false;
|
||||||
|
String error = '';
|
||||||
|
|
||||||
|
RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel();
|
||||||
|
// RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();
|
||||||
|
VerifyReferralDoctorRemarks _verifyreferraldoctorremarks = VerifyReferralDoctorRemarks();
|
||||||
|
MyReferredPatientProvider() {
|
||||||
|
getMyReferralPatient();
|
||||||
|
}
|
||||||
|
|
||||||
|
getMyReferralPatient() async {
|
||||||
|
try {
|
||||||
|
await BaseAppClient.post(
|
||||||
|
'DoctorApplication.svc/REST/GtMyReferredPatient',
|
||||||
|
body: _requestMyReferralPatient.toJson(),
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
response['List_MyReferredPatient'].forEach((v) {
|
||||||
|
listMyReferredPatientModel.add(MyReferredPatientModel.fromJson(v));
|
||||||
|
});
|
||||||
|
isError = false;
|
||||||
|
isLoading = false;
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
isError = true;
|
||||||
|
isLoading = false;
|
||||||
|
this.error = error;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
notifyListeners();
|
||||||
|
} catch (error) {
|
||||||
|
isLoading = false;
|
||||||
|
isError = true;
|
||||||
|
this.error = 'Something wrong happened, please contact the admin';
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future replay(
|
||||||
|
// String referredDoctorRemarks, MyReferredPatientModel model) async {
|
||||||
|
Future replay(
|
||||||
|
MyReferredPatientModel model) async {
|
||||||
|
try {
|
||||||
|
|
||||||
|
_verifyreferraldoctorremarks.patientID=model.projectId;
|
||||||
|
_verifyreferraldoctorremarks.admissionNo =model.admissionNo;
|
||||||
|
_verifyreferraldoctorremarks.lineItemNo = model.lineItemNo;
|
||||||
|
|
||||||
|
_verifyreferraldoctorremarks.referredDoctorRemarks=model.referredDoctorRemarks;
|
||||||
|
_verifyreferraldoctorremarks.referringDoctor=model.referringDoctor;
|
||||||
|
_verifyreferraldoctorremarks.firstName=model.firstName;
|
||||||
|
_verifyreferraldoctorremarks.middleName=model.middleName;
|
||||||
|
_verifyreferraldoctorremarks.lastName=model.lastName;
|
||||||
|
_verifyreferraldoctorremarks.patientMobileNumber=model.mobileNumber;
|
||||||
|
_verifyreferraldoctorremarks.patientIdentificationID=model.patientIdentificationNo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
await BaseAppClient.post(
|
||||||
|
'DoctorApplication.svc/REST/GtMyReferredPatient',
|
||||||
|
body: _verifyreferraldoctorremarks.toJson(),//_requestAddReferredDoctorRemarks.toJson(),
|
||||||
|
onSuccess: (dynamic body, int statusCode) {
|
||||||
|
|
||||||
|
listMyReferredPatientModel[
|
||||||
|
listMyReferredPatientModel.indexOf(model)] = model;
|
||||||
|
notifyListeners();
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
throw (error);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
import 'package:doctor_app_flutter/providers/referred_patient_provider.dart';
|
||||||
|
import 'package:doctor_app_flutter/providers/schedule_provider.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/doctor/my_referred_patient_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/doctor/my_schedule_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:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../widgets/shared/app_scaffold_widget.dart';
|
||||||
|
|
||||||
|
class MyReferredPatient extends StatelessWidget {
|
||||||
|
|
||||||
|
MyReferredPatientProvider referredPatientProvider;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
referredPatientProvider = Provider.of(context);
|
||||||
|
return AppScaffold(
|
||||||
|
showBottomBar: false,
|
||||||
|
showAppDrawer: false,
|
||||||
|
appBarTitle: TranslationBase.of(context).mySchedule,
|
||||||
|
body: referredPatientProvider.isLoading
|
||||||
|
? DrAppCircularProgressIndeicator()
|
||||||
|
: referredPatientProvider.isError
|
||||||
|
? Center(
|
||||||
|
child: AppText(
|
||||||
|
referredPatientProvider.error,
|
||||||
|
color: Theme.of(context).errorColor,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
: referredPatientProvider.listMyReferredPatientModel.length == 0
|
||||||
|
? Center(
|
||||||
|
child: AppText(
|
||||||
|
TranslationBase.of(context).errorNoSchedule,
|
||||||
|
color: Theme.of(context).errorColor,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Container(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0),
|
||||||
|
child: ListView(
|
||||||
|
children: <Widget>[
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
child: Column(
|
||||||
|
//children: referredPatientProvider.listMyReferralPatientModel.map((item) {
|
||||||
|
children: referredPatientProvider.listMyReferredPatientModel.map((item) {
|
||||||
|
return MyReferredPatientWidget(
|
||||||
|
myReferredPatientModel: item,
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/lab_orders_res_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/providers/patients_provider.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/doctor/lab_result_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:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class LabResult extends StatefulWidget {
|
||||||
|
final LabOrdersResModel labOrders;
|
||||||
|
|
||||||
|
LabResult({Key key, this.labOrders});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_LabResultState createState() => _LabResultState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LabResultState extends State<LabResult> {
|
||||||
|
PatientsProvider patientsProv;
|
||||||
|
bool _isInit = true;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeDependencies() {
|
||||||
|
super.didChangeDependencies();
|
||||||
|
if (_isInit) {
|
||||||
|
patientsProv = Provider.of<PatientsProvider>(context);
|
||||||
|
patientsProv.getLabResult(widget.labOrders);
|
||||||
|
// getLabResultOrders(context);
|
||||||
|
}
|
||||||
|
_isInit = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
appBarTitle: "Lab Orders",
|
||||||
|
showAppDrawer: false,
|
||||||
|
showBottomBar: false,
|
||||||
|
body: patientsProv.isLoading
|
||||||
|
? DrAppCircularProgressIndeicator()
|
||||||
|
: patientsProv.isError
|
||||||
|
? DrAppEmbeddedError(error: patientsProv.error)
|
||||||
|
: patientsProv.labResultList.length == 0
|
||||||
|
? DrAppEmbeddedError(error: 'You don\'t have any Orders')
|
||||||
|
: Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(
|
||||||
|
SizeConfig.realScreenWidth * 0.05,
|
||||||
|
0,
|
||||||
|
SizeConfig.realScreenWidth * 0.05,
|
||||||
|
0),
|
||||||
|
child: ListView(
|
||||||
|
children: <Widget>[
|
||||||
|
CardWithBgWidgetNew(
|
||||||
|
widget: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
' Invoice No :',
|
||||||
|
fontSize:
|
||||||
|
2 * SizeConfig.textMultiplier,
|
||||||
|
color: Colors.grey[800],
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
' ${widget.labOrders.invoiceNo}',
|
||||||
|
fontSize:
|
||||||
|
2 * SizeConfig.textMultiplier,
|
||||||
|
color: Colors.grey[800],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
CardWithBgWidgetNew(widget: LabResultWidget(labResult: patientsProv.labResultList,))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,143 +1,180 @@
|
|||||||
import 'package:charts_flutter/flutter.dart' as charts;
|
import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
|
||||||
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/models/patient/vital_sign_res_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/providers/patients_provider.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_ding_chart_and_detials.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/charts/app_time_series_chart.dart';
|
||||||
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
|
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class BodyMeasurementsScreen extends StatelessWidget {
|
class BodyMeasurementsScreen extends StatelessWidget {
|
||||||
BodyMeasurementsScreen();
|
BodyMeasurementsScreen();
|
||||||
List<VitalSignResModel> vitalList;
|
// ;
|
||||||
|
PatientsProvider patientsProv;
|
||||||
|
List<VitalSignResModel> vitalList = [];
|
||||||
|
String pageTitle;
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
_seriesData = List<charts.Series<Pollution, String>>();
|
patientsProv = Provider.of<PatientsProvider>(context);
|
||||||
_seriesPieData = List<charts.Series<Task, String>>();
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
_seriesLineData = List<charts.Series<Sales, int>>();
|
pageTitle = routeArgs['title'];
|
||||||
_generateData();
|
var pageKey = routeArgs['key'];
|
||||||
return AppScaffold(
|
List<Map> VSchart;
|
||||||
appBarTitle: 'Body Measurements',
|
vitalList = patientsProv.patientVitalSignOrderdSubList;
|
||||||
body: RoundedContainer(
|
switch (pageKey) {
|
||||||
height: SizeConfig.realScreenHeight*0.4,
|
case vitalSignDetails.bodyMeasurements:
|
||||||
child: Padding(
|
VSchart = [
|
||||||
padding: EdgeInsets.all(8.0),
|
{
|
||||||
child: Container(
|
'name': 'Highet',
|
||||||
child: Center(
|
'title1': 'Date',
|
||||||
child: Column(
|
'title2': 'Cm',
|
||||||
children: <Widget>[
|
'viewKey': 'HeightCm',
|
||||||
Text(
|
},
|
||||||
'Body Mass Index',
|
{
|
||||||
style: TextStyle(
|
'name': 'Weight Kg',
|
||||||
fontSize: 24.0, fontWeight: FontWeight.bold),
|
'title1': 'Date',
|
||||||
),
|
'title2': 'Kg',
|
||||||
Expanded(
|
'viewKey': 'WeightKg',
|
||||||
child: charts.BarChart(
|
},
|
||||||
_seriesData,
|
{
|
||||||
animate: true,
|
'name': 'BodyMassIndex',
|
||||||
barGroupingType: charts.BarGroupingType.grouped,
|
'title1': 'Date',
|
||||||
// behaviors: [new charts.SeriesLegend()],
|
'title2': 'BodyMass',
|
||||||
// primaryMeasureAxis: ,
|
'viewKey': 'BodyMassIndex',
|
||||||
animationDuration: Duration(seconds: 1),
|
},
|
||||||
),
|
{
|
||||||
),
|
'name': 'HeadCircumCm',
|
||||||
],
|
'title1': 'Date',
|
||||||
),
|
'title2': 'Cm',
|
||||||
),
|
'viewKey': 'HeadCircumCm',
|
||||||
),
|
},
|
||||||
),
|
{
|
||||||
),
|
'name': 'Ideal Body Weight (Lbs)',
|
||||||
);
|
'title1': 'Date',
|
||||||
}
|
'title2': 'Ideal Weight',
|
||||||
|
'viewKey': 'IdealBodyWeightLbs',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': 'LeanBodyWeightLbs (Lbs)',
|
||||||
|
'title1': 'Date',
|
||||||
|
'title2': 'Lean Weight',
|
||||||
|
'viewKey': 'LeanBodyWeightLbs',
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
List<charts.Series<Pollution, String>> _seriesData;
|
break;
|
||||||
List<charts.Series<Task, String>> _seriesPieData;
|
|
||||||
List<charts.Series<Sales, int>> _seriesLineData;
|
|
||||||
|
|
||||||
_generateData() {
|
case vitalSignDetails.temperature:
|
||||||
var data1 = [
|
VSchart = [
|
||||||
new Pollution(1980, 'USA', 40),
|
{
|
||||||
];
|
'name': 'Temperature In Celcius',
|
||||||
|
'title1': 'Date',
|
||||||
|
'title2': 'C',
|
||||||
|
'viewKey': 'TemperatureCelcius',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
_seriesData.add(
|
break;
|
||||||
charts.Series(
|
case vitalSignDetails.pulse:
|
||||||
domainFn: (Pollution pollution, _) => '',
|
VSchart = [
|
||||||
measureFn: (Pollution pollution, _) => pollution.quantity,
|
{
|
||||||
id: '2017',
|
'name': 'Pulse Beat Per Minute',
|
||||||
data: data1,
|
'title1': 'Date',
|
||||||
fillPatternFn: (_, __) => charts.FillPatternType.solid,
|
'title2': 'Minute',
|
||||||
fillColorFn: (Pollution pollution, _) =>
|
'viewKey': 'PulseBeatPerMinute',
|
||||||
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)),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
case vitalSignDetails.pespiration:
|
||||||
}
|
VSchart = [
|
||||||
|
{
|
||||||
|
'name': 'Respiration Beat Per Minute',
|
||||||
|
'title1': 'Date',
|
||||||
|
'title2': 'Beat Per Minute',
|
||||||
|
'viewKey': 'RespirationBeatPerMinute',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
break;
|
||||||
|
case vitalSignDetails.bloodPressure:
|
||||||
|
VSchart = [
|
||||||
|
{
|
||||||
|
'name': 'Blood Pressure Higher',
|
||||||
|
'title1': 'Date',
|
||||||
|
'title2': 'Minute',
|
||||||
|
'viewKey': 'BloodPressureHigher',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': 'Blood Pressure Lower',
|
||||||
|
'title1': 'Date',
|
||||||
|
'title2': 'Minute',
|
||||||
|
'viewKey': 'BloodPressureLower',
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
break;
|
||||||
|
case vitalSignDetails.oxygenation:
|
||||||
|
VSchart = [
|
||||||
|
{
|
||||||
|
'name': 'FIO2',
|
||||||
|
'title1': 'Date',
|
||||||
|
'title2': 'Cm',
|
||||||
|
'viewKey': 'FIO2',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': 'SAO2',
|
||||||
|
'title1': 'Date',
|
||||||
|
'title2': 'Cm',
|
||||||
|
'viewKey': 'SAO2',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
class Pollution {
|
break;
|
||||||
String place;
|
case vitalSignDetails.painScale:
|
||||||
int year;
|
VSchart = [
|
||||||
int quantity;
|
{
|
||||||
|
'name': 'PainScore',
|
||||||
|
'title1': 'Date',
|
||||||
|
'title2': 'Cm',
|
||||||
|
'viewKey': 'PainScore',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
Pollution(this.year, this.place, this.quantity);
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
// generateData();
|
||||||
|
return AppScaffold(
|
||||||
|
appBarTitle: pageTitle,
|
||||||
|
body: ListView(
|
||||||
|
children: VSchart.map((chartInfo) {
|
||||||
|
var vitalListTemp = vitalList.where((element) => element.toJson()[chartInfo['viewKey']] != null,);
|
||||||
|
return vitalListTemp.length !=0 ? VitalSingChartAndDetials(
|
||||||
|
vitalList: vitalList,
|
||||||
|
name: chartInfo['name'],
|
||||||
|
title1: chartInfo['title1'],
|
||||||
|
title2: chartInfo['title2'],
|
||||||
|
viewKey: chartInfo['viewKey']) : Container();
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Task {
|
class LinearSales {
|
||||||
String task;
|
final int year;
|
||||||
double taskvalue;
|
final int sales;
|
||||||
Color colorval;
|
|
||||||
|
|
||||||
Task(this.task, this.taskvalue, this.colorval);
|
LinearSales(this.year, this.sales);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Sales {
|
/// Sample time series data type.
|
||||||
int yearval;
|
class TimeSeriesSales {
|
||||||
int salesval;
|
final DateTime time;
|
||||||
|
final int sales;
|
||||||
|
|
||||||
Sales(this.yearval, this.salesval);
|
TimeSeriesSales(this.time, this.sales);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,39 @@
|
|||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/vital_sign_details_wideget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/charts/app_time_series_chart.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
class VitalSingChartAndDetials extends StatelessWidget {
|
||||||
|
VitalSingChartAndDetials({
|
||||||
|
Key key,
|
||||||
|
@required this.vitalList,
|
||||||
|
@required this.name,
|
||||||
|
@required this.viewKey,
|
||||||
|
@required this.title1,
|
||||||
|
@required this.title2,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final List<VitalSignResModel> vitalList ;
|
||||||
|
final String name;
|
||||||
|
final String viewKey;
|
||||||
|
final String title1;
|
||||||
|
final String title2;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: <Widget>[
|
||||||
|
AppTimeSeriesChart(
|
||||||
|
vitalList: vitalList,
|
||||||
|
chartName: name,
|
||||||
|
viewKey: viewKey,
|
||||||
|
),
|
||||||
|
VitalSignDetailsWidget(
|
||||||
|
vitalList: vitalList.reversed.toList(),
|
||||||
|
title1: '${title1}',
|
||||||
|
title2: '${title2}',
|
||||||
|
viewKey: '${viewKey}',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,174 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/lab_result.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class LabResultWidget extends StatefulWidget {
|
||||||
|
final List<LabResult> labResult;
|
||||||
|
|
||||||
|
LabResultWidget({Key key, this.labResult});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_LabResultWidgetState createState() => _LabResultWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LabResultWidgetState extends State<LabResultWidget> {
|
||||||
|
bool _showDetails = true;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
'General Result',
|
||||||
|
fontSize: 2.5 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_showDetails = !_showDetails;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(_showDetails
|
||||||
|
? Icons.keyboard_arrow_up
|
||||||
|
: Icons.keyboard_arrow_down)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
color: Colors.grey,
|
||||||
|
height: 0.5,
|
||||||
|
),
|
||||||
|
!_showDetails
|
||||||
|
? Container()
|
||||||
|
: AnimatedContainer(
|
||||||
|
duration: Duration(microseconds: 200),
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||||
|
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: widget.labResult.map((result) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(10)),
|
||||||
|
border: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
color: Colors.grey, width: 0.5),
|
||||||
|
top: BorderSide(
|
||||||
|
color: Colors.grey, width: 0.5),
|
||||||
|
left: BorderSide(
|
||||||
|
color: Colors.grey, width: 0.5),
|
||||||
|
right: BorderSide(
|
||||||
|
color: Colors.grey, width: 0.5),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
margin: EdgeInsets.only(top: 10),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Hexcolor('#515B5D'),
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'Description',
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
height: 60,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
color: Hexcolor('#515B5D'),
|
||||||
|
child: Center(
|
||||||
|
child: Texts('Value', color: Colors.white),
|
||||||
|
),
|
||||||
|
height: 60),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Hexcolor('#515B5D'),
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topRight: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts('Range', color: Colors.white),
|
||||||
|
),
|
||||||
|
height: 60),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'${result.description}',
|
||||||
|
color: Colors.grey[800],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
height: 60,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'${result.resultValue}',
|
||||||
|
color: Colors.grey[800]),
|
||||||
|
),
|
||||||
|
height: 60),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'${result.referenceRange}',
|
||||||
|
color: Colors.grey[800]),
|
||||||
|
),
|
||||||
|
height: 60),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,354 @@
|
|||||||
|
|
||||||
|
import 'package:doctor_app_flutter/models/my_referral_patient_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/my_referred_patient_model.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
|
||||||
|
import 'package:doctor_app_flutter/providers/referred_patient_provider.dart';
|
||||||
|
|
||||||
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class MyReferredPatientWidget extends StatefulWidget {
|
||||||
|
|
||||||
|
final MyReferredPatientModel myReferredPatientModel;
|
||||||
|
|
||||||
|
MyReferredPatientWidget({Key key, this.myReferredPatientModel});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_MyReferredPatientWidgetState createState() => _MyReferredPatientWidgetState();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
|
||||||
|
|
||||||
|
bool _showDetails = false;
|
||||||
|
bool _isLoading = false;
|
||||||
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
String error;
|
||||||
|
TextEditingController answerController;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CardWithBgWidgetNew(
|
||||||
|
widget: Container(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
'${widget.myReferredPatientModel.firstName} ${widget.myReferredPatientModel.lastName}',
|
||||||
|
fontSize: 2.5 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_showDetails = !_showDetails;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Icon(_showDetails
|
||||||
|
? Icons.keyboard_arrow_up
|
||||||
|
: Icons.keyboard_arrow_down)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
!_showDetails
|
||||||
|
? Container()
|
||||||
|
: AnimatedContainer(
|
||||||
|
duration: Duration(milliseconds: 200),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Divider(color: Colors.grey),
|
||||||
|
|
||||||
|
// VerticalDivider(color: Colors.black,
|
||||||
|
// thickness: 2, width: 20,
|
||||||
|
// indent: 200,
|
||||||
|
// endIndent: 200,),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
'File No',
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'${widget.myReferredPatientModel.patientId}',
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: SizeConfig.realScreenWidth * .1,//0.1,
|
||||||
|
width: 0.8,
|
||||||
|
color: Colors.grey,
|
||||||
|
margin: EdgeInsets.only(left: 15, right: 15),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
'Referral Doctor',
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
Texts(
|
||||||
|
widget.myReferredPatientModel
|
||||||
|
.referralDoctorName,
|
||||||
|
maxLength: 80,
|
||||||
|
readMore: true,
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Divider(color: Colors.grey),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
'Referring Clinic',
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'${widget.myReferredPatientModel.referralClinicDescription}',
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: SizeConfig.realScreenWidth * 0.1,
|
||||||
|
width: 0.8,
|
||||||
|
color: Colors.grey,
|
||||||
|
margin: EdgeInsets.only(left: 15, right: 15),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
'Frequency',
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
widget.myReferredPatientModel
|
||||||
|
.frequencyDescription,
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Divider(color: Colors.grey),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
'Priority',
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'${widget.myReferredPatientModel.priorityDescription}',
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: SizeConfig.realScreenWidth * 0.1,
|
||||||
|
width: 0.8,
|
||||||
|
color: Colors.grey,
|
||||||
|
margin: EdgeInsets.only(left: 15, right: 15),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
'Max Response Time',
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
Helpers.getDateFormatted(widget
|
||||||
|
.myReferredPatientModel
|
||||||
|
.maxResponseTime),
|
||||||
|
fontSize:
|
||||||
|
1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Divider(color: Colors.grey),
|
||||||
|
AppText(
|
||||||
|
'Clinic Details and Remarks',
|
||||||
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
|
||||||
|
Texts(
|
||||||
|
'${widget.myReferredPatientModel.referringDoctorRemarks}',
|
||||||
|
style: "bodyText1",
|
||||||
|
readMore: true,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
maxLength: 100),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'Answer/Suggestions',
|
||||||
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
|
||||||
|
Texts(
|
||||||
|
'${widget.myReferredPatientModel.referredDoctorRemarks}',
|
||||||
|
style: "bodyText1",
|
||||||
|
readMore: true,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
maxLength: 100),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 10.0),
|
||||||
|
if (error != null && error.isNotEmpty)
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(6.0),
|
||||||
|
color: Theme.of(context)
|
||||||
|
.errorColor
|
||||||
|
.withOpacity(0.06),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: 8.0, horizontal: 12.0),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Texts(error ?? "",
|
||||||
|
style: "bodyText1",
|
||||||
|
color: Theme.of(context)
|
||||||
|
.errorColor)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 10.0),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 10.0),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Button(
|
||||||
|
onTap: () async {
|
||||||
|
final form = _formKey.currentState;
|
||||||
|
|
||||||
|
try {
|
||||||
|
await Provider.of<MyReferredPatientProvider>(context, listen: false).replay(widget.myReferredPatientModel);
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_isLoading = false;
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
setState(() {
|
||||||
|
error = e.toString();
|
||||||
|
_isLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
title: 'Verify',
|
||||||
|
loading: _isLoading,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,118 @@
|
|||||||
|
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class VitalSignDetailsWidget extends StatefulWidget {
|
||||||
|
final List<VitalSignResModel> vitalList;
|
||||||
|
final String title1;
|
||||||
|
final String title2;
|
||||||
|
final String viewKey;
|
||||||
|
|
||||||
|
VitalSignDetailsWidget({Key key, this.vitalList, this.title1, this.title2,this.viewKey});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.transparent,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
margin: EdgeInsets.all(20),
|
||||||
|
child: Container(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Hexcolor('#515B5D'),
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
widget.title1,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
height: 60,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Hexcolor('#515B5D'),
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topRight: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(widget.title2, color: Colors.white),
|
||||||
|
),
|
||||||
|
height: 60),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: widget.vitalList.map((vital) {
|
||||||
|
return Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
height: 50,
|
||||||
|
color: Colors.white,
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'${Helpers.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${Helpers.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 2,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
height: 50,
|
||||||
|
color: Colors.white,
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
'${vital.toJson()[widget.viewKey]}',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 2,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
|
class AppLineChart extends StatelessWidget {
|
||||||
|
const AppLineChart({
|
||||||
|
Key key,
|
||||||
|
@required this.seriesList,
|
||||||
|
this.chartTitle,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final List<charts.Series> seriesList;
|
||||||
|
|
||||||
|
final String chartTitle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
'Body Mass Index',
|
||||||
|
style: TextStyle(fontSize: 24.0, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: charts.LineChart(seriesList,
|
||||||
|
defaultRenderer: new charts.LineRendererConfig(
|
||||||
|
includeArea: false, stacked: true),
|
||||||
|
animate: true),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
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/screens/patients/profile/vital_sign/body_measurements_screen.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AppTimeSeriesChart extends StatelessWidget {
|
||||||
|
AppTimeSeriesChart(
|
||||||
|
{Key key,
|
||||||
|
@required this.vitalList,
|
||||||
|
@required this.viewKey,
|
||||||
|
this.chartName = ''});
|
||||||
|
|
||||||
|
final List<VitalSignResModel> vitalList;
|
||||||
|
final String chartName;
|
||||||
|
final String viewKey;
|
||||||
|
List<charts.Series> seriesList;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
seriesList = generateData();
|
||||||
|
return RoundedContainer(
|
||||||
|
height: SizeConfig.realScreenHeight * 0.47,
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
chartName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: SizeConfig.textMultiplier * 3),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: SizeConfig.realScreenHeight * 0.37,
|
||||||
|
child: Center(
|
||||||
|
child: Expanded(
|
||||||
|
child: charts.TimeSeriesChart(
|
||||||
|
seriesList,
|
||||||
|
animate: true,
|
||||||
|
behaviors: [
|
||||||
|
new charts.RangeAnnotation(
|
||||||
|
[
|
||||||
|
new charts.RangeAnnotationSegment(
|
||||||
|
DateTime(
|
||||||
|
vitalList[vitalList.length - 1]
|
||||||
|
.vitalSignDate
|
||||||
|
.year,
|
||||||
|
vitalList[vitalList.length - 1]
|
||||||
|
.vitalSignDate
|
||||||
|
.month +
|
||||||
|
3,
|
||||||
|
vitalList[vitalList.length - 1]
|
||||||
|
.vitalSignDate
|
||||||
|
.day),
|
||||||
|
vitalList[0].vitalSignDate,
|
||||||
|
charts.RangeAnnotationAxisType.domain),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
generateData() {
|
||||||
|
final List<TimeSeriesSales> data = [];
|
||||||
|
if (vitalList.length > 0) {
|
||||||
|
vitalList.forEach(
|
||||||
|
(element) {
|
||||||
|
data.add(
|
||||||
|
TimeSeriesSales(
|
||||||
|
new DateTime(element.vitalSignDate.year,
|
||||||
|
element.vitalSignDate.month, element.vitalSignDate.day),
|
||||||
|
element.toJson()[viewKey].toInt(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return [
|
||||||
|
new charts.Series<TimeSeriesSales, DateTime>(
|
||||||
|
id: 'Sales',
|
||||||
|
domainFn: (TimeSeriesSales sales, _) => sales.time,
|
||||||
|
measureFn: (TimeSeriesSales sales, _) => sales.sales,
|
||||||
|
data: data,
|
||||||
|
)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue