2023-04-24 23:10:19 -04:00
|
|
|
<template>
|
2023-05-06 12:05:13 -04:00
|
|
|
<Subtitle value="Orders" />
|
2023-04-24 23:10:19 -04:00
|
|
|
<div v-if="(sensitive) && (!info)" class="alert alert-danger text-center mb-3 shadow" role="alert">
|
|
|
|
<h1>Warning: Restricted Record</h1>
|
|
|
|
<p>This record is protected by the Privacy Act of 1974 and the Health Insurance Portability and Accountability Act of 1996. If you elect to proceed, you will be required to prove you have a need to know. Accessing this patient is tracked, and your station Security Officer will contact you for your justification.</p>
|
|
|
|
<router-link class="btn btn-danger" :to="'/patient/' + dfn + '/orders?viewsensitive'">Proceed</router-link>
|
|
|
|
</div>
|
|
|
|
<div v-if="info">
|
2023-05-06 12:05:13 -04:00
|
|
|
<Subtitle :value="info.name" />
|
2023-04-24 23:10:19 -04:00
|
|
|
<div class="card mb-3 shadow">
|
|
|
|
<div class="card-header">{{info.name}} <span :title="info.pid">{{info.pid.slice(-4)}}</span> #{{dfn}}</div>
|
|
|
|
<div class="card-body row" style="font-family: monospace;">
|
|
|
|
<div class="col" v-if="info.dob"><strong>DOB:</strong> {{strptime_vista(info.dob).toLocaleDateString('sv-SE')}}</div>
|
|
|
|
<div class="col" v-if="info.age"><strong>Age:</strong> {{info.age}}</div>
|
|
|
|
<div class="col" v-if="info.sex"><strong>Sex:</strong> {{info.sex}}</div>
|
|
|
|
<div class="col" v-if="info.sc_percentage"><strong>SC%:</strong> {{info.sc_percentage}}</div>
|
|
|
|
<div class="col" v-if="info.type"><strong>Type:</strong> {{info.type}}</div>
|
|
|
|
<div class="col" v-if="info.ward"><strong>Ward:</strong> {{info.ward}}</div>
|
|
|
|
<div class="col" v-if="info.room_bed"><strong>Room/bed:</strong> {{info.room_bed}}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card mb-3 shadow">
|
2023-04-24 23:40:47 -04:00
|
|
|
<div class="card-header">Order entry</div>
|
2023-04-24 23:10:19 -04:00
|
|
|
<div class="card-body"><ViewOrderMenu :client="client" :dfn="dfn" /></div>
|
|
|
|
</div>
|
|
|
|
<div class="card mb-3 shadow">
|
|
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
2023-04-24 23:40:47 -04:00
|
|
|
<span>Order view</span>
|
2023-04-24 23:10:19 -04:00
|
|
|
<OrderFilterPicker :client="client" v-model="orders_filter" />
|
|
|
|
<DateRangePicker range="6M" direction="-1" v-model:date="orders_date" v-model:date_end="orders_date_begin" />
|
|
|
|
</div>
|
|
|
|
<div class="card-body"><ViewOrders :client="client" :dfn="dfn" :filter="orders_filter" :date_begin="orders_date_begin" :date_end="orders_date" /></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { strptime_vista } from './util.mjs';
|
|
|
|
|
2023-05-06 12:05:13 -04:00
|
|
|
import Subtitle from './Subtitle.vue';
|
2023-04-24 23:10:19 -04:00
|
|
|
import DateRangePicker from './DateRangePicker.vue';
|
|
|
|
import OrderFilterPicker from './OrderFilterPicker.vue';
|
|
|
|
import ViewOrderMenu from './ViewOrderMenu.vue';
|
|
|
|
import ViewOrders from './ViewOrders.vue';
|
|
|
|
|
|
|
|
var now = new Date();
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2023-05-06 12:05:13 -04:00
|
|
|
Subtitle, DateRangePicker, OrderFilterPicker, ViewOrderMenu, ViewOrders
|
2023-04-24 23:10:19 -04:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
client: Object
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
dfn: null,
|
|
|
|
sensitive: false,
|
|
|
|
info: null,
|
|
|
|
orders_filter: 2,
|
|
|
|
orders_date: now,
|
|
|
|
orders_date_begin: now
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
strptime_vista,
|
|
|
|
async loadinfo(dfn, viewsensitive) {
|
|
|
|
this.dfn = dfn;
|
|
|
|
this.sensitive = viewsensitive ? false : await this.client.ORWPT_SELCHK(dfn);
|
|
|
|
this.info = this.sensitive ? null : await this.client.ORWPT16_ID_INFO(dfn);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
async mounted() {
|
|
|
|
this.loadinfo(this.$route.params.id, this.$route.query.hasOwnProperty('viewsensitive'));
|
|
|
|
},
|
|
|
|
async beforeRouteUpdate(to, from, next) {
|
|
|
|
this.loadinfo(to.params.id, to.query.hasOwnProperty('viewsensitive'));
|
|
|
|
next();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|