diff --git a/htdocs/ViewSchedule.vue b/htdocs/ViewSchedule.vue index f377bbe..d6b7f03 100644 --- a/htdocs/ViewSchedule.vue +++ b/htdocs/ViewSchedule.vue @@ -3,14 +3,17 @@
❌ update error
⚠ last updated
-
CLEAR {{filter_array.length}} TAG{{filter_array.length > 1 ? 'S' : ''}}❌ {{key.toUpperCase()}}
+
+ 🗑{{filter_array.length}}🏷 + {{key.toUpperCase()}} +
- + @@ -18,7 +21,7 @@ - + @@ -89,6 +92,29 @@ }; }, computed: { + tag_map() { + var res0 = {}, practitioner = this.practitioner; + if(this.appointments) this.appointments.forEach(function(row) { + var res1 = res0[row.APPOINTMENTID] = {}, re, matches; + if((row.RESOURCENAME) && (matches = row.RESOURCENAME.replace(/\W+/g, '-').replace(/^-+|-+$/g, ''))) res1[matches.toLowerCase()] = matches; + if(row.WALKIN != '0') res1['walkin'] = 'WALKIN'; + if((row.CANCELLED != '0') || (row.NOSHOW != '0')) res1['inactive'] = 'INACTIVE'; + else res1['active'] = 'ACTIVE'; + if(row.NOTE) { + re = /#([0-9a-z][\w-]*)/gi; + while(matches = re.exec(row.NOTE)) res1[matches[1].toLowerCase()] = matches[1]; + re = /Dr[\.\s]*\b([a-z][\w-]*)/gi; + while(matches = re.exec(row.NOTE)) res1[matches[1].toLowerCase()] = matches[1]; + } + if((matches = practitioner[row.PATIENTNAME]) && (matches = matches.replace(/\W+/g, '-').replace(/^-+|-+$/g, ''))) res1[matches.toLowerCase()] = matches.toUpperCase(); + }); + return res0; + }, + tag_list() { + var res = {}, tag_map = this.tag_map; + if(tag_map) for(var k in tag_map) if(tag_map.hasOwnProperty(k)) Object.assign(res, tag_map[k]); + return Object.keys(res).sort(); + }, filter_array() { return Object.keys(this.filter).sort(); }, @@ -101,21 +127,6 @@ }, methods: { strHashHSL, - gettags(row) { - 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') || (row.NOSHOW != '0')) res['inactive'] = 'INACTIVE'; - else res['active'] = 'ACTIVE'; - 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]; - } - if((matches = this.practitioner[row.PATIENTNAME]) && (matches = matches.replace(/\W+/g, '-').replace(/^-+|-+$/g, ''))) res[matches.toLowerCase()] = matches.toUpperCase(); - return res; - }, filter_conj(tags) { var filter_array = this.filter_array; for(var i = this.filter_array.length - 1; i >= 0; --i) if(!tags[this.filter_array[i]]) return false;
TimeClinicPatientNoteAssignee
{{row.START_TIME.match(/\d\d:\d\d/)[0]}}
{{row.START_TIME.match(/\w{3} \d+, \d{4}/)[0]}}
{{row.START_TIME.match(/\d\d:\d\d/)[0]}}
{{row.START_TIME.match(/\w{3} \d+, \d{4}/)[0]}}
{{row.START_TIME.match(/\d\d:\d\d/)[0]}}
{{row.START_TIME.match(/\w{3} \d+, \d{4}/)[0]}}
{{row.START_TIME.match(/\d\d:\d\d/)[0]}}
{{row.START_TIME.match(/\w{3} \d+, \d{4}/)[0]}}
{{row.RESOURCENAME}} {{row.PATIENTNAME}} {{row.HRN.slice(-4)}} {{row.NOTE}}{{value}}{{row.NOTE}}{{value}}