From eebda06c86fe66a598b6c317c9efdda24d9e30df Mon Sep 17 00:00:00 2001 From: inportb Date: Tue, 8 Aug 2023 22:08:08 -0400 Subject: [PATCH] Document creation, edition, deletion, and signature --- htdocs/ModalPromptSignatureCode.vue | 84 +++++++++++++ htdocs/RoutePatientDocuments.vue | 144 ++++++++++++++-------- htdocs/ViewDocEdit.vue | 177 ++++++++++++++++++++++++++++ htdocs/ViewDocNew.vue | 79 +++++++++++++ htdocs/ViewDocTitleLookup.vue | 123 +++++++++++++++++++ htdocs/ViewDocView.vue | 98 +++++++++++++++ htdocs/ViewUserLookup.vue | 131 ++++++++++++++++++++ htdocs/vistax.mjs | 28 +++++ 8 files changed, 816 insertions(+), 48 deletions(-) create mode 100644 htdocs/ModalPromptSignatureCode.vue create mode 100644 htdocs/ViewDocEdit.vue create mode 100644 htdocs/ViewDocNew.vue create mode 100644 htdocs/ViewDocTitleLookup.vue create mode 100644 htdocs/ViewDocView.vue create mode 100644 htdocs/ViewUserLookup.vue diff --git a/htdocs/ModalPromptSignatureCode.vue b/htdocs/ModalPromptSignatureCode.vue new file mode 100644 index 0000000..972d38e --- /dev/null +++ b/htdocs/ModalPromptSignatureCode.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/htdocs/RoutePatientDocuments.vue b/htdocs/RoutePatientDocuments.vue index e0e9369..8c71680 100644 --- a/htdocs/RoutePatientDocuments.vue +++ b/htdocs/RoutePatientDocuments.vue @@ -2,15 +2,23 @@
-
+
-
record{{resultset.length == 1 ? '' : 's'}}
-
    +
    + record{{resultset.length == 1 ? '' : 's'}} + + + + + + +
    +
    • {{datestring(strptime_vista(item.time))}}
      -
      {{item.title}}
      +
      {{item.title}}
      {{item.location}}
      {{item.author.byline}}
      @@ -20,16 +28,14 @@
-
-
-
- {{doctitle(selection_text) || 'Document'}} - -
-
{{selection_text}}
-
+
+ +
+
+
+ + + diff --git a/htdocs/ViewDocNew.vue b/htdocs/ViewDocNew.vue new file mode 100644 index 0000000..476e1fa --- /dev/null +++ b/htdocs/ViewDocNew.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/htdocs/ViewDocTitleLookup.vue b/htdocs/ViewDocTitleLookup.vue new file mode 100644 index 0000000..ab46dd4 --- /dev/null +++ b/htdocs/ViewDocTitleLookup.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/htdocs/ViewDocView.vue b/htdocs/ViewDocView.vue new file mode 100644 index 0000000..4236ccc --- /dev/null +++ b/htdocs/ViewDocView.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/htdocs/ViewUserLookup.vue b/htdocs/ViewUserLookup.vue new file mode 100644 index 0000000..c163f67 --- /dev/null +++ b/htdocs/ViewUserLookup.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/htdocs/vistax.mjs b/htdocs/vistax.mjs index 941ff7a..85da7f8 100644 --- a/htdocs/vistax.mjs +++ b/htdocs/vistax.mjs @@ -189,6 +189,20 @@ export const d_parse_multireport = data => { return (res._ts = _ts, res); }; +export const d_parse_tiurecordtiux = data => { + var res = {}; + if(data.length < 1) return res; + var brk = data.indexOf('$TXT'), text = undefined; + if(brk >= 0) { + text = data.slice(brk + 1).join('\r\n'); + data = data.slice(0, brk); + } + data = d_split(data, '^', 'field', 'value', 'description'); + data = data.reduce((acc, val) => (acc['~' + val.field] = val, acc), data); + if(text) data.text = text; + return data; +}; + export const d_parse_tiudocumentlist = data => d_split(data, '^', 'IEN', 'title', 'time', 'patient', 'author', 'location', 'status', 'visit').map(row => { row.author = row.author ? d_split1(row.author, ';', 'IEN', 'byline', 'name') : null; row.visit = row.visit ? d_split1(row.visit, ';', 'date', 'time') : null; @@ -311,10 +325,24 @@ export function Client(cid, secret) { this.TIU_TEMPLATE_LOCK = aflow((...args) => this.call({ method: 'TIU_TEMPLATE_LOCK', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap); this.TIU_TEMPLATE_UNLOCK = aflow((...args) => this.call({ method: 'TIU_TEMPLATE_UNLOCK', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap); this.TIU_DOCUMENTS_BY_CONTEXT = aflow((...args) => this.call({ method: 'TIU_DOCUMENTS_BY_CONTEXT', context: ['OR CPRS GUI CHART'], ttl: 60, stale: false }, ...args), d_log, d_unwrap, d_parse_array, d_parse_tiudocumentlist); + this.TIU_DOCUMENTS_BY_CONTEXT_FLUSH = aflow((...args) => this.call({ method: 'TIU_DOCUMENTS_BY_CONTEXT', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap, d_parse_array, d_parse_tiudocumentlist); this.TIU_GET_RECORD_TEXT = aflow((...args) => this.call({ method: 'TIU_GET_RECORD_TEXT', context: ['OR CPRS GUI CHART'], ttl: 60, stale: false }, ...args), d_log, d_unwrap, d_parse_text); + this.TIU_GET_RECORD_TEXT_FLUSH = aflow((...args) => this.call({ method: 'TIU_GET_RECORD_TEXT', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap, d_parse_text); + this.TIU_LONG_LIST_OF_TITLES = memoized(aflow((...args) => this.call({ method: 'TIU_LONG_LIST_OF_TITLES', context: ['OR CPRS GUI CHART'], ttl: 86400, stale: true, ttl: 86400, stale: true }, ...args), d_log, d_unwrap, f_split('^', 'IEN', 'name'))); + this.TIU_CREATE_RECORD = aflow((...args) => this.call({ method: 'TIU_CREATE_RECORD', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap); + this.TIU_AUTHORIZATION = aflow((...args) => this.call({ method: 'TIU_AUTHORIZATION', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap); + this.TIU_LOAD_RECORD_FOR_EDIT = aflow((...args) => this.call({ method: 'TIU_LOAD_RECORD_FOR_EDIT', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap, d_parse_tiurecordtiux); + this.TIU_UPDATE_RECORD = aflow((...args) => this.call({ method: 'TIU_UPDATE_RECORD', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap); + this.TIU_DELETE_RECORD = aflow((...args) => this.call({ method: 'TIU_DELETE_RECORD', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap); + this.TIU_SIGN_RECORD = aflow((...args) => this.call({ method: 'TIU_SIGN_RECORD', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap); + + this.ORWPCE_NOTEVSTR = aflow((...args) => this.call({ method: 'ORWPCE_NOTEVSTR', context: ['OR CPRS GUI CHART'], ttl: 86400, stale: true }, ...args), d_log, d_unwrap); + this.ORWPCE_DELETE = aflow((...args) => this.call({ method: 'ORWPCE_DELETE', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap); this.ORWCV_VST = memoized(aflow((...args) => this.callctx(['OR CPRS GUI CHART'], 'ORWCV_VST', ...args), d_log, d_unwrap, f_split('^', 'apptinfo', 'datetime', 'location', 'status'))); + this.ORWU_NEWPERS = memoized(aflow((...args) => this.call({ method: 'ORWU_NEWPERS', context: ['OR CPRS GUI CHART'], ttl: 86400, stale: true }, ...args), d_log, d_unwrap, f_split('^', 'DUZ', 'name', 'description'))); + this.ORWU_VALIDSIG = memoized(aflow((...args) => this.call({ method: 'ORWU_VALIDSIG', context: ['OR CPRS GUI CHART'], ttl: 0, stale: false }, ...args), d_log, d_unwrap)); this.ORWU1_NEWLOC = memoized(aflow((...args) => this.callctx(['OR CPRS GUI CHART'], 'ORWU1_NEWLOC', ...args), d_log, d_unwrap, f_split('^', 'IEN', 'name'))); this.ORWDX_DGNM = memoized(aflow((...args) => this.callctx(['OR CPRS GUI CHART'], 'ORWDX_DGNM', ...args), d_log, d_unwrap));