Editing
Imms
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Technical information== Data store is the <code>kpt</code> database, under <code>imms</code> schema. A single table exists for each vaccine file; <code>extract date</code> is used to separate and identify the latest data in each table. The <code>imms.fn_imms_merge()</code> function executes daily at 1300 UTC via cron and is used to: * Insert a list of unique identifiers across all new data into a reporting table (<code>imms.imms_all</code>) * Update each row from new data to flag vaccine status separately for each vaccine, as well as update demographic/contact information. Rationale for above is that there is often overlap of patient groups between vaccine data sets (especially childhood imms, but less frequently also the Covid data) and we need to see any combination of vaccines a person requires. This function has a check on it to make sure it only executes when there is new data in underlying tables: <syntaxhighlight lang="sql" line> IF (select max(extract_date) from imms.imms_all) = (select max(extract_date) from imms.two_mmr) THEN RETURN 'No update needed EXITING'; --stop execution here if test is TRUE ELSE BEGIN --begin/end block to hold all the merge logic RAISE NOTICE 'Doing a merge'; --just for info </syntaxhighlight> ===ELT Process=== Overview of current process shown below: <mermaid> %%{init: {'theme': 'default', 'flowchart': {'useMaxWidth': false,'htmlLabels': false}, 'logLevel': 'debug', 'securityLevel': 'loose', 'themeVariables': {'fontSize': '10px', 'nodeSpacing': 20, 'rankSpacing': 20}} }%% flowchart TB subgraph EB0["π EventBridge"] direction TB EB1["cron(30 18 ? * MON,TUE *)"]:::mono-.-> EB2[Sync_Imms_Files_Weekly]:::mono end subgraph L0["βοΈ Lambda"] direction TB L1[syncImmsFileSftp]:::mono subgraph S30["π s3://kpa-imms"] direction TB S31[Check for new files]-.-> S32[Convert to parquet]-.-> S33[Move to folder path <code> parquet/ </code>] end subgraph TW0["π SFTP Endpoint"] direction TB N1[Weekly data produced]-.-> N2[Files added to filepath] end L21[copyImmsData]:::mono end subgraph DB0["ποΈ Database"] DB1[Append new data to target in schema<code> imms </code>] DB2["cron(0 13 * * 2)"]:::mono-.-> DB3["rpt.fn_imms_merge()"]:::mono-.-> DB4[Patient level view of all overdue imms<code> imms.imms_all </code>] end L1<-->TW0 L1<-->S30 TW0<-->S30 EB2-->L0 S33-.PUT Trigger.->L21 L21-.->DB1 classDef mono font-family:Courier New,fill:#393939,color:#ffffff; </mermaid> ===SWPICS=== We were previously providing a subset of this data for people domiciled in South Waikato to SWPICS. Relevant data for them can be produced via <code>imms.vw_swpics_imms</code> as needed.
Summary:
Please note that all contributions to Kautepedia are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Kautepedia:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
British English
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
British English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information