Skip to content
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

2025 01 gg ai #1883

Merged
merged 14 commits into from
Jan 16, 2025
Merged

2025 01 gg ai #1883

merged 14 commits into from
Jan 16, 2025

Conversation

grahamegrieve
Copy link
Collaborator

No description provided.


protected String getSystemName(String system) {
switch (system) {
case "http://snomed.info/sct": return "SNOMED CT";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these always http and never https?

ve.seeResource(new JsonParser().parse(TestingUtilities.loadTestResourceStream("validator", "resolution", "StructureDefinition-Patient.json")));
OperationOutcome op = ve.validate(FhirFormat.JSON, TestingUtilities.loadTestResourceStream("validator", "resolution", "relative-url-invalid.json"), null);
Assertions.assertTrue(checkOutcomes("testResolveRelativeFileValid", op,
"Observation.subject null error/structure: Unable to find a profile match for Patient/example-newborn among choices: http://hl7.org/fhir/test/StructureDefinition/PatientRule\n"+
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message here is a little hard to follow. It can't find the subject because the reference is Patient/example-newborn and the closest available ID is newborn, which means the mentioned profile is not satisfied. Is that the correct interpretation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it resolves to a resource that is not valid against the profile it is required to conform to. Agree they are hard to follow because what is being tested is an obscure corner case

ve.seeResource(new JsonParser().parse(TestingUtilities.loadTestResourceStream("validator", "resolution", "StructureDefinition-Patient.json")));
OperationOutcome op = ve.validate(FhirFormat.JSON, TestingUtilities.loadTestResourceStream("validator", "resolution", "relative-url-error.json"), null);
Assertions.assertTrue(checkOutcomes("testResolveRelativeFileValid", op,
"Observation.subject null error/structure: Unable to resolve resource with reference 'patient/example-newborn-x'\n"+
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this different from example-newborn when Patient/newborn should be the only resource found?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it won't find any resource in this case

literalPath = refPath + "->" + element.getName();
int i = element.getName().indexOf(".");
if (i == -1) {
literalPath = refPath+".resolve().ofType(" + element.getName()+")";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do elements have path formatted names?

Patient.name with refpath Some.ref.path becomes Some.ref.path.resolve().ofType(Patient).name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, they do. It was -> instead of .resolve() which is illegal, so I'm just normalising that. I looked at reworking the way element paths happen completely but it was a harder problem than I expected, so I backed out those changes. maybe another day

@@ -1015,6 +1023,30 @@ public void validate(Object appContext, List<ValidationMessage> errors, String p
codingObserver.finish(errors, stack);
errors.removeAll(messagesToRemove);
timeTracker.overall(t);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should AI run after time tracking for overall validation, or should AI be included in overall time?

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 12.89%. Comparing base (9daebf8) to head (3d0a3c4).
Report is 20 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1883      +/-   ##
============================================
+ Coverage     12.86%   12.89%   +0.03%     
- Complexity    33784    33922     +138     
============================================
  Files          2240     2248       +8     
  Lines        684894   685706     +812     
  Branches     202227   202370     +143     
============================================
+ Hits          88084    88431     +347     
- Misses       565505   565922     +417     
- Partials      31305    31353      +48     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@grahamegrieve grahamegrieve merged commit ac4b187 into master Jan 16, 2025
33 checks passed
@grahamegrieve grahamegrieve deleted the 2025-01-gg-ai branch January 16, 2025 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants