Merge branch 'development' into in-patient-changes
commit
34e9a3797c
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 475 B |
@ -0,0 +1,26 @@
|
|||||||
|
class InPatientPrescriptionRequestModel {
|
||||||
|
String vidaAuthTokenID;
|
||||||
|
dynamic patientMRN;
|
||||||
|
dynamic appNo;
|
||||||
|
dynamic admissionNo;
|
||||||
|
|
||||||
|
InPatientPrescriptionRequestModel(
|
||||||
|
{this.vidaAuthTokenID, this.patientMRN, this.appNo, this.admissionNo});
|
||||||
|
|
||||||
|
InPatientPrescriptionRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||||
|
patientMRN = json['PatientID'];
|
||||||
|
appNo = json['AppointmentNo'];
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||||
|
data['PatientID'] = this.patientMRN;
|
||||||
|
data['AppointmentNo'] = this.appNo;
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,200 @@
|
|||||||
|
class PrescriotionInPatient {
|
||||||
|
int admissionNo;
|
||||||
|
int authorizedBy;
|
||||||
|
dynamic bedNo;
|
||||||
|
String comments;
|
||||||
|
int createdBy;
|
||||||
|
String createdByName;
|
||||||
|
dynamic createdByNameN;
|
||||||
|
String createdOn;
|
||||||
|
String direction;
|
||||||
|
int directionID;
|
||||||
|
dynamic directionN;
|
||||||
|
String dose;
|
||||||
|
int editedBy;
|
||||||
|
dynamic iVDiluentLine;
|
||||||
|
int iVDiluentType;
|
||||||
|
dynamic iVDiluentVolume;
|
||||||
|
dynamic iVRate;
|
||||||
|
dynamic iVStability;
|
||||||
|
String itemDescription;
|
||||||
|
int itemID;
|
||||||
|
int lineItemNo;
|
||||||
|
int locationId;
|
||||||
|
int noOfDoses;
|
||||||
|
int orderNo;
|
||||||
|
int patientID;
|
||||||
|
String pharmacyRemarks;
|
||||||
|
String prescriptionDatetime;
|
||||||
|
int prescriptionNo;
|
||||||
|
String processedBy;
|
||||||
|
int projectID;
|
||||||
|
int refillID;
|
||||||
|
String refillType;
|
||||||
|
dynamic refillTypeN;
|
||||||
|
int reviewedPharmacist;
|
||||||
|
dynamic roomId;
|
||||||
|
String route;
|
||||||
|
int routeId;
|
||||||
|
dynamic routeN;
|
||||||
|
dynamic setupID;
|
||||||
|
String startDatetime;
|
||||||
|
int status;
|
||||||
|
String statusDescription;
|
||||||
|
dynamic statusDescriptionN;
|
||||||
|
String stopDatetime;
|
||||||
|
int unitofMeasurement;
|
||||||
|
String unitofMeasurementDescription;
|
||||||
|
dynamic unitofMeasurementDescriptionN;
|
||||||
|
|
||||||
|
PrescriotionInPatient(
|
||||||
|
{this.admissionNo,
|
||||||
|
this.authorizedBy,
|
||||||
|
this.bedNo,
|
||||||
|
this.comments,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdByName,
|
||||||
|
this.createdByNameN,
|
||||||
|
this.createdOn,
|
||||||
|
this.direction,
|
||||||
|
this.directionID,
|
||||||
|
this.directionN,
|
||||||
|
this.dose,
|
||||||
|
this.editedBy,
|
||||||
|
this.iVDiluentLine,
|
||||||
|
this.iVDiluentType,
|
||||||
|
this.iVDiluentVolume,
|
||||||
|
this.iVRate,
|
||||||
|
this.iVStability,
|
||||||
|
this.itemDescription,
|
||||||
|
this.itemID,
|
||||||
|
this.lineItemNo,
|
||||||
|
this.locationId,
|
||||||
|
this.noOfDoses,
|
||||||
|
this.orderNo,
|
||||||
|
this.patientID,
|
||||||
|
this.pharmacyRemarks,
|
||||||
|
this.prescriptionDatetime,
|
||||||
|
this.prescriptionNo,
|
||||||
|
this.processedBy,
|
||||||
|
this.projectID,
|
||||||
|
this.refillID,
|
||||||
|
this.refillType,
|
||||||
|
this.refillTypeN,
|
||||||
|
this.reviewedPharmacist,
|
||||||
|
this.roomId,
|
||||||
|
this.route,
|
||||||
|
this.routeId,
|
||||||
|
this.routeN,
|
||||||
|
this.setupID,
|
||||||
|
this.startDatetime,
|
||||||
|
this.status,
|
||||||
|
this.statusDescription,
|
||||||
|
this.statusDescriptionN,
|
||||||
|
this.stopDatetime,
|
||||||
|
this.unitofMeasurement,
|
||||||
|
this.unitofMeasurementDescription,
|
||||||
|
this.unitofMeasurementDescriptionN});
|
||||||
|
|
||||||
|
PrescriotionInPatient.fromJson(Map<String, dynamic> json) {
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
|
authorizedBy = json['AuthorizedBy'];
|
||||||
|
bedNo = json['BedNo'];
|
||||||
|
comments = json['Comments'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
createdByName = json['CreatedByName'];
|
||||||
|
createdByNameN = json['CreatedByNameN'];
|
||||||
|
createdOn = json['CreatedOn'];
|
||||||
|
direction = json['Direction'];
|
||||||
|
directionID = json['DirectionID'];
|
||||||
|
directionN = json['DirectionN'];
|
||||||
|
dose = json['Dose'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
iVDiluentLine = json['IVDiluentLine'];
|
||||||
|
iVDiluentType = json['IVDiluentType'];
|
||||||
|
iVDiluentVolume = json['IVDiluentVolume'];
|
||||||
|
iVRate = json['IVRate'];
|
||||||
|
iVStability = json['IVStability'];
|
||||||
|
itemDescription = json['ItemDescription'];
|
||||||
|
itemID = json['ItemID'];
|
||||||
|
lineItemNo = json['LineItemNo'];
|
||||||
|
locationId = json['LocationId'];
|
||||||
|
noOfDoses = json['NoOfDoses'];
|
||||||
|
orderNo = json['OrderNo'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
pharmacyRemarks = json['PharmacyRemarks'];
|
||||||
|
prescriptionDatetime = json['PrescriptionDatetime'];
|
||||||
|
prescriptionNo = json['PrescriptionNo'];
|
||||||
|
processedBy = json['ProcessedBy'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
refillID = json['RefillID'];
|
||||||
|
refillType = json['RefillType'];
|
||||||
|
refillTypeN = json['RefillTypeN'];
|
||||||
|
reviewedPharmacist = json['ReviewedPharmacist'];
|
||||||
|
roomId = json['RoomId'];
|
||||||
|
route = json['Route'];
|
||||||
|
routeId = json['RouteId'];
|
||||||
|
routeN = json['RouteN'];
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
startDatetime = json['StartDatetime'];
|
||||||
|
status = json['Status'];
|
||||||
|
statusDescription = json['StatusDescription'];
|
||||||
|
statusDescriptionN = json['StatusDescriptionN'];
|
||||||
|
stopDatetime = json['StopDatetime'];
|
||||||
|
unitofMeasurement = json['UnitofMeasurement'];
|
||||||
|
unitofMeasurementDescription = json['UnitofMeasurementDescription'];
|
||||||
|
unitofMeasurementDescriptionN = json['UnitofMeasurementDescriptionN'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
data['AuthorizedBy'] = this.authorizedBy;
|
||||||
|
data['BedNo'] = this.bedNo;
|
||||||
|
data['Comments'] = this.comments;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['CreatedByName'] = this.createdByName;
|
||||||
|
data['CreatedByNameN'] = this.createdByNameN;
|
||||||
|
data['CreatedOn'] = this.createdOn;
|
||||||
|
data['Direction'] = this.direction;
|
||||||
|
data['DirectionID'] = this.directionID;
|
||||||
|
data['DirectionN'] = this.directionN;
|
||||||
|
data['Dose'] = this.dose;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['IVDiluentLine'] = this.iVDiluentLine;
|
||||||
|
data['IVDiluentType'] = this.iVDiluentType;
|
||||||
|
data['IVDiluentVolume'] = this.iVDiluentVolume;
|
||||||
|
data['IVRate'] = this.iVRate;
|
||||||
|
data['IVStability'] = this.iVStability;
|
||||||
|
data['ItemDescription'] = this.itemDescription;
|
||||||
|
data['ItemID'] = this.itemID;
|
||||||
|
data['LineItemNo'] = this.lineItemNo;
|
||||||
|
data['LocationId'] = this.locationId;
|
||||||
|
data['NoOfDoses'] = this.noOfDoses;
|
||||||
|
data['OrderNo'] = this.orderNo;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['PharmacyRemarks'] = this.pharmacyRemarks;
|
||||||
|
data['PrescriptionDatetime'] = this.prescriptionDatetime;
|
||||||
|
data['PrescriptionNo'] = this.prescriptionNo;
|
||||||
|
data['ProcessedBy'] = this.processedBy;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['RefillID'] = this.refillID;
|
||||||
|
data['RefillType'] = this.refillType;
|
||||||
|
data['RefillTypeN'] = this.refillTypeN;
|
||||||
|
data['ReviewedPharmacist'] = this.reviewedPharmacist;
|
||||||
|
data['RoomId'] = this.roomId;
|
||||||
|
data['Route'] = this.route;
|
||||||
|
data['RouteId'] = this.routeId;
|
||||||
|
data['RouteN'] = this.routeN;
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['StartDatetime'] = this.startDatetime;
|
||||||
|
data['Status'] = this.status;
|
||||||
|
data['StatusDescription'] = this.statusDescription;
|
||||||
|
data['StatusDescriptionN'] = this.statusDescriptionN;
|
||||||
|
data['StopDatetime'] = this.stopDatetime;
|
||||||
|
data['UnitofMeasurement'] = this.unitofMeasurement;
|
||||||
|
data['UnitofMeasurementDescription'] = this.unitofMeasurementDescription;
|
||||||
|
data['UnitofMeasurementDescriptionN'] = this.unitofMeasurementDescriptionN;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,453 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/prescriptions_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/prescription/prescription_details_page.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/dialogs/ShowImageDialog.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class PrescriptionItemsInPatientPage extends StatelessWidget {
|
||||||
|
final PrescriotionInPatient prescriptions;
|
||||||
|
final PatiantInformtion patient;
|
||||||
|
final String patientType;
|
||||||
|
final String arrivalType;
|
||||||
|
final DateTime startOn;
|
||||||
|
final DateTime stopOn;
|
||||||
|
final int prescriptionIndex;
|
||||||
|
|
||||||
|
PrescriptionItemsInPatientPage(
|
||||||
|
{Key key,
|
||||||
|
this.prescriptions,
|
||||||
|
this.patient,
|
||||||
|
this.patientType,
|
||||||
|
this.arrivalType,
|
||||||
|
this.stopOn,
|
||||||
|
this.startOn,
|
||||||
|
this.prescriptionIndex});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
ProjectViewModel projectViewModel = Provider.of(context);
|
||||||
|
return BaseView<PrescriptionViewModel>(
|
||||||
|
onModelReady: (model) async {
|
||||||
|
if (model.inPatientPrescription.length == 0) {
|
||||||
|
await model.getPrescriptionsInPatient(patient);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
builder: (_, model, widget) => AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
backgroundColor: Colors.grey[100],
|
||||||
|
baseViewModel: model,
|
||||||
|
appBar: PatientProfileHeaderNewDesignAppBar(
|
||||||
|
patient, patient.patientType.toString(), patient.arrivedOn),
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
// if (!prescriptions.isInOutPatient)
|
||||||
|
// ...List.generate(
|
||||||
|
// model.prescriptionReportList.length,
|
||||||
|
// (index) => Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius: BorderRadius.circular(12),
|
||||||
|
// color: Colors.white,
|
||||||
|
// ),
|
||||||
|
// margin: EdgeInsets.all(12),
|
||||||
|
// child: Padding(
|
||||||
|
// padding: const EdgeInsets.all(8.0),
|
||||||
|
// child: Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// Container(
|
||||||
|
// margin:
|
||||||
|
// EdgeInsets.only(left: 18, right: 18),
|
||||||
|
// child: AppText(
|
||||||
|
// model.prescriptionReportList[index]
|
||||||
|
// .itemDescription.isNotEmpty
|
||||||
|
// ? model
|
||||||
|
// .prescriptionReportList[index]
|
||||||
|
// .itemDescription
|
||||||
|
// : model
|
||||||
|
// .prescriptionReportList[index]
|
||||||
|
// .itemDescriptionN,
|
||||||
|
// bold: true,
|
||||||
|
// )),
|
||||||
|
// SizedBox(
|
||||||
|
// height: 12,
|
||||||
|
// ),
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// SizedBox(
|
||||||
|
// width: 18,
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// shape: BoxShape.circle,
|
||||||
|
// border: Border.all(
|
||||||
|
// width: 0.5,
|
||||||
|
// color: Colors.grey)),
|
||||||
|
// height: 55,
|
||||||
|
// width: 55,
|
||||||
|
// child: InkWell(
|
||||||
|
// onTap: () {
|
||||||
|
// showDialog(
|
||||||
|
// context: context,
|
||||||
|
// child: ShowImageDialog(
|
||||||
|
// imageUrl: model
|
||||||
|
// .prescriptionReportEnhList[
|
||||||
|
// index]
|
||||||
|
// .imageSRCUrl,
|
||||||
|
// ));
|
||||||
|
// },
|
||||||
|
// child: Padding(
|
||||||
|
// padding: const EdgeInsets.all(8.0),
|
||||||
|
// child: Image.network(
|
||||||
|
// model
|
||||||
|
// .prescriptionReportList[index]
|
||||||
|
// .imageSRCUrl,
|
||||||
|
// fit: BoxFit.cover,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// SizedBox(
|
||||||
|
// width: 10,
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// child: Column(
|
||||||
|
// crossAxisAlignment:
|
||||||
|
// CrossAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context)
|
||||||
|
// .route,
|
||||||
|
// color: Colors.grey,
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// child: AppText(" " +
|
||||||
|
// model
|
||||||
|
// .prescriptionReportList[
|
||||||
|
// index]
|
||||||
|
// .routeN)),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context)
|
||||||
|
// .frequency,
|
||||||
|
// color: Colors.grey,
|
||||||
|
// ),
|
||||||
|
// AppText(" " +
|
||||||
|
// model
|
||||||
|
// .prescriptionReportList[
|
||||||
|
// index]
|
||||||
|
// .frequencyN ??
|
||||||
|
// ''),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context)
|
||||||
|
// .dailyDoses,
|
||||||
|
// color: Colors.grey,
|
||||||
|
// ),
|
||||||
|
// AppText(" " +
|
||||||
|
// model
|
||||||
|
// .prescriptionReportList[
|
||||||
|
// index]
|
||||||
|
// .doseDailyQuantity ??
|
||||||
|
// ''),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context)
|
||||||
|
// .duration,
|
||||||
|
// color: Colors.grey,
|
||||||
|
// ),
|
||||||
|
// AppText(" " +
|
||||||
|
// model
|
||||||
|
// .prescriptionReportList[
|
||||||
|
// index]
|
||||||
|
// .days
|
||||||
|
// .toString() ??
|
||||||
|
// ''),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// SizedBox(
|
||||||
|
// height: 12,
|
||||||
|
// ),
|
||||||
|
// AppText(model
|
||||||
|
// .prescriptionReportList[
|
||||||
|
// index]
|
||||||
|
// .remarks ??
|
||||||
|
// ''),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ))
|
||||||
|
// else
|
||||||
|
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
margin: EdgeInsets.all(12),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 18, right: 18),
|
||||||
|
child: AppText(
|
||||||
|
model.inPatientPrescription[prescriptionIndex]
|
||||||
|
.itemDescription,
|
||||||
|
bold: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 18,
|
||||||
|
),
|
||||||
|
// Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// shape: BoxShape.circle,
|
||||||
|
// border: Border.all(
|
||||||
|
// width: 0.5, color: Colors.grey)),
|
||||||
|
// height: 55,
|
||||||
|
// width: 55,
|
||||||
|
// child: InkWell(
|
||||||
|
// onTap: () {
|
||||||
|
// showDialog(
|
||||||
|
// context: context,
|
||||||
|
// // child: ShowImageDialog(
|
||||||
|
// // imageUrl: model
|
||||||
|
// // .inPatientPrescription[index]
|
||||||
|
// // .imageSRCUrl,
|
||||||
|
// // ),
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// child: Padding(
|
||||||
|
// padding: const EdgeInsets.all(8.0),
|
||||||
|
// // child: Image.network(
|
||||||
|
// // model.prescriptionReportEnhList[index]
|
||||||
|
// // .imageSRCUrl,
|
||||||
|
// // fit: BoxFit.cover,
|
||||||
|
// // ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
SizedBox(
|
||||||
|
width: 10,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Direction',
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(" " +
|
||||||
|
model
|
||||||
|
.inPatientPrescription[
|
||||||
|
prescriptionIndex]
|
||||||
|
.direction ??
|
||||||
|
'')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Route',
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
AppText(" " +
|
||||||
|
model
|
||||||
|
.inPatientPrescription[
|
||||||
|
prescriptionIndex]
|
||||||
|
.route
|
||||||
|
.toString() ??
|
||||||
|
''),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Refill',
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(" " +
|
||||||
|
model
|
||||||
|
.inPatientPrescription[
|
||||||
|
prescriptionIndex]
|
||||||
|
.refillType ??
|
||||||
|
'')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Start Date ',
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
'${DateUtils.getDayMonthYearDateFormatted(startOn, isArabic: projectViewModel.isArabic)}',
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Stop Date',
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
'${DateUtils.getDayMonthYearDateFormatted(stopOn, isArabic: projectViewModel.isArabic)}',
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'UOM',
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
AppText(" " +
|
||||||
|
model
|
||||||
|
.inPatientPrescription[
|
||||||
|
prescriptionIndex]
|
||||||
|
.unitofMeasurementDescription ??
|
||||||
|
''),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).dailyDoses,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
AppText(" " +
|
||||||
|
model
|
||||||
|
.inPatientPrescription[
|
||||||
|
prescriptionIndex]
|
||||||
|
.dose
|
||||||
|
.toString() ??
|
||||||
|
''),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Status',
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
AppText(" " +
|
||||||
|
model
|
||||||
|
.inPatientPrescription[
|
||||||
|
prescriptionIndex]
|
||||||
|
.statusDescription
|
||||||
|
.toString() ??
|
||||||
|
''),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'Processed',
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
AppText(" " +
|
||||||
|
model
|
||||||
|
.inPatientPrescription[
|
||||||
|
prescriptionIndex]
|
||||||
|
.processedBy ??
|
||||||
|
''),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).dailyDoses,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
AppText(" " +
|
||||||
|
model
|
||||||
|
.inPatientPrescription[
|
||||||
|
prescriptionIndex]
|
||||||
|
.dose
|
||||||
|
.toString() ??
|
||||||
|
''),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
AppText(model
|
||||||
|
.inPatientPrescription[
|
||||||
|
prescriptionIndex]
|
||||||
|
.comments ??
|
||||||
|
''),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,199 @@
|
|||||||
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class InPatientDoctorCard extends StatelessWidget {
|
||||||
|
final String doctorName;
|
||||||
|
final String branch;
|
||||||
|
final DateTime appointmentDate;
|
||||||
|
final String profileUrl;
|
||||||
|
final String invoiceNO;
|
||||||
|
final String orderNo;
|
||||||
|
final Function onTap;
|
||||||
|
final bool isPrescriptions;
|
||||||
|
final String clinic;
|
||||||
|
final createdBy;
|
||||||
|
|
||||||
|
InPatientDoctorCard(
|
||||||
|
{this.doctorName,
|
||||||
|
this.branch,
|
||||||
|
this.profileUrl,
|
||||||
|
this.invoiceNO,
|
||||||
|
this.onTap,
|
||||||
|
this.appointmentDate,
|
||||||
|
this.orderNo,
|
||||||
|
this.isPrescriptions = false,
|
||||||
|
this.clinic,
|
||||||
|
this.createdBy});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
ProjectViewModel projectViewModel = Provider.of(context);
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.all(10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
width: 0.5,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(15.0),
|
||||||
|
),
|
||||||
|
color: Colors.white),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(15.0),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: onTap,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
doctorName,
|
||||||
|
bold: true,
|
||||||
|
)),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
if (!isPrescriptions)
|
||||||
|
AppText(
|
||||||
|
'${DateUtils.getHour(appointmentDate)}',
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.grey[700],
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
'CreatedBy ',
|
||||||
|
//bold: true,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
createdBy,
|
||||||
|
bold: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
// Container(
|
||||||
|
// child: LargeAvatar(
|
||||||
|
// name: doctorName,
|
||||||
|
// url: profileUrl,
|
||||||
|
// ),
|
||||||
|
// width: 55,
|
||||||
|
// height: 55,
|
||||||
|
// ),
|
||||||
|
Expanded(
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(10),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
// if (orderNo != null && !isPrescriptions)
|
||||||
|
// Row(
|
||||||
|
// children: <Widget>[
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context).orderNo +
|
||||||
|
// ": ",
|
||||||
|
// color: Colors.grey[500],
|
||||||
|
// fontSize: 14,
|
||||||
|
// ),
|
||||||
|
// AppText(
|
||||||
|
// orderNo ?? '',
|
||||||
|
// fontSize: 14,
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// if (invoiceNO != null && !isPrescriptions)
|
||||||
|
// Row(
|
||||||
|
// children: <Widget>[
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context)
|
||||||
|
// .invoiceNo +
|
||||||
|
// ": ",
|
||||||
|
// fontSize: 14,
|
||||||
|
// color: Colors.grey[500],
|
||||||
|
// ),
|
||||||
|
// AppText(
|
||||||
|
// invoiceNO,
|
||||||
|
// fontSize: 14,
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// if (clinic != null)
|
||||||
|
// Row(
|
||||||
|
// children: <Widget>[
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context).clinic +
|
||||||
|
// ": ",
|
||||||
|
// color: Colors.grey[500],
|
||||||
|
// fontSize: 14,
|
||||||
|
// ),
|
||||||
|
// AppText(
|
||||||
|
// clinic,
|
||||||
|
// fontSize: 14,
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// if (branch != null)
|
||||||
|
// Row(
|
||||||
|
// children: <Widget>[
|
||||||
|
// AppText(
|
||||||
|
// TranslationBase.of(context).branch +
|
||||||
|
// ": ",
|
||||||
|
// fontSize: 14,
|
||||||
|
// color: Colors.grey[500],
|
||||||
|
// ),
|
||||||
|
// AppText(
|
||||||
|
// branch,
|
||||||
|
// fontSize: 14,
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// )
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
EvaIcons.eye,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue