InPatient Medical Report continued
parent
9b3c07d3b1
commit
a17b941c63
@ -0,0 +1,228 @@
|
|||||||
|
class AdmissionMedicalReport {
|
||||||
|
int rowID;
|
||||||
|
String setupID;
|
||||||
|
int projectID;
|
||||||
|
int admissionNo;
|
||||||
|
String admissionDate;
|
||||||
|
int admissionRequestNo;
|
||||||
|
int admissionType;
|
||||||
|
int patientType;
|
||||||
|
int patientID;
|
||||||
|
int clinicID;
|
||||||
|
int doctorID;
|
||||||
|
int admittingClinicID;
|
||||||
|
int admittingDoctorID;
|
||||||
|
int categoryID;
|
||||||
|
String roomID;
|
||||||
|
String bedID;
|
||||||
|
String dischargeDate;
|
||||||
|
int approvalNo;
|
||||||
|
dynamic relativeID;
|
||||||
|
String registrationDate;
|
||||||
|
String firstName;
|
||||||
|
String middleName;
|
||||||
|
String lastName;
|
||||||
|
String firstNameN;
|
||||||
|
String middleNameN;
|
||||||
|
String lastNameN;
|
||||||
|
int patientCategory;
|
||||||
|
int gender;
|
||||||
|
String dateofBirth;
|
||||||
|
String dateofBirthN;
|
||||||
|
String nationalityID;
|
||||||
|
String firstVisit;
|
||||||
|
String lastVisit;
|
||||||
|
int noOfVisit;
|
||||||
|
String mobileNumber;
|
||||||
|
String patientIdentificationNo;
|
||||||
|
int sTATUS;
|
||||||
|
int admissionStatus;
|
||||||
|
int buildingID;
|
||||||
|
String buildingDescription;
|
||||||
|
String buildingDescriptionN;
|
||||||
|
int floorID;
|
||||||
|
int bedGender;
|
||||||
|
int tariffType;
|
||||||
|
dynamic cRSVerificationStatus;
|
||||||
|
String nursingStationID;
|
||||||
|
String description;
|
||||||
|
String clinicName;
|
||||||
|
String doctorNameObj;
|
||||||
|
int patientDataVerified;
|
||||||
|
String projectName;
|
||||||
|
dynamic projectNameN;
|
||||||
|
String statusDescription;
|
||||||
|
String statusDescriptionN;
|
||||||
|
|
||||||
|
AdmissionMedicalReport(
|
||||||
|
{this.rowID,
|
||||||
|
this.setupID,
|
||||||
|
this.projectID,
|
||||||
|
this.admissionNo,
|
||||||
|
this.admissionDate,
|
||||||
|
this.admissionRequestNo,
|
||||||
|
this.admissionType,
|
||||||
|
this.patientType,
|
||||||
|
this.patientID,
|
||||||
|
this.clinicID,
|
||||||
|
this.doctorID,
|
||||||
|
this.admittingClinicID,
|
||||||
|
this.admittingDoctorID,
|
||||||
|
this.categoryID,
|
||||||
|
this.roomID,
|
||||||
|
this.bedID,
|
||||||
|
this.dischargeDate,
|
||||||
|
this.approvalNo,
|
||||||
|
this.relativeID,
|
||||||
|
this.registrationDate,
|
||||||
|
this.firstName,
|
||||||
|
this.middleName,
|
||||||
|
this.lastName,
|
||||||
|
this.firstNameN,
|
||||||
|
this.middleNameN,
|
||||||
|
this.lastNameN,
|
||||||
|
this.patientCategory,
|
||||||
|
this.gender,
|
||||||
|
this.dateofBirth,
|
||||||
|
this.dateofBirthN,
|
||||||
|
this.nationalityID,
|
||||||
|
this.firstVisit,
|
||||||
|
this.lastVisit,
|
||||||
|
this.noOfVisit,
|
||||||
|
this.mobileNumber,
|
||||||
|
this.patientIdentificationNo,
|
||||||
|
this.sTATUS,
|
||||||
|
this.admissionStatus,
|
||||||
|
this.buildingID,
|
||||||
|
this.buildingDescription,
|
||||||
|
this.buildingDescriptionN,
|
||||||
|
this.floorID,
|
||||||
|
this.bedGender,
|
||||||
|
this.tariffType,
|
||||||
|
this.cRSVerificationStatus,
|
||||||
|
this.nursingStationID,
|
||||||
|
this.description,
|
||||||
|
this.clinicName,
|
||||||
|
this.doctorNameObj,
|
||||||
|
this.patientDataVerified,
|
||||||
|
this.projectName,
|
||||||
|
this.projectNameN,
|
||||||
|
this.statusDescription,
|
||||||
|
this.statusDescriptionN});
|
||||||
|
|
||||||
|
AdmissionMedicalReport.fromJson(Map<String, dynamic> json) {
|
||||||
|
rowID = json['RowID'];
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
|
admissionDate = json['AdmissionDate'];
|
||||||
|
admissionRequestNo = json['AdmissionRequestNo'];
|
||||||
|
admissionType = json['AdmissionType'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
clinicID = json['ClinicID'];
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
admittingClinicID = json['AdmittingClinicID'];
|
||||||
|
admittingDoctorID = json['AdmittingDoctorID'];
|
||||||
|
categoryID = json['CategoryID'];
|
||||||
|
roomID = json['RoomID'];
|
||||||
|
bedID = json['BedID'];
|
||||||
|
dischargeDate = json['DischargeDate'];
|
||||||
|
approvalNo = json['ApprovalNo'];
|
||||||
|
relativeID = json['RelativeID'];
|
||||||
|
registrationDate = json['RegistrationDate'];
|
||||||
|
firstName = json['FirstName'];
|
||||||
|
middleName = json['MiddleName'];
|
||||||
|
lastName = json['LastName'];
|
||||||
|
firstNameN = json['FirstNameN'];
|
||||||
|
middleNameN = json['MiddleNameN'];
|
||||||
|
lastNameN = json['LastNameN'];
|
||||||
|
patientCategory = json['PatientCategory'];
|
||||||
|
gender = json['Gender'];
|
||||||
|
dateofBirth = json['DateofBirth'];
|
||||||
|
dateofBirthN = json['DateofBirthN'];
|
||||||
|
nationalityID = json['NationalityID'];
|
||||||
|
firstVisit = json['FirstVisit'];
|
||||||
|
lastVisit = json['LastVisit'];
|
||||||
|
noOfVisit = json['NoOfVisit'];
|
||||||
|
mobileNumber = json['MobileNumber'];
|
||||||
|
patientIdentificationNo = json['PatientIdentificationNo'];
|
||||||
|
sTATUS = json['STATUS'];
|
||||||
|
admissionStatus = json['AdmissionStatus'];
|
||||||
|
buildingID = json['BuildingID'];
|
||||||
|
buildingDescription = json['BuildingDescription'];
|
||||||
|
buildingDescriptionN = json['BuildingDescriptionN'];
|
||||||
|
floorID = json['FloorID'];
|
||||||
|
bedGender = json['BedGender'];
|
||||||
|
tariffType = json['TariffType'];
|
||||||
|
cRSVerificationStatus = json['CRSVerificationStatus'];
|
||||||
|
nursingStationID = json['NursingStationID'];
|
||||||
|
description = json['Description'];
|
||||||
|
clinicName = json['ClinicName'];
|
||||||
|
doctorNameObj = json['DoctorNameObj'];
|
||||||
|
patientDataVerified = json['PatientDataVerified'];
|
||||||
|
projectName = json['ProjectName'];
|
||||||
|
projectNameN = json['ProjectNameN'];
|
||||||
|
statusDescription = json['StatusDescription'];
|
||||||
|
statusDescriptionN = json['StatusDescriptionN'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['RowID'] = this.rowID;
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
data['AdmissionDate'] = this.admissionDate;
|
||||||
|
data['AdmissionRequestNo'] = this.admissionRequestNo;
|
||||||
|
data['AdmissionType'] = this.admissionType;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['ClinicID'] = this.clinicID;
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
data['AdmittingClinicID'] = this.admittingClinicID;
|
||||||
|
data['AdmittingDoctorID'] = this.admittingDoctorID;
|
||||||
|
data['CategoryID'] = this.categoryID;
|
||||||
|
data['RoomID'] = this.roomID;
|
||||||
|
data['BedID'] = this.bedID;
|
||||||
|
data['DischargeDate'] = this.dischargeDate;
|
||||||
|
data['ApprovalNo'] = this.approvalNo;
|
||||||
|
data['RelativeID'] = this.relativeID;
|
||||||
|
data['RegistrationDate'] = this.registrationDate;
|
||||||
|
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['PatientCategory'] = this.patientCategory;
|
||||||
|
data['Gender'] = this.gender;
|
||||||
|
data['DateofBirth'] = this.dateofBirth;
|
||||||
|
data['DateofBirthN'] = this.dateofBirthN;
|
||||||
|
data['NationalityID'] = this.nationalityID;
|
||||||
|
data['FirstVisit'] = this.firstVisit;
|
||||||
|
data['LastVisit'] = this.lastVisit;
|
||||||
|
data['NoOfVisit'] = this.noOfVisit;
|
||||||
|
data['MobileNumber'] = this.mobileNumber;
|
||||||
|
data['PatientIdentificationNo'] = this.patientIdentificationNo;
|
||||||
|
data['STATUS'] = this.sTATUS;
|
||||||
|
data['AdmissionStatus'] = this.admissionStatus;
|
||||||
|
data['BuildingID'] = this.buildingID;
|
||||||
|
data['BuildingDescription'] = this.buildingDescription;
|
||||||
|
data['BuildingDescriptionN'] = this.buildingDescriptionN;
|
||||||
|
data['FloorID'] = this.floorID;
|
||||||
|
data['BedGender'] = this.bedGender;
|
||||||
|
data['TariffType'] = this.tariffType;
|
||||||
|
data['CRSVerificationStatus'] = this.cRSVerificationStatus;
|
||||||
|
data['NursingStationID'] = this.nursingStationID;
|
||||||
|
data['Description'] = this.description;
|
||||||
|
data['ClinicName'] = this.clinicName;
|
||||||
|
data['DoctorNameObj'] = this.doctorNameObj;
|
||||||
|
data['PatientDataVerified'] = this.patientDataVerified;
|
||||||
|
data['ProjectName'] = this.projectName;
|
||||||
|
data['ProjectNameN'] = this.projectNameN;
|
||||||
|
data['StatusDescription'] = this.statusDescription;
|
||||||
|
data['StatusDescriptionN'] = this.statusDescriptionN;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,132 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/reports/admission_for_medical_report.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/medical/reports/report_list_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class InPatientMedicalReports extends StatefulWidget {
|
||||||
|
final AdmissionMedicalReport admissionMedicalReport;
|
||||||
|
|
||||||
|
InPatientMedicalReports({@required this.admissionMedicalReport});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<InPatientMedicalReports> createState() => _InPatientMedicalReportsState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _InPatientMedicalReportsState extends State<InPatientMedicalReports> {
|
||||||
|
int _currentPage = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<ReportsViewModel>(
|
||||||
|
onModelReady: (model) {
|
||||||
|
model.getInPatientReports();
|
||||||
|
},
|
||||||
|
builder: (_, model, widget) => AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: TranslationBase.of(context).newMedReport,
|
||||||
|
title: TranslationBase.of(context).medReport,
|
||||||
|
showNewAppBar: true,
|
||||||
|
showNewAppBarTitle: true,
|
||||||
|
backgroundColor: Color(0xffF7F7F7),
|
||||||
|
body: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(21),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
myRadioButton(TranslationBase.of(context).requested, 0),
|
||||||
|
myRadioButton(TranslationBase.of(context).ready, 1),
|
||||||
|
myRadioButton(TranslationBase.of(context).cancelled, 2),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: IndexedStack(
|
||||||
|
index: _currentPage,
|
||||||
|
children: [
|
||||||
|
ReportListWidget(reportList: model.reportsInPatientOrderRequestList, emailAddress: model.user.emailAddress),
|
||||||
|
ReportListWidget(reportList: model.reportsInPatientOrderReadyList, emailAddress: model.user.emailAddress),
|
||||||
|
ReportListWidget(reportList: model.reportsInPatientOrderCanceledList, emailAddress: model.user.emailAddress),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
|
||||||
|
child: DefaultButton(
|
||||||
|
TranslationBase.of(context).requestMedicalReport.toLowerCase().capitalizeFirstofEach,
|
||||||
|
() {
|
||||||
|
confirmBox(model);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void confirmBox(ReportsViewModel reportsViewModel) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (cxt) => ConfirmWithMessageDialog(
|
||||||
|
message: TranslationBase.of(context).confirmMsgReport,
|
||||||
|
onTap: () => reportsViewModel.insertRequestForInPatientMedicalReport(widget.admissionMedicalReport.clinicID, widget.admissionMedicalReport.doctorID, widget.admissionMedicalReport.setupID,
|
||||||
|
widget.admissionMedicalReport.admissionNo, widget.admissionMedicalReport.projectID, TranslationBase.of(context).successSendReport),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget myRadioButton(String _label, int _value) {
|
||||||
|
return InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_currentPage = _value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 22,
|
||||||
|
height: 22,
|
||||||
|
child: Radio(
|
||||||
|
value: _value,
|
||||||
|
activeColor: _value == _currentPage ? Color(0xffD02127) : Color(0xffE8E8E8),
|
||||||
|
groupValue: _currentPage,
|
||||||
|
onChanged: (index) {
|
||||||
|
setState(() {
|
||||||
|
_currentPage = index;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 10),
|
||||||
|
Text(
|
||||||
|
_label,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Color(0xff575757),
|
||||||
|
letterSpacing: -0.56,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue