Integration with Cardiff and Vale patient administrative system ('PMS').
Integration with Cardiff and Vale patient administrative system ('PMS').
(address->fhir {:keys [ADDRESS1 ADDRESS2 ADDRESS3 ADDRESS4 POSTCODE DATE_FROM
DATE_TO]})
(do-login {:keys [username password database user-string] :as opts})
Performs a login operation, returning an authentication token if successful. Parameters: opts : a map containing username, password, database and user-string.
Performs a login operation, returning an authentication token if successful. Parameters: opts : a map containing username, password, database and user-string.
(fetch-admissions opts & {:keys [crn patient-id]})
Fetch a sequence of admissions for a given patient. Parameters:
The SQL for this needs the internal patient identifier, so we first fetch by CRN in order to obtain that identifier, if not already provided.
Each admission contains at least the following keys: :CRN - patient CRN :NAME - name of patient, for convenience :PATI_ID - internal CAV PMS patient identifier :DATE_ADM - date of admission (java.time.LocalDateTime) :DATE_DISCH - date of discharge (java.time.LocalDateTime) :DATE_TCI - date of 'to come in'
Fetch a sequence of admissions for a given patient. Parameters: - opts : CAV configuration - crn : hospital CRN - patient-id : internal CAV patient-identifier The SQL for this needs the internal patient identifier, so we first fetch by CRN in order to obtain that identifier, if not already provided. Each admission contains at least the following keys: :CRN - patient CRN :NAME - name of patient, for convenience :PATI_ID - internal CAV PMS patient identifier :DATE_ADM - date of admission (java.time.LocalDateTime) :DATE_DISCH - date of discharge (java.time.LocalDateTime) :DATE_TCI - date of 'to come in'
(fetch-admissions-for-patient-sqlvec)
(fetch-admissions-for-patient-sqlvec params)
(fetch-admissions-for-patient-sqlvec params options)
Fetch admissions for the given patient (sqlvec)
Fetch admissions for the given patient (sqlvec)
(fetch-patient config system value)
Fetch patient as defined by system/value, returning as FHIR representation.
Fetch patient as defined by system/value, returning as FHIR representation.
(fetch-patient-by-crn opts crn)
Fetch a patient by CRN. We obtain the address history and so have multiple rows returned; we use the first row for the core patient information and manipulate the returned data to add an 'ADDRESSES' property containing the address history.
Fetch a patient by CRN. We obtain the address history and so have multiple rows returned; we use the first row for the core patient information and manipulate the returned data to add an 'ADDRESSES' property containing the address history.
(fetch-patient-by-crn-sqlvec)
(fetch-patient-by-crn-sqlvec params)
(fetch-patient-by-crn-sqlvec params options)
Fetch a patient by hospital identifier, :crn and :type (sqlvec)
Fetch a patient by hospital identifier, :crn and :type (sqlvec)
(fetch-patient-by-nnn opts nnn)
Fetch a patient by NHS number. We obtain the address history and so have multiple rows returned; we use the first row for the core patient information and manipulate the returned data to add an 'ADDRESSES' property containing the address history.
Fetch a patient by NHS number. We obtain the address history and so have multiple rows returned; we use the first row for the core patient information and manipulate the returned data to add an 'ADDRESSES' property containing the address history.
(fetch-patient-by-nnn-sqlvec)
(fetch-patient-by-nnn-sqlvec params)
(fetch-patient-by-nnn-sqlvec params options)
Fetch a patient by nhs number; parameters: :nnn (sqlvec)
Fetch a patient by nhs number; parameters: :nnn (sqlvec)
(fetch-patients-for-clinic opts clinic-code)
(fetch-patients-for-clinic opts clinic-code date)
Fetch a list of patients for a specific clinic, on the specified date.
Fetch a list of patients for a specific clinic, on the specified date.
(fetch-patients-for-clinic-sqlvec)
(fetch-patients-for-clinic-sqlvec params)
(fetch-patients-for-clinic-sqlvec params options)
Fetch patients for the given clinic(s) by :clinic-code on the given :date-string (YYYY/MM/DD) (sqlvec)
Fetch patients for the given clinic(s) by :clinic-code on the given :date-string (YYYY/MM/DD) (sqlvec)
(fetch-patients-for-clinics opts clinic-codes)
(fetch-patients-for-clinics opts clinic-codes date)
Fetch a list of patients for a list of clinics.
Fetch a list of patients for a list of clinics.
(get-authentication-token! opts)
(get-authentication-token! opts force?)
Get a valid authentication token, either by re-using an existing valid token, or by requesting a new token from the web service. Parameters
Get a valid authentication token, either by re-using an existing valid token, or by requesting a new token from the web service. Parameters - opts : connection configuration as per specification ::opts with the additional - force? : force a request for a new token even if we already have active one.
(patient->fhir {:keys [NHS_NUMBER HOSPITAL_ID TITLE LAST_NAME FIRST_FORENAME
SECOND_FORENAME OTHER_FORENAMES SEX DATE_BIRTH DATE_DEATH
HOME_PHONE_NO WORK_PHONE_NO GP_ID GPPR_ID ADDRESSES]
:as patient})
Returns a FHIR representation of the given patient record. TODO: add 'link' property to link to active record if this CRN has been inactivated.
Returns a FHIR representation of the given patient record. TODO: add 'link' property to link to active record if this CRN has been inactivated.
(perform-get-data request-xml)
Executes a CAV 'GetData' request - as described in the XML specified.
Executes a CAV 'GetData' request - as described in the XML specified.
(post-document opts)
Post a document to the CAV PMS webservice. Parameters:
Post a document to the CAV PMS webservice. Parameters: - :crn - case record number - :description - description of the document - :uid - unique identifier, max 15 characters - :f - file/URL/filename/InputStream/socket/bytes/string of file content - :file-type - extension of file, optional, defaults to ".pdf".
(sqlvec->query sqlvec)
Convert a sqlvec
to a SQL string.
Convert a `sqlvec` to a SQL string.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close