Move metadata extractor upgrades to Core#794
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #794 +/- ##
=======================================
Coverage 89.79% 89.79%
=======================================
Files 291 291
Lines 8365 8371 +6
Branches 2002 2005 +3
=======================================
+ Hits 7511 7517 +6
Misses 799 799
Partials 55 55
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
karlnaden
left a comment
There was a problem hiding this comment.
- See comment for a discussion of whether we want this in core or not - looking at it more closely, I'm not so sure.
- The testing instructions aren't quite right. This core metadata extractor isn't invoked at runtime, but instead at generation time. So the real verification is to
- check out this branch of core
- check out the PAS PR that removes the PAS code and relies solely on the core must support metadata extraction.
- force loading of the inferno_core gem from the local directory as explained
- run
bundle exec rake pas:generateand confirm that no file changes are made (extraction logic hasn't changed.
| def save_pattern_identifier_slice(pattern_identifier, runtime_path) | ||
| identifier_type_coding = pattern_identifier.type&.coding&.first | ||
| if identifier_type_coding | ||
| type_path = runtime_path.present? ? "#{runtime_path}.type" : 'type' | ||
| { | ||
| type: 'patternCodeableConcept', | ||
| path: type_path, | ||
| code: identifier_type_coding.code, | ||
| system: identifier_type_coding.system | ||
| } | ||
| else |
There was a problem hiding this comment.
Add a comment to the top of this method explaining the special case and maybe pointing to an example profile and element. I think the gist is that this is a case where Inferno's handling of patterns diverges from FHIR's: In the FHIR representation, the pattern is an identifier with just the type present and it matches any identifier with the indicated type at a given path. from the PAS insurer profile:
{
"id" : "Organization.identifier:PI",
"path" : "Organization.identifier",
"sliceName" : "PI",
...
"type" : [{
"code" : "Identifier"
}],
"patternIdentifier" : {
"type" : {
"coding" : [{
"system" : "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType",
"code" : "payerid"
}]
}
},
...
},
In Inferno, the case we have so far for identifiers is a match on the system, and so a match on the type wasn't working. However, this update (already implemented and used in PAS) represents an identifier pattern with type specified as a CodeableConcept pattern and adding type to the path. That works, and it is a divergence from the FHIR approach, which is a bit worrying. That may mean it is better to leave it as an override in PAS after all for now. At some point later, we could consider following the FHIR representation.
|
Closing as we have decided on review it is best to leave these changes in PAS |
Several metadata extractor enhancements were made to a custom extension to the service in the Davinci PAS test kit. These enhancements were found to be useful for all kits, so they have been moved to Inferno Core for direct use through the base class.
To Test:
support-v2.2.0branch of the PAS test kitgem 'inferno_core', path: 'relative/path/to/local/repo'to the gemfile and runbundle