Compare commits

...

3 Commits

2 changed files with 10 additions and 4 deletions

View File

@ -97,14 +97,19 @@
methods: {
strHashHSL,
gettags(row) {
var res = {}, matches;
var res = {}, re, matches;
if((row.RESOURCENAME) && (matches = row.RESOURCENAME.replace(/\W+/g, '-').replace(/^-+|-+$/g, ''))) res[matches.toLowerCase()] = matches;
if(row.WALKIN != '0') res['walkin'] = 'WALKIN';
if(row.CANCELLED != '0') res['cancelled'] = 'CANCELLED';
else if(row.NOSHOW != '0') res['noshow'] = 'NOSHOW';
else if(row.CHECKOUT) res['checkedout'] = 'CHECKEDOUT';
else if(row.CHECKIN) res['checkedin'] = 'CHECKEDIN';
if((row.NOTE) && (matches = row.NOTE.match(/#[0-9a-z][\w-]*/gi))) matches.reduce((acc, val) => (acc[val.substring(1).toLowerCase()] = val.substring(1), acc), res);
if(row.NOTE) {
re = /#([0-9a-z][\w-]*)/gi;
while(matches = re.exec(row.NOTE)) res[matches[1].toLowerCase()] = matches[1];
re = /Dr[\.\s]*\b([a-z][\w-]*)/gi;
while(matches = re.exec(row.NOTE)) res[matches[1].toLowerCase()] = matches[1];
}
return res;
},
filter_conj(tags) {
@ -130,6 +135,7 @@
this.$watch(
() => (this.client, this.selection, this.date_begin, this.date_end, {}),
debounce(async () => {
this.filter = {};
window.clearTimeout(this.timer);
this.update();
}, 500)

View File

@ -339,7 +339,7 @@ export function Client(cid, secret) {
if(localstate.practitioner) delete localstate.practitioner;
};
this.XWB_IM_HERE = unwrapped(logged(() => this.call({ method: 'XWB_IM_HERE', ttl: 30 }), 'XWB_IM_HERE'));
this.XWB_IM_HERE = unwrapped(logged(() => this.call({ method: 'XWB_IM_HERE', ttl: 30, stale: false }), 'XWB_IM_HERE'));
this.XUS_INTRO_MSG = memoized(unwrapped(logged(() => this.callctx(['XUCOMMAND'], 'XUS_INTRO_MSG'), 'XUS_INTRO_MSG')));
this.XWB_GET_BROKER_INFO = memoized(unwrapped(logged(() => this.callctx(['XUCOMMAND'], 'XWB_GET_BROKER_INFO'), 'XWB_GET_BROKER_INFO')));
@ -463,7 +463,7 @@ Client.fromCookie = async function(secret, defaulthost='vista.northport.med.va.g
console.log('Using saved secret and connection', secret);
var cid = localstate.cid;
var client = Client.fromID(cid, secret);
if((await vista.call(cid, { method: 'XWB_IM_HERE', ttl: 30, id: Date.now() })).result == '1') {
if((await vista.call(cid, { method: 'XWB_IM_HERE', ttl: 0, stale: false, id: Date.now() })).result == '1') {
var server = await client.serverinfo();
if((host[0] == server.result.host) && (host[1] == server.result.port)) {
localstate.host = host.join(':');