Stream: smart/scheduling-links
Topic: Consumer: MITRE / Inferno Tests
Josh Mandel (Apr 12 2021 at 17:25):
Don't want to miss out here, for completeness @Robert Scanlon @Michael O'Keefe :-) I think y'all are primarily in "rapid response" mode, but if there are specific plans for this week that you want to highlight here, don't hesitate.
Josh Mandel (Apr 13 2021 at 18:58):
Just made updates to the sample data https://raw.githubusercontent.com/smart-on-fhir/smart-scheduling-links/master/examples/$bulk-publish, based on helpful Inferno results! When I re-run the tool I'm getting Inferno results with:
Fatal Error: undefined local variable or method `extension' for #<Inferno::Sequence::SmartSchedulingLinksBasicSequence:0x000055dc9b18eb60> Did you mean? extend
I may be doing something wrong, but I think Inferno is also doing something wrong here ;-)
@Michael O'Keefe @Robert Scanlon
Michael O'Keefe (Apr 13 2021 at 19:00):
@Josh Mandel That does seem like it may be an Inferno-side issue. I'll take a look!
Josh Mandel (Apr 13 2021 at 19:00):
The thing I was doing wrong (probably) was mis-spelling "phone" as "hhone"
{"url":"http://fhir-registry.smarthealthit.org/StructureDefinition/booking-hhone","valueString":"000-000-0000"},
... and fixed.
Robert Scanlon (Apr 13 2021 at 19:05):
Yeah, this variable name is wrong: https://github.com/onc-healthit/inferno/blob/8ef8a5e757a65947061fd14f87beed1b7bd2b136/lib/modules/smart_scheduling_links/smart_scheduling_links_basic_sequence.rb#L785
Michael O'Keefe (Apr 13 2021 at 19:05):
Yup, just found the same thing
Robert Scanlon (Apr 13 2021 at 19:10):
Is this covered as a warning in profile validation now @Michael O'Keefe? We may be able to just remove this code. Less code = fewer potential bugs.
Michael O'Keefe (Apr 13 2021 at 19:12):
Yeah, the extensions/profiles should catch this as a part of the structureDefinitions we built using FSH
Robert Scanlon (Apr 15 2021 at 13:15):
@Josh Mandel We updated our tests to fix that bug, and now yours pass. Though there is one warning that comes through still, not sure if that is an issue with our invariant or if that is ok.
Robert Scanlon (Apr 15 2021 at 13:17):
Also, @Nick Robison, @Josh Mandel -- we can trigger Inferno to run tests against endpoints that are published in Github when PRs are opened (or any time that GitHub workflows support). I put together a quick, messy PR as a proof of concept here: https://github.com/arscan/smart-scheduling-links/pull/1. If it is worth exploring further I can clean it up and try out any other ideas that people might think is helpful. FYI @Michael O'Keefe
Josh Mandel (Apr 15 2021 at 13:35):
Very cool, re: GH workflow! Have you thought about encapsulating this as a GH Action so it would be easier for others to add up to their own projects without having to include as much boilerplate?
Rob Brackett (Apr 20 2021 at 19:42):
Apologies for just dropping in here, but wanted to make sure this is the right URL to use the validor at: https://infernotest.healthit.gov/community/
I keep losing that link and then spending 10 minutes trying to find it again, since it’s not directly accessible from anywhere on https://inferno.healthit.gov
Josh Mandel (Apr 20 2021 at 19:47):
That's the right link, thanks for dropping it here! (For me, I have our Connectathon Spreadsheet open as my source of truth during the event.)
Robert Scanlon (Apr 20 2021 at 19:48):
I know that's not very logical / discoverable, we'll see if we can have a setup that makes a little more sense in the future for these draft standards.
Rob Brackett (Apr 20 2021 at 21:13):
No worries! It’s mainly that I keep forgetting it’s in the sheet, and that seems to be the last place I look for some reason.
Robert Scanlon (Apr 22 2021 at 02:42):
I just pushed up an update to https://infernotest.healthit.gov/community, which incorporates a few newer rules from the FHIR profiles we put together, removes some redundant tests, and adds a few more checks for things that we missed before (e.g. improperly formatted ids).
Robert Scanlon (Apr 22 2021 at 02:46):
Most of the endpoints I've seen have at least something (technically) structurally incorrect with the data being sent back. Most issues are very minor (e.g. using a String instead of a Number for an integer element), but worth fixing.
Josh Mandel (Apr 22 2021 at 11:28):
For sure! Can you add an "Inferno Feedback" column to the spreadsheet with these issues perhaps @Robert Scanlon ?
Robert Scanlon (Apr 22 2021 at 13:52):
All set, we added another column with issues we found, as of last night / this morning. Happy to help anyone that has any questions.
Robert Scanlon (Apr 22 2021 at 13:59):
There are various flavors of 'warnings' there, so maybe I should downgrade the less important ones to 'informational'. I think it is a good idea to really distinguish the ones that are important enough to warrant some work to get into the feed as true warnings, and downgrade ones that are less important or could be derived from other sources (e.g. position if you have an address)
Rob Brackett (Jun 11 2021 at 20:28):
I had missed this before, but the definition for id
in SMART Scheduling Links doesn’t match FHIR. Specifically, SMART SL allows underscores but not dashes, and FHIR allows dashes but not underscores. Inferno is using a regex that matches the FHIR definition.
(I just noticed this because I’m advising a team helping PrepMod to implement the standard, and their IDs use _
. The validator yelled at me.)
Rob Brackett (Jun 11 2021 at 20:29):
Not sure if that’s a validator problem or if the spec should be changed (kinda seems like the latter, but worried other implementers may be using underscores and it’s hard to change now).
Rob Brackett (Jun 11 2021 at 20:33):
The validator is also reporting Resource type "NilClass" at line "1" does not match type defined in output "Slot")
, but I don’t see anything that looks like we might have serialized out that string somewhere. Guessing this is happening because the slot’s schedule ID has an underscore, and somewhere in Inferno it’s resolving to nil
. If that’s the case, there ought to be a better error to display.
Rob Brackett (Jun 11 2021 at 20:34):
URL under test, for reference: https://test-prepmod.doh.wa.gov/api/smart-scheduling-links/$bulk-publish
Josh Mandel (Jun 11 2021 at 20:35):
I had missed this before, but the definition for id in SMART Scheduling Links doesn’t match FHIR. Specifically, SMART SL allows underscores but not dashes, and FHIR allows dashes but not underscores. Inferno is using a regex that matches the FHIR definition.
Whoa, good catch!
Josh Mandel (Jun 11 2021 at 20:37):
This is a spec bug for scheduling links. That's the challenge of being "helpful" by surfacing relevant details from the FHIR spec --- suddenly, you've got a surface area for errors/mismatches.
Josh Mandel (Jun 11 2021 at 20:37):
Fixing in https://github.com/smart-on-fhir/smart-scheduling-links/pull/44
Robert Scanlon (Jun 11 2021 at 20:37):
Yeah this looks like a typo in the SMART SL spec? Requiring something that isn't valid FHIR would be problematic.
Josh Mandel (Jun 11 2021 at 20:37):
yep.
Josh Mandel (Jun 11 2021 at 20:37):
If someone gives me a quick review of the PR, will merge.
Robert Scanlon (Jun 11 2021 at 20:41):
Didn't see any other spots in the spec where the format of the id was described, so gave it an approval.
Robert Scanlon (Jun 11 2021 at 20:44):
@Rob Brackett the Slot resources are missing the "resourceType" field, which is why our unhelpful error popped up. We haven't run into that specific issue before.
Rob Brackett (Jun 11 2021 at 20:45):
Ahhhhhh, so obvious I didn’t see it at all. D'oh!
Rob Brackett (Jun 22 2021 at 18:01):
Was looking at Rite Aid's latest and noticed that the validator doesn’t seem to be validating the format of transactionTime
in the manifest file. Rite Aid is outputting valid ISO 8601 (I think?), but it’s not a valid FHIR instant since it doesn't include a TZ offset at uses a space instead of T
to delimit date and time: "2021-06-22 13:51"
Rob Brackett (Jun 22 2021 at 18:04):
Also wondering if it might be useful to sanity-check things like the capitalization of extensions. Technically state
and State
are different extensions, but it seems reasonable to error if the only difference from a known extensions is capitalization: https://chat.fhir.org/#narrow/stream/281612-smart.2Fscheduling-links/topic/Publisher.3A.20Rite-Aid/near/243554928
Robert Scanlon (Jun 24 2021 at 21:44):
Yeah, at the least it should be a warning if it is a common mistake. Might be good to make it an error even if it technically isn't "non-conformant" syntactically, because it is very clear that this was done by mistake and they didn't intend to define a new extension.
Robert Scanlon (Jun 26 2021 at 04:12):
I just deployed an update that now checks that the transactionTime is consistent with FHIR's instant
type (iso8601 + timezone offset or Z
)
Last updated: Apr 12 2022 at 19:14 UTC