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

Slices are not detected #261

Open
barbrovessman opened this issue Jan 18, 2024 · 4 comments
Open

Slices are not detected #261

barbrovessman opened this issue Jan 18, 2024 · 4 comments
Assignees

Comments

@barbrovessman
Copy link

barbrovessman commented Jan 18, 2024

R5

When validating an instance that contains a required slice, the error below occurs. Sushi and genonce do not give any errors.

The profile is on Appointment and the slice on participant:

* participant ^slicing.discriminator.type = #type  
* participant ^slicing.discriminator.path = "$this.actor.resolve()"        
    
* participant ^slicing.rules = #open
* participant contains healthcareservice 1..*
* participant[healthcareservice] ^short = "HealthcareServices involved in appointment"
* participant[healthcareservice].actor 1..1
* participant[healthcareservice].actor only Reference(HealthcareService) 
{
  "issue": [
    {
      "severity": {
        "value": "error"
      },
      "code": {
        "value": "invalid"
      },
      "details": {
        "coding": [
          {
            "system": {
              "value": "http://hl7.org/fhir/dotnet-api-operation-outcome"
            },
            "code": {
              "value": "1028"
            }
          },
          {
            "system": {
              "value": "http://fire.ly/dotnet-sdk-operation-outcome-structdef-reference"
            },
            "code": {
              "value": "Appointment(http://bki.skane.se/invanartjanster/fhir/StructureDefinition/InvitationAppointment).participant[healthcareservice]"
            }
          }
        ],
        "text": {
          "value": "Instance count is 0, which is not within the specified cardinality of 1..*"
        }
      },
      "location": [
        {
          "value": "Appointment.participant, element Appointment(http://bki.skane.se/invanartjanster/fhir/StructureDefinition/InvitationAppointment).participant[healthcareservice]"
        }
      ],
      "expression": [
        {
          "value": "Appointment.participant, element Appointment(http://bki.skane.se/invanartjanster/fhir/StructureDefinition/InvitationAppointment).participant[healthcareservice]"
        }
      ]
    },
    {
      "severity": {
        "value": "error"
      },
      "code": {
        "value": "invalid"
      },
      "details": {
        "coding": [
          {
            "system": {
              "value": "http://hl7.org/fhir/dotnet-api-operation-outcome"
            },
            "code": {
              "value": "1028"
            }
          },
          {
            "system": {
              "value": "http://fire.ly/dotnet-sdk-operation-outcome-structdef-reference"
            },
            "code": {
              "value": "Appointment(http://bki.skane.se/invanartjanster/fhir/StructureDefinition/InvitationAppointment).participant[healthcareservice]"
            }
          }
        ],
        "text": {
          "value": "Instance count is 0, which is not within the specified cardinality of 1..*"
        }
      },
      "location": [
        {
          "value": "Appointment.participant, element Appointment(http://bki.skane.se/invanartjanster/fhir/StructureDefinition/InvitationAppointment).participant[healthcareservice]"
        }
      ],
      "expression": [
        {
          "value": "Appointment.participant, element Appointment(http://bki.skane.se/invanartjanster/fhir/StructureDefinition/InvitationAppointment).participant[healthcareservice]"
        }
      ]
    }
  ]
}
@ewoutkramer
Copy link
Member

Is it possible for you to include the instance you validated against + the StructureDefinition?

@barbrovessman
Copy link
Author

Sure! The attached Appointment is part of a Parameters instance being validated, but hopefully this is enough to replicate the issue
Appointment-15f86208-17c7-441e-adae-8797c5183c82.json
StructureDefinition-InvitationCommunicationRequest.json

@mmsmits
Copy link
Member

mmsmits commented Nov 19, 2024

Hi @barbrovessman
I don't think you've sent the correct profile. InvitationCommunicationRequest seems to be of type CommunicationRequest.
Could you send the http://bki.skane.se/invanartjanster/fhir/StructureDefinition/InvitationAppointment StructureDefinition?

@barbrovessman
Copy link
Author

Hi @mmsmits ,

This is the InvitationAppointment StructureDefinition:

StructureDefinition-InvitationAppointment.json

BR, Barbro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants