Restricted record check
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
<template>
|
||||
<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 + '?viewsensitive'">Proceed</router-link>
|
||||
</div>
|
||||
<div v-if="info">
|
||||
<div class="card mb-3 shadow">
|
||||
<div class="card-header">{{info.name}} <span :title="info.pid">{{info.pid.slice(-4)}}</span> #{{dfn}}</div>
|
||||
@@ -52,6 +57,7 @@
|
||||
data() {
|
||||
return {
|
||||
dfn: null,
|
||||
sensitive: false,
|
||||
info: null,
|
||||
report_date: now,
|
||||
report_date_begin: now,
|
||||
@@ -66,7 +72,12 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
strptime_vista
|
||||
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() {
|
||||
if(this.$route.params.id.startsWith('$')) {
|
||||
@@ -82,14 +93,10 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.dfn = this.$route.params.id;
|
||||
this.info = await this.client.ORWPT16_ID_INFO(this.$route.params.id);
|
||||
}
|
||||
} else this.loadinfo(this.$route.params.id, this.$route.query.hasOwnProperty('viewsensitive'));
|
||||
},
|
||||
async beforeRouteUpdate(to, from, next) {
|
||||
this.dfn = to.params.id;
|
||||
this.info = await this.client.ORWPT16_ID_INFO(to.params.id);
|
||||
this.loadinfo(to.params.id, to.query.hasOwnProperty('viewsensitive'));
|
||||
next();
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user