bash get-codings.sh fhir/*.json >codings.ndjson
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
import requests | |
def get_oauth2_token(client_id, client_secret, token_url): | |
""" | |
Obtain an OAuth2 token using client credentials grant. | |
:param client_id: OAuth2 Client ID | |
:param client_secret: OAuth2 Client Secret | |
:param token_url: OAuth2 Token Endpoint URL |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import json | |
import multiprocessing as mp | |
import sys | |
from math import floor | |
from time import time | |
import requests | |
def update_resource(file): |
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
import multiprocessing as mp | |
import sys | |
from time import time | |
import requests | |
def upload_bundle(file): | |
with open(file) as bundle: | |
data = bundle.read() |
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
import json | |
import sys | |
input_bundle = json.load(sys.stdin) | |
output_bundle = { | |
"resourceType": "Bundle", | |
"type": "transaction", | |
"entry": [ | |
{ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
jq -r ".expansion.contains[] | { system: .system, code: .code, display: .display } | map(values) | @csv" ~/Desktop/source.ValueSet.json >~/Desktop/target.csv |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can't make this file beautiful and searchable because it's too large.
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
SCTID,FSN,Body,External,Nature | |
100051000032108,Bat scratch (event),0,1,0 | |
100071000032104,Bat scratch injury (disorder),0,0,1 | |
10050004,Contusion of chest (disorder),0,0,1 | |
10061007,Brain stem contusion without open intracranial wound AND with prolonged loss of consciousness (more than 24 hours) AND return to pre-existing conscious level (disorder),0,0,1 | |
10065003,Excoriated acne (disorder),0,0,1 | |
10070005,Poisoning caused by quinoline AND/OR hydroxyquinoline derivative (disorder),0,1,0 | |
10132008,Burns of multiple sites (disorder),1,0,0 | |
10186000,Toxic effect of selenium compound (disorder),0,1,0 | |
10217006,Third degree perineal laceration (disorder),0,0,1 |
NewerOlder