-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load_dictionary not working on json from documentation #72
Comments
Under the hood, The error comes from the fact that the .json in the documentation is copied out of the base dictionary. When you supply your own .json, So, nothing is wrong with your .json but you tried to perform an update that isn't currently allowed. You can try two fixes that should work: Create your own concept with it's own name{
"glu2": {
"unit": "mg/dL",
"min": 0,
"max": 1000,
"description": "glucose",
"category": "chemistry",
"sources": {
"other_database": [
{
"ids": [50809, 50931],
"table": "labevents",
"sub_var": "itemid"
}
]
}
}
}
Just update the sources part{
"glu": {
"sources": {
"mimic_demo": [
{
"ids": [999],
"table": "labevents",
"sub_var": "itemid"
}
]
}
}
} |
Calling load_dictionary on the json file provided in the documentation (https://cran.r-project.org/web/packages/ricu/ricu.pdf) (page 34/35), yields this error:
What exactly is wrong with the concept-dict.json:
{
"glu": {
"unit": "mg/dL",
"min": 0,
"max": 1000,
"description": "glucose",
"category": "chemistry",
"sources": {
"mimic_demo": [
{
"ids": [50809, 50931],
"table": "labevents",
"sub_var": "itemid"
}
]
}
}
}
I'm using R 4.2.2, and ricu 0.6.0 (below is the entry for ricu from my renv.lock):
"ricu": { "Package": "ricu", "Version": "0.6.0", "Source": "GitHub", "RemoteType": "github", "RemoteHost": "api.github.com", "RemoteRepo": "ricu-package", "RemoteUsername": "prockenschaub", "RemoteRef": "monkeypatch0.6.0", "RemoteSha": "0969a52747c71ae9f47051d640caa5df2d5169a0", "Requirements": [ "R", "assertthat", "backports", "cli", "curl", "data.table", "fansi", "fst", "jsonlite", "methods", "openssl", "prt", "readr", "rlang", "stats", "tibble", "utils", "vctrs" ], "Hash": "2681cdea2f2f3446691071ea30f745b5" },
The text was updated successfully, but these errors were encountered: