onc-healthit / onc-certification-g10-test-kit

ONC Certification (g)(10) Standardized API Tests
Apache License 2.0
34 stars 11 forks source link

"Must Support elements" that we do not have data for #90

Closed dwebe003 closed 2 years ago

dwebe003 commented 2 years ago

I have some tests that are being skipped due to "missing elements." However, these elements are present, it's just that we don't have data for them so we instead set them equal to the "data absent" extension.

For example, our last 2 DiagnosticReport tests are being skipped due to the "encounter" member. For these clinical notes, we do not have an associated Encounter, so we instead created a new Reference with an extension expressing the data is absent and then set the encounter to that reference (see the 2nd screenshot). Screen Shot 2022-04-12 at 11 39 02 AM Screen Shot 2022-04-12 at 11 39 22 AM

There is a similar situation happening with our Device tests. In many cases we do not have the data for "manufactureDate" and "expirationDate", so we did the same thing as above but instead used the .setManufactureDateElement and .setExpirationDateElement. Screen Shot 2022-04-12 at 11 52 42 AM Screen Shot 2022-04-12 at 11 53 10 AM

Are we going about these scenarios of absent data the wrong way?

yunwwang commented 2 years ago

Inferno does not consider extension when checking MustSupport because using DAR extension does not demonstrate that server implementation is capable of populating such element.

Please see our FAQ page: https://github.com/onc-healthit/onc-certification-g10-test-kit/wiki/FAQ#q-how-does-inferno-test-mustsupport-flag-on-an-element

dwebe003 commented 2 years ago

Well that is a bit confusing for me then. Because our implementation certainly is capable of populating that element, in the case that the data is present. But there are some cases we don't have that data.

Like with manufactureDate, some of our device info does not have that piece of information. Initially we chose to provide it a Date that would hopefully indicate this null data in the response (something like "1900-01-01"), but it seemed wrong to give it a technically false date like that.

yunwwang commented 2 years ago

Inferno "MustSupport" tests check that each "MustSupport" element is present in at least one resource from all resources returned from the server. It is not necessary that one resource contain all MustSupport elements.

Like, If your system is capable of populating manufactureDate, then you should provide at least one Device resource with a manufactureDate populated. The error message indicates that for 12 Device resources returns, none of them have Device.manufactureDate with real date value.

dwebe003 commented 2 years ago

Ah gotcha. Yep I ended up switching up that patient's data and got it all to validate properly. That dawned on me way later than it should have. Thanks for the help! I really appreciate it.