Created
June 18, 2020 09:47
-
-
Save retorquere/ad22113f885dadd181f9467669e0d458 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "CDM opleidingen" | |
author: "Emiliano Heyns" | |
date: "6/10/2020" | |
output: | |
html_document: default | |
word_document: default | |
--- | |
```{r setup, include=FALSE} | |
# load libraries, optionally install them | |
if(!require(pacman)){ | |
install.packages("pacman") | |
library(pacman) | |
} | |
pacman::p_load(devtools,rmdformats,rstudioapi,keyring,DBI,knitr,odbc) | |
p_load_gh("bergant/datamodelr") | |
p_load_gh("rich-iannone/DiagrammeR") | |
p_load_gh("rkrug/plantuml") | |
p_update() | |
# set up DB connections | |
connect <- function(server, database) { | |
service <- paste('database', server) | |
username <- keyring::key_list(service)[1,2] | |
if (is.na(username)) { | |
username <- rstudioapi::askForPassword("Please enter your username (or 'integrated')") | |
keyring::key_set(service=service, username = username) | |
} | |
if (username == 'integrated') { | |
conn <- dbConnect(odbc::odbc(), | |
Driver = "SQL Server", | |
Server = server, | |
Port = 1433, | |
Database = database, | |
trusted_connection = TRUE | |
) | |
} else { | |
conn <- dbConnect(odbc::odbc(), | |
Driver = "ODBC Driver 17 for SQL Server", | |
Server = server, | |
Port = 1433, | |
Database = database, | |
UID = username, | |
PWD = keyring::key_get(service, username) | |
) | |
} | |
return(conn) | |
} | |
# register plantuml to draw graphs | |
#knitr::knit_engines$set(plantuml = function(options) { | |
# code <- paste(options$code, collapse = "\n") | |
# | |
# if (is.null(options$plantuml.path)) { | |
# path <- "." | |
# } else { | |
# path <- options$plantuml.path | |
# } | |
# | |
# dir.create(path, showWarnings = FALSE, recursive = TRUE) | |
# fig <- paste0(options$label, ".", "png") | |
# fig <- file.path(path, fig) | |
# if (options$eval) plot(x = plantuml(code), vector=FALSE, file=fig) | |
# knitr::engine_output(options, out = list(knitr::include_graphics(fig))) | |
#}) | |
# register ignore to comment out chunks of markdown | |
knitr::knit_engines$set(ignore = function(options) { | |
'' | |
}) | |
# set chunk defaults | |
#knitr::opts_chunk$set(echo = TRUE) | |
knitr::opts_chunk$set(connection = "imao2_snapshots") | |
``` | |
# Inleiding | |
Het HIVL project start op dit moment aan de applicaties in de cluster CATS/Alluris. Anders dan bij de eerdere applicaties uit het cluster eHRM was het CDM deel voor opleidingen nog niet uitgewerkt; de entiteiten waren bekend, maar de data die daarin geborgd ging worden (de zogeheten attributen behorend bij de entiteiten) waren nog niet bij die entiteiten ondergebracht. In dit document worden zowel de attributen uitgewerkt, als in een enigszins technische vorm de transformatie van de bron systemen naar het CDM formaat beschreven als concrete demonstratie van wat de ontsluiting zou opleveren. | |
```{plantuml mapping-flow, eval=T, plantuml.path="images"} | |
@startuml | |
left to right direction | |
scale 2.0 | |
object "bron fysiek" as bron { | |
Het fysieke datamodel | |
van CATS/VLS/Alluris | |
} | |
object "bron UI/logisch" as ui { | |
Het logische datamodel | |
} | |
note bottom { | |
Dit is gelijk aan wat de gui van het bronsysteem laat zien. | |
FB kan hiermee de juistheid van queries toetsen. | |
} | |
object "logica herstellen" as logic #lightgreen { | |
het fysieke datamodel | |
terugbrengen naar het model | |
van de gebruikersinterface | |
} | |
object "mapping naar CDM" as map #lightgreen { | |
vertalen van bron-entiteiten | |
naar canonieke entiteiten | |
} | |
object "CDM" as cdm { | |
Het canonieke datamodel | |
} | |
bron --> logic | |
logic--> ui | |
ui --> map | |
map --> cdm | |
@enduml | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment