-
Notifications
You must be signed in to change notification settings - Fork 2
Update Data Script for US Core v4/v5 #26
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had any success loading this data into HAPI. Using a v4 mrburns I get:
Error uploading transaction because: {
"resourceType": "OperationOutcome",
"issue": [ {
"severity": "error",
"code": "processing",
"diagnostics": "Invalid match URL \"Practitioner?identifier=http://hl7.org/fhir/sid/us-npi|9999542092\" - No resources match this search"
} ]
}
When I look in output/data
I see a 3 transactions, 2 batches, and a Group. Does that seem right? Is output/data
still the output I should be using?
Taking a look at this... |
@Jammjammjamm Please re-review this when you are able. My filtering of data was too aggressive and I was sometimes missing references that were causing errors with HAPI. One other error that can happen with HAPI is if a conditional reference resolves to more than one resource. See the heading Conditional References under http://hl7.org/fhir/R4/http.html#trules. Because the HAPI public demo server is... well, public... there are tons and tons of Synthea resources that all sorts of people randomly post there. That means you are likely to have NPI conflicts with Organizations and Practitioners... which means that you should probably test this on your own clean FHIR server or a clean local copy of the Because of reference dependencies, POST the files in
|
Found a bug in the US Core v5 output... fixing... |
locations_to_keep.map! {|x| x.reference.split('|').last} | ||
locations_to_keep.uniq! | ||
|
||
initial_length = organization_bundle.entry.length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v4 and v5 are working fine, but I get this when generating a v3 Mr. Burns:
Prefilter constraint testing...
All constraints satisfied.
All profiles present.
Filtering selected patient data...
g..................................................................................................eee
- Filtered 349 resources down to 38 (4 seconds).
d..................................................................................................d.........................................................................................................................................................................a...............
- Filtered 732 resources down to 79 (4 seconds).
Traceback (most recent call last):
1: from uscore-data-script.rb:241:in `<main>'
/Users/smacvicar/code/uscore-data-script/lib/filter.rb:127:in `filter!': undefined method `entry' for nil:NilClass (NoMethodError)
With a US Core 4 Mr. Burns, I see the following issues:
|
I see the following issues with a US Core 5 Mr. Burns:
|
Install
This uscore-data-script requires working installations of Ruby and Java. After cloning this repository, run:
Creating the Data Set
The uscore-data-script will execute Synthea to generate synthetic patients, load the resulting
FHIR Bundles, and select certain patients based on criteria described below.
There is an optional
mrburns
parameter, which if included, will generate a single longitudinalpatient who possesses at least one resource conforming to every US Core profile. In other words,
one patient with everything. If the
mrburns
parameter is not included, the script will generatea small collection of testing patients.
There is an optional
version
parameter. Legal values arev3
,v4
, andv5
to specify a version ofthe US Core Implementation Guide. The default value is
v4
.