diff --git a/htdocs/App.vue b/htdocs/App.vue index 2aa3c41..3c45940 100644 --- a/htdocs/App.vue +++ b/htdocs/App.vue @@ -23,6 +23,7 @@ import RoutePatientOrders from './RoutePatientOrders.vue'; import RoutePlanner from './RoutePlanner.vue'; import RouteRecall from './RouteRecall.vue'; + import RouteInbox from './RouteInbox.vue'; export default { components: { @@ -45,7 +46,8 @@ { name: 'Schedule', href: '/' }, { name: 'Lookup', href: '/lookup' }, { name: 'Planner', href: '/planner' }, - { name: 'Recall', href: '/recall' } + { name: 'Recall', href: '/recall' }, + { name: 'Inbox', href: '/inbox' }, ] } }; @@ -64,6 +66,7 @@ ] }, { path: '/planner', component: RoutePlanner }, { path: '/recall', component: RouteRecall }, + { path: '/inbox', component: RouteInbox }, ].forEach(route => this.$root.$router.addRoute(route)); await this.$root.$router.replace(this.$route); } diff --git a/htdocs/RouteInbox.vue b/htdocs/RouteInbox.vue new file mode 100644 index 0000000..05b0bfa --- /dev/null +++ b/htdocs/RouteInbox.vue @@ -0,0 +1,67 @@ + + + diff --git a/htdocs/vistax.mjs b/htdocs/vistax.mjs index ac525a2..ac6ff5e 100644 --- a/htdocs/vistax.mjs +++ b/htdocs/vistax.mjs @@ -153,6 +153,23 @@ export const d_parse_orderoptions_meddose = data => { return res; }; +export const d_parse_notifications_fastuser = data => d_split(data, '^', 'info', 'patient', 'location', 'urgency', 'time', 'message', 'unk_6', 'meta', 'unk_7', 'unk_8').map(row => { + var meta = row.meta.split(';'); + var xqaid = row.meta_xqaid = meta[0]; + row.meta_duz = meta[1]; + row.meta_time = +meta[2]; + if(xqaid.startsWith('OR,')) { + xqaid = xqaid.split(','); + row.meta_source = xqaid[0]; + row.meta_dfn = xqaid[1]; + row.meta_ien = xqaid[2]; // file 100.9 IEN + } else if(xqaid.startsWith('TIU')) { + row.meta_source = 'TIU'; + row.meta_ien = xqaid.substring(3); // document IEN (DA) + } + return row; +}); + export function memoized(fn) { var cache = {}; return async function(...args) { @@ -297,6 +314,8 @@ export function Client(cid, secret) { this.ORWDPS2_DAY2QTY = memoized(aflow((...args) => this.callctx(['OR CPRS GUI CHART'], 'ORWDPS2_DAY2QTY', ...args), d_log, d_unwrap)); this.ORWDPS2_QTY2DAY = memoized(aflow((...args) => this.callctx(['OR CPRS GUI CHART'], 'ORWDPS2_QTY2DAY', ...args), d_log, d_unwrap)); + this.ORWORB_FASTUSER = aflow(() => this.call({ method: 'ORWORB_FASTUSER', context: ['OR CPRS GUI CHART'], ttl: 60, stale: false }), d_log, d_unwrap, d_parse_notifications_fastuser); + return this; } Client._registry = {};