Merge branch 'master' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into amjad_amireh
Conflicts: lib/config/localized_values.dartmerge-update-with-lab-changes
commit
8e96c79d05
@ -1,6 +1,6 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
#Thu Sep 03 16:26:30 EEST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
@ -0,0 +1,88 @@
|
||||
class LabResult {
|
||||
String description;
|
||||
Null femaleInterpretativeData;
|
||||
int gender;
|
||||
int lineItemNo;
|
||||
Null maleInterpretativeData;
|
||||
String notes;
|
||||
String packageID;
|
||||
int patientID;
|
||||
String projectID;
|
||||
String referanceRange;
|
||||
String resultValue;
|
||||
String sampleCollectedOn;
|
||||
String sampleReceivedOn;
|
||||
String setupID;
|
||||
Null superVerifiedOn;
|
||||
String testCode;
|
||||
String uOM;
|
||||
String verifiedOn;
|
||||
Null verifiedOnDateTime;
|
||||
|
||||
LabResult(
|
||||
{this.description,
|
||||
this.femaleInterpretativeData,
|
||||
this.gender,
|
||||
this.lineItemNo,
|
||||
this.maleInterpretativeData,
|
||||
this.notes,
|
||||
this.packageID,
|
||||
this.patientID,
|
||||
this.projectID,
|
||||
this.referanceRange,
|
||||
this.resultValue,
|
||||
this.sampleCollectedOn,
|
||||
this.sampleReceivedOn,
|
||||
this.setupID,
|
||||
this.superVerifiedOn,
|
||||
this.testCode,
|
||||
this.uOM,
|
||||
this.verifiedOn,
|
||||
this.verifiedOnDateTime});
|
||||
|
||||
LabResult.fromJson(Map<String, dynamic> json) {
|
||||
description = json['Description'];
|
||||
femaleInterpretativeData = json['FemaleInterpretativeData'];
|
||||
gender = json['Gender'];
|
||||
lineItemNo = json['LineItemNo'];
|
||||
maleInterpretativeData = json['MaleInterpretativeData'];
|
||||
notes = json['Notes'];
|
||||
packageID = json['PackageID'];
|
||||
patientID = json['PatientID'];
|
||||
projectID = json['ProjectID'];
|
||||
referanceRange = json['ReferanceRange'];
|
||||
resultValue = json['ResultValue'];
|
||||
sampleCollectedOn = json['SampleCollectedOn'];
|
||||
sampleReceivedOn = json['SampleReceivedOn'];
|
||||
setupID = json['SetupID'];
|
||||
superVerifiedOn = json['SuperVerifiedOn'];
|
||||
testCode = json['TestCode'];
|
||||
uOM = json['UOM'];
|
||||
verifiedOn = json['VerifiedOn'];
|
||||
verifiedOnDateTime = json['VerifiedOnDateTime'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Description'] = this.description;
|
||||
data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
|
||||
data['Gender'] = this.gender;
|
||||
data['LineItemNo'] = this.lineItemNo;
|
||||
data['MaleInterpretativeData'] = this.maleInterpretativeData;
|
||||
data['Notes'] = this.notes;
|
||||
data['PackageID'] = this.packageID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ReferanceRange'] = this.referanceRange;
|
||||
data['ResultValue'] = this.resultValue;
|
||||
data['SampleCollectedOn'] = this.sampleCollectedOn;
|
||||
data['SampleReceivedOn'] = this.sampleReceivedOn;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['SuperVerifiedOn'] = this.superVerifiedOn;
|
||||
data['TestCode'] = this.testCode;
|
||||
data['UOM'] = this.uOM;
|
||||
data['VerifiedOn'] = this.verifiedOn;
|
||||
data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,152 @@
|
||||
class VaccineModel {
|
||||
String setupID;
|
||||
int projectID;
|
||||
int patientID;
|
||||
int invoiceNo;
|
||||
String procedureID;
|
||||
String vaccineName;
|
||||
Null vaccineNameN;
|
||||
String invoiceDate;
|
||||
int doctorID;
|
||||
int clinicID;
|
||||
String firstName;
|
||||
String middleName;
|
||||
String lastName;
|
||||
Null firstNameN;
|
||||
Null middleNameN;
|
||||
Null lastNameN;
|
||||
String dateofBirth;
|
||||
int actualDoctorRate;
|
||||
String age;
|
||||
String clinicName;
|
||||
String doctorImageURL;
|
||||
String doctorName;
|
||||
int doctorRate;
|
||||
String doctorTitle;
|
||||
int gender;
|
||||
String genderDescription;
|
||||
bool isActiveDoctorProfile;
|
||||
bool isDoctorAllowVedioCall;
|
||||
bool isExecludeDoctor;
|
||||
int noOfPatientsRate;
|
||||
String patientName;
|
||||
String projectName;
|
||||
String qR;
|
||||
List<String> speciality;
|
||||
String vaccinationDate;
|
||||
|
||||
VaccineModel(
|
||||
{this.setupID,
|
||||
this.projectID,
|
||||
this.patientID,
|
||||
this.invoiceNo,
|
||||
this.procedureID,
|
||||
this.vaccineName,
|
||||
this.vaccineNameN,
|
||||
this.invoiceDate,
|
||||
this.doctorID,
|
||||
this.clinicID,
|
||||
this.firstName,
|
||||
this.middleName,
|
||||
this.lastName,
|
||||
this.firstNameN,
|
||||
this.middleNameN,
|
||||
this.lastNameN,
|
||||
this.dateofBirth,
|
||||
this.actualDoctorRate,
|
||||
this.age,
|
||||
this.clinicName,
|
||||
this.doctorImageURL,
|
||||
this.doctorName,
|
||||
this.doctorRate,
|
||||
this.doctorTitle,
|
||||
this.gender,
|
||||
this.genderDescription,
|
||||
this.isActiveDoctorProfile,
|
||||
this.isDoctorAllowVedioCall,
|
||||
this.isExecludeDoctor,
|
||||
this.noOfPatientsRate,
|
||||
this.patientName,
|
||||
this.projectName,
|
||||
this.qR,
|
||||
this.speciality,
|
||||
this.vaccinationDate});
|
||||
|
||||
VaccineModel.fromJson(Map<String, dynamic> json) {
|
||||
setupID = json['SetupID'];
|
||||
projectID = json['ProjectID'];
|
||||
patientID = json['PatientID'];
|
||||
invoiceNo = json['InvoiceNo'];
|
||||
procedureID = json['ProcedureID'];
|
||||
vaccineName = json['VaccineName'];
|
||||
vaccineNameN = json['VaccineNameN'];
|
||||
invoiceDate = json['InvoiceDate'];
|
||||
doctorID = json['DoctorID'];
|
||||
clinicID = json['ClinicID'];
|
||||
firstName = json['FirstName'];
|
||||
middleName = json['MiddleName'];
|
||||
lastName = json['LastName'];
|
||||
firstNameN = json['FirstNameN'];
|
||||
middleNameN = json['MiddleNameN'];
|
||||
lastNameN = json['LastNameN'];
|
||||
dateofBirth = json['DateofBirth'];
|
||||
actualDoctorRate = json['ActualDoctorRate'];
|
||||
age = json['Age'];
|
||||
clinicName = json['ClinicName'];
|
||||
doctorImageURL = json['DoctorImageURL'];
|
||||
doctorName = json['DoctorName'];
|
||||
doctorRate = json['DoctorRate'];
|
||||
doctorTitle = json['DoctorTitle'];
|
||||
gender = json['Gender'];
|
||||
genderDescription = json['GenderDescription'];
|
||||
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
|
||||
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
|
||||
isExecludeDoctor = json['IsExecludeDoctor'];
|
||||
noOfPatientsRate = json['NoOfPatientsRate'];
|
||||
patientName = json['PatientName'];
|
||||
projectName = json['ProjectName'];
|
||||
qR = json['QR'];
|
||||
speciality = json['Speciality'].cast<String>();
|
||||
vaccinationDate = json['VaccinationDate'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['SetupID'] = this.setupID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['InvoiceNo'] = this.invoiceNo;
|
||||
data['ProcedureID'] = this.procedureID;
|
||||
data['VaccineName'] = this.vaccineName;
|
||||
data['VaccineNameN'] = this.vaccineNameN;
|
||||
data['InvoiceDate'] = this.invoiceDate;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['FirstName'] = this.firstName;
|
||||
data['MiddleName'] = this.middleName;
|
||||
data['LastName'] = this.lastName;
|
||||
data['FirstNameN'] = this.firstNameN;
|
||||
data['MiddleNameN'] = this.middleNameN;
|
||||
data['LastNameN'] = this.lastNameN;
|
||||
data['DateofBirth'] = this.dateofBirth;
|
||||
data['ActualDoctorRate'] = this.actualDoctorRate;
|
||||
data['Age'] = this.age;
|
||||
data['ClinicName'] = this.clinicName;
|
||||
data['DoctorImageURL'] = this.doctorImageURL;
|
||||
data['DoctorName'] = this.doctorName;
|
||||
data['DoctorRate'] = this.doctorRate;
|
||||
data['DoctorTitle'] = this.doctorTitle;
|
||||
data['Gender'] = this.gender;
|
||||
data['GenderDescription'] = this.genderDescription;
|
||||
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
|
||||
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
|
||||
data['IsExecludeDoctor'] = this.isExecludeDoctor;
|
||||
data['NoOfPatientsRate'] = this.noOfPatientsRate;
|
||||
data['PatientName'] = this.patientName;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['QR'] = this.qR;
|
||||
data['Speciality'] = this.speciality;
|
||||
data['VaccinationDate'] = this.vaccinationDate;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/reports/Reports.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/reports/request_reports.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
|
||||
|
||||
class ReportsMonthlyService extends BaseService {
|
||||
List<Reports> reportsList = List();
|
||||
List<AppointmentHistory> appointHistoryList = List();
|
||||
|
||||
RequestReports _requestReports = RequestReports(
|
||||
isReport: true,
|
||||
encounterType: 1,
|
||||
requestType: 1,
|
||||
versionID: 5.5,
|
||||
channel: 3,
|
||||
languageID: 2,
|
||||
iPAdress: "10.20.10.20",
|
||||
generalid: 'Cs2020@2016\$2958',
|
||||
patientOutSA: 0,
|
||||
sessionID: 'KIbLoqkytuKJEWECHQ',
|
||||
isDentalAllowedBackend: false,
|
||||
deviceTypeID: 2,
|
||||
patientID: 1231755,
|
||||
tokenID: '@dm!n',
|
||||
patientTypeID: 1,
|
||||
patientType: 1);
|
||||
|
||||
Future getReports() async {
|
||||
hasError = false;
|
||||
await baseAppClient.post(REPORTS,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
reportsList.clear();
|
||||
response['GetPatientMedicalStatus'].forEach((reports) {
|
||||
reportsList.add(Reports.fromJson(reports));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: _requestReports.toJson());
|
||||
}
|
||||
|
||||
Future getPatentAppointmentHistory() async {
|
||||
hasError = false;
|
||||
Map<String, dynamic> body = new Map<String, dynamic>();
|
||||
body['IsForMedicalReport'] = true;
|
||||
await baseAppClient.post(GET_PATIENT_AppointmentHistory,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
appointHistoryList = [];
|
||||
response['AppoimentAllHistoryResultList'].forEach((appoint) {
|
||||
appointHistoryList.add(AppointmentHistory.fromJson(appoint));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
Future insertRequestForMedicalReport(
|
||||
AppointmentHistory appointmentHistory) async {
|
||||
Map<String, dynamic> body = new Map<String, dynamic>();
|
||||
body['ClinicID'] = appointmentHistory.clinicID;
|
||||
body['DoctorID'] = appointmentHistory.doctorID;
|
||||
body['SetupID'] = appointmentHistory.setupID;
|
||||
body['EncounterNo'] = appointmentHistory.appointmentNo;
|
||||
body['EncounterType'] = 1;// appointmentHistory.appointmentType;
|
||||
body['IsActive'] = appointmentHistory.isActiveDoctor;
|
||||
body['ProjectID'] = appointmentHistory.projectID;
|
||||
body['Remarks'] = "";
|
||||
body['ProcedureId'] = "";
|
||||
body['RequestType'] = 1;
|
||||
body['Source'] = 2;
|
||||
body['Status'] = 1;
|
||||
body['CreatedBy'] = 102;
|
||||
hasError = false;
|
||||
await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT,
|
||||
onSuccess: (dynamic response, int statusCode) {},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart';
|
||||
|
||||
class VaccineService extends BaseService {
|
||||
List<VaccineModel> _vaccineList = List();
|
||||
|
||||
List<VaccineModel> get vaccineList => _vaccineList;
|
||||
|
||||
Future getMyVaccine() async {
|
||||
Map<String, dynamic> body = Map();
|
||||
body['To'] = "0";
|
||||
body['From'] = "0";
|
||||
hasError = false;
|
||||
_vaccineList.clear();
|
||||
await baseAppClient.post(GET_VACCINES,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
response['List_DoneVaccines'].forEach((item) {
|
||||
_vaccineList.add(VaccineModel.fromJson(item));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
Future sendEmail() async {
|
||||
|
||||
Map<String, dynamic> body = Map();
|
||||
body['ListVaccines'] = vaccineList.map((v) => v.toJson()).toList();
|
||||
body['ListVaccines'] = user.emailAddress;
|
||||
body['DateofBirth'] = user.dateofBirth;
|
||||
body['PatientIditificationNum'] = user.patientIdentificationNo;
|
||||
body['PatientMobileNumber'] = user.mobileNumber;
|
||||
body['PatientName'] = user.firstName + " "+ user.lastName;
|
||||
|
||||
hasError = false;
|
||||
|
||||
await baseAppClient.post(GET_VACCINES,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
|
||||
import '../../../core/enum/reportfilter_type.dart';
|
||||
import '../../../core/enum/viewstate.dart';
|
||||
import '../../../core/model/reports/Reports.dart';
|
||||
import '../../../core/service/medical/reports_service.dart';
|
||||
import '../../../locator.dart';
|
||||
import '../base_view_model.dart';
|
||||
|
||||
class ReportsMonthlyViewModel extends BaseViewModel {
|
||||
ReportFilterType filterType = ReportFilterType.Requested;
|
||||
|
||||
ReportsService _reportsService = locator<ReportsService>();
|
||||
|
||||
|
||||
|
||||
String get userAgreementContent => _reportsService.userAgreementContent;
|
||||
|
||||
getUserTermsAndConditions() async{
|
||||
setState(ViewState.Busy);
|
||||
await _reportsService.getUserTermsAndConditions();
|
||||
if (_reportsService.hasError) {
|
||||
error = _reportsService.error;
|
||||
setState(ViewState.Error);
|
||||
} else {
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
|
||||
updatePatientHealthSummaryReport({String message, bool isSummary})async{
|
||||
setState(ViewState.BusyLocal);
|
||||
await _reportsService.updatePatientHealthSummaryReport(isSummary: isSummary);
|
||||
if (_reportsService.hasError) {
|
||||
error = _reportsService.error;
|
||||
AppToast.showErrorToast(message: error);
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else {
|
||||
AppToast.showSuccessToast(message: message);
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
|
||||
import 'base_view_model.dart';
|
||||
import '../../locator.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/vaccine_service.dart';
|
||||
|
||||
class VaccineViewModel extends BaseViewModel {
|
||||
bool hasError = false;
|
||||
|
||||
VaccineService _vaccineService = locator<VaccineService>();
|
||||
|
||||
List<VaccineModel> get vaccineList => _vaccineService.vaccineList;
|
||||
|
||||
Future getVaccine() async {
|
||||
hasError = false;
|
||||
//_insuranceCardService.clearInsuranceCard();
|
||||
setState(ViewState.Busy);
|
||||
await _vaccineService.getMyVaccine();
|
||||
if (_vaccineService.hasError) {
|
||||
error = _vaccineService.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
|
||||
Future sendEmail({String message}) async {
|
||||
hasError = false;
|
||||
setState(ViewState.BusyLocal);
|
||||
await _vaccineService.sendEmail();
|
||||
if (_vaccineService.hasError) {
|
||||
error = _vaccineService.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
AppToast.showErrorToast(message: error);
|
||||
} else {
|
||||
AppToast.showSuccessToast(message: message);
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
class DentalChiefComplaintsModel {
|
||||
List<ListDentalChiefComplain> listDentalChiefComplain;
|
||||
|
||||
DentalChiefComplaintsModel({this.listDentalChiefComplain});
|
||||
|
||||
DentalChiefComplaintsModel.fromJson(Map<String, dynamic> json) {
|
||||
if (json['List_DentalChiefComplain'] != null) {
|
||||
listDentalChiefComplain = new List<ListDentalChiefComplain>();
|
||||
json['List_DentalChiefComplain'].forEach((v) {
|
||||
listDentalChiefComplain.add(new ListDentalChiefComplain.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.listDentalChiefComplain != null) {
|
||||
data['List_DentalChiefComplain'] =
|
||||
this.listDentalChiefComplain.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ListDentalChiefComplain {
|
||||
int projectID;
|
||||
int iD;
|
||||
String name;
|
||||
String nameN;
|
||||
|
||||
ListDentalChiefComplain({this.projectID, this.iD, this.name, this.nameN});
|
||||
|
||||
ListDentalChiefComplain.fromJson(Map<String, dynamic> json) {
|
||||
projectID = json['ProjectID'];
|
||||
iD = json['ID'];
|
||||
name = json['Name'];
|
||||
nameN = json['NameN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ID'] = this.iD;
|
||||
data['Name'] = this.name;
|
||||
data['NameN'] = this.nameN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
class SearchInfo {
|
||||
int ProjectID;
|
||||
int ClinicID;
|
||||
String DoctorName;
|
||||
String SelectedDate;
|
||||
String SelectedTime;
|
||||
String currentLat;
|
||||
String currentLong;
|
||||
DateTime date;
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
|
||||
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.dart';
|
||||
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
|
||||
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:smart_progress_bar/smart_progress_bar.dart';
|
||||
|
||||
class DentalComplaints extends StatefulWidget {
|
||||
SearchInfo searchInfo;
|
||||
|
||||
DentalComplaints({@required this.searchInfo});
|
||||
|
||||
@override
|
||||
_DentalComplaintsState createState() => _DentalComplaintsState();
|
||||
}
|
||||
|
||||
class _DentalComplaintsState extends State<DentalComplaints> {
|
||||
List<ListDentalChiefComplain> complaintsList = [];
|
||||
AppSharedPreferences sharedPref = AppSharedPreferences();
|
||||
bool isDataLoaded = false;
|
||||
var languageID;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
WidgetsBinding.instance
|
||||
.addPostFrameCallback((_) => getChiefComplaintsList());
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: "Symptoms",
|
||||
body: Container(
|
||||
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
|
||||
child: ListView.builder(
|
||||
itemCount: complaintsList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(bottom: 10.0),
|
||||
child: DentalComplaintCard(
|
||||
listDentalChiefComplain: complaintsList[index],
|
||||
languageID: languageID,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
getLanguageID() async {
|
||||
languageID = await sharedPref.getString(APP_LANGUAGE);
|
||||
}
|
||||
|
||||
getChiefComplaintsList() {
|
||||
getLanguageID();
|
||||
ClinicListService service = new ClinicListService();
|
||||
service
|
||||
.getChiefComplaintsList(
|
||||
widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
|
||||
.then((res) {
|
||||
if (res['MessageStatus'] == 1) {
|
||||
print(res['List_DentalChiefComplain']);
|
||||
setState(() {
|
||||
res['List_DentalChiefComplain'].forEach((v) {
|
||||
complaintsList.add(new ListDentalChiefComplain.fromJson(v));
|
||||
});
|
||||
print(complaintsList.length);
|
||||
});
|
||||
} else {}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
}).showProgressBar(
|
||||
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
||||
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
|
||||
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:smart_progress_bar/smart_progress_bar.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class DentalComplaintCard extends StatefulWidget {
|
||||
final ListDentalChiefComplain listDentalChiefComplain;
|
||||
var languageID;
|
||||
|
||||
DentalComplaintCard(
|
||||
{@required this.listDentalChiefComplain, this.languageID});
|
||||
|
||||
@override
|
||||
_DentalComplaintCardState createState() => _DentalComplaintCardState();
|
||||
}
|
||||
|
||||
class _DentalComplaintCardState extends State<DentalComplaintCard> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
getChiefComplaintsList();
|
||||
},
|
||||
child: Card(
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
padding: EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: Text(widget.listDentalChiefComplain.name,
|
||||
style:
|
||||
TextStyle(fontSize: 16.0, color: Colors.black)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Icon(Icons.arrow_forward_ios,
|
||||
size: 20.0, color: Colors.black54),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
getChiefComplaintsList() {
|
||||
List<DoctorList> doctorsList = [];
|
||||
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
|
||||
List();
|
||||
|
||||
ClinicListService service = new ClinicListService();
|
||||
service
|
||||
.getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD,
|
||||
widget.listDentalChiefComplain.projectID, context)
|
||||
.then((res) {
|
||||
if (res['MessageStatus'] == 1) {
|
||||
print(res['List_DentalDoctorChiefComplaintMapping']);
|
||||
setState(() {
|
||||
doctorsList.clear();
|
||||
res['List_DentalDoctorChiefComplaintMapping'].forEach((v) {
|
||||
doctorsList.add(new DoctorList.fromJson(v));
|
||||
});
|
||||
|
||||
doctorsList.forEach((element) {
|
||||
List<PatientDoctorAppointmentList> doctorByHospital =
|
||||
_patientDoctorAppointmentListHospital
|
||||
.where(
|
||||
(elementClinic) =>
|
||||
elementClinic.filterName == element.projectName,
|
||||
)
|
||||
.toList();
|
||||
|
||||
if (doctorByHospital.length != 0) {
|
||||
_patientDoctorAppointmentListHospital[
|
||||
_patientDoctorAppointmentListHospital
|
||||
.indexOf(doctorByHospital[0])]
|
||||
.patientDoctorAppointmentList
|
||||
.add(element);
|
||||
} else {
|
||||
_patientDoctorAppointmentListHospital.add(
|
||||
PatientDoctorAppointmentList(
|
||||
filterName: element.projectName,
|
||||
distanceInKMs:
|
||||
element.projectDistanceInKiloMeters.toString(),
|
||||
patientDoctorAppointment: element));
|
||||
}
|
||||
});
|
||||
navigateToSearchResults(
|
||||
context, doctorsList, _patientDoctorAppointmentListHospital);
|
||||
});
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
}).showProgressBar(
|
||||
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
|
||||
}
|
||||
|
||||
Future navigateToSearchResults(
|
||||
context,
|
||||
List<DoctorList> docList,
|
||||
List<PatientDoctorAppointmentList>
|
||||
patientDoctorAppointmentListHospital) async {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => SearchResults(
|
||||
doctorsList: docList,
|
||||
patientDoctorAppointmentListHospital:
|
||||
patientDoctorAppointmentListHospital)));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,167 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/input/custom_switch.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MonthlyReportsPage extends StatefulWidget {
|
||||
@override
|
||||
_MonthlyReportsPageState createState() => _MonthlyReportsPageState();
|
||||
}
|
||||
|
||||
class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
|
||||
bool isAgree = false;
|
||||
bool isSummary = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<ReportsMonthlyViewModel>(
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).monthlyReports,
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(9),
|
||||
height: 55,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(color: Colors.grey)),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Texts(
|
||||
TranslationBase.of(context).patientHealthSummaryReport,
|
||||
bold: true,
|
||||
),
|
||||
CustomSwitch(
|
||||
value: isSummary,
|
||||
activeColor: Colors.red,
|
||||
inactiveColor: Colors.grey,
|
||||
onChanged: () async {
|
||||
setState(() {
|
||||
isSummary = !isSummary;
|
||||
});
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.all(8),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Texts(
|
||||
model.user.emailAddress,
|
||||
bold: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Divider(
|
||||
height: 10.4,
|
||||
thickness: 1.0,
|
||||
),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.all(8),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Texts(TranslationBase.of(context)
|
||||
.toViewTheTermsAndConditions),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
FadePage(
|
||||
page: UserAgreementContent(),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Texts(
|
||||
TranslationBase.of(context).clickHere,
|
||||
color: Colors.blue,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Checkbox(
|
||||
value: isAgree,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isAgree = !isAgree;
|
||||
});
|
||||
},
|
||||
activeColor: Colors.red,
|
||||
),
|
||||
Texts(TranslationBase.of(context)
|
||||
.iAgreeToTheTermsAndConditions),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.all(8),
|
||||
width: double.infinity,
|
||||
child: SecondaryButton(
|
||||
textColor: Colors.white,
|
||||
label: TranslationBase.of(context).save,
|
||||
disabled: !isAgree,
|
||||
loading: model.state == ViewState.BusyLocal,
|
||||
onTap: () {
|
||||
model.updatePatientHealthSummaryReport(
|
||||
message: TranslationBase.of(context)
|
||||
.updateSuccessfully,
|
||||
isSummary: isSummary);
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(5.0),
|
||||
child: Texts(
|
||||
TranslationBase.of(context)
|
||||
.iAgreeToTheTermsAndConditionsSubtitle,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
Center(child: Image.asset('assets/images/report.jpg'))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
|
||||
class UserAgreementContent extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<ReportsMonthlyViewModel>(
|
||||
onModelReady: (model) => model.getUserTermsAndConditions(),
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
baseViewModel: model,
|
||||
appBarTitle: TranslationBase.of(context).userAgreement,
|
||||
body: SingleChildScrollView(
|
||||
child: Html(
|
||||
data: model.userAgreementContent,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,242 @@
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:diplomaticquarterapp/config/size_config.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import '../base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
|
||||
import 'package:popup_box/popup_box.dart';
|
||||
|
||||
class MyVaccines extends StatefulWidget {
|
||||
@override
|
||||
_MyVaccinesState createState() => _MyVaccinesState();
|
||||
}
|
||||
|
||||
class _MyVaccinesState extends State<MyVaccines> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<VaccineViewModel>(
|
||||
onModelReady: (model) => model.getVaccine(),
|
||||
builder: (BuildContext context, VaccineViewModel model, Widget child) =>
|
||||
AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: 'My Vaccines',
|
||||
baseViewModel: model,
|
||||
body: Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: SizeConfig.screenWidth * 0.004,
|
||||
right: SizeConfig.screenWidth * 0.004,
|
||||
top: SizeConfig.screenWidth * 0.04,
|
||||
),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
RoundedContainer(
|
||||
backgroundColor: Colors.white,
|
||||
child: ExpansionTile(
|
||||
title: Container(
|
||||
height: 65.0,
|
||||
child: Text('2018'),
|
||||
),
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
shrinkWrap: true,
|
||||
itemCount: model.vaccineList == null
|
||||
? 0
|
||||
: model.vaccineList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
RoundedContainer(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 20.0,
|
||||
vertical: 20.0),
|
||||
child: Image.network(
|
||||
model.vaccineList[index]
|
||||
.doctorImageURL,
|
||||
height: SizeConfig
|
||||
.imageSizeMultiplier *
|
||||
23,
|
||||
width: SizeConfig
|
||||
.imageSizeMultiplier *
|
||||
20,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
flex: 2,
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
model.vaccineList[index]
|
||||
.doctorTitle +
|
||||
model.vaccineList[index]
|
||||
.doctorName,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w900,
|
||||
fontSize: 16.6,
|
||||
),
|
||||
),
|
||||
SpaceBetweenTexts(space: 7.0),
|
||||
Text(
|
||||
model.vaccineList[index]
|
||||
.projectName,
|
||||
style: TextStyle(
|
||||
fontSize: 17.0,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
),
|
||||
SpaceBetweenTexts(space: 7.0),
|
||||
Text(
|
||||
model.vaccineList[index]
|
||||
.vaccineName,
|
||||
style: TextStyle(
|
||||
fontSize: 17.0,
|
||||
),
|
||||
),
|
||||
SpaceBetweenTexts(space: 7.0),
|
||||
Text(
|
||||
'Date Taken ' +
|
||||
convertDateFormat(model
|
||||
.vaccineList[index]
|
||||
.invoiceDate),
|
||||
style:
|
||||
TextStyle(fontSize: 17.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
flex: 5,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
// SpaceBetweenTexts(space: 165.0),
|
||||
|
||||
],
|
||||
),
|
||||
|
||||
),
|
||||
bottomSheet: Container(
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
padding: EdgeInsets.all(12),
|
||||
height: MediaQuery.of(context).size.height *0.25,
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
children: [
|
||||
Divider(height: 2,thickness: 1,),
|
||||
SizedBox(height: 6,),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
// height: 80.0,
|
||||
child: Button(
|
||||
label: 'CHECK VACCINE AVAILABILITY',
|
||||
backgroundColor: Color(0xff9EA3A4),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
// height: 80.0,
|
||||
child: SecondaryButton(
|
||||
label: 'SEND EMAIL',
|
||||
color: Color(0xffF62426),
|
||||
textColor: Colors.white,
|
||||
disabled: model.vaccineList.length==0,
|
||||
onTap: () async {
|
||||
await PopupBox.showPopupBox(
|
||||
context: context,
|
||||
button: MaterialButton(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(3),
|
||||
),
|
||||
color: Colors.white,
|
||||
child: Text(
|
||||
'CANCEL',
|
||||
style: TextStyle(fontSize: 16.5),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
willDisplayWidget: Column(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'Conform \nSend a copy of this report to the email' +
|
||||
model.vaccineList[0].doctorName,
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: Colors.black26,
|
||||
fontWeight: FontWeight.w900),
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.0,
|
||||
),
|
||||
],
|
||||
));
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
convertDateFormat(String Date) {
|
||||
const start = "/Date(";
|
||||
const end = "+0300)";
|
||||
|
||||
final startIndex = Date.indexOf(start);
|
||||
final endIndex = Date.indexOf(end, startIndex + start.length);
|
||||
|
||||
var date = new DateTime.fromMillisecondsSinceEpoch(
|
||||
int.parse(Date.substring(startIndex + start.length, endIndex)));
|
||||
String newDate = date.year.toString() +
|
||||
"-" +
|
||||
date.month.toString().padLeft(2, '0') +
|
||||
"-" +
|
||||
date.day.toString().padLeft(2, '0');
|
||||
|
||||
return newDate.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class SpaceBetweenTexts extends StatelessWidget {
|
||||
final double space;
|
||||
SpaceBetweenTexts({this.space});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: space,
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue