Comments (6)
want to contribute a test case?
from org.hl7.fhir.core.
@patrick-werner Thanks for the fast reply. Using Hapi version 6.10, I get still an error when validating @default
slices.
Questionnaire.item[0] 1:335 - Error: Slicing cannot be evaluated: Could not match any discriminators ([linkId]) for slice Questionnaire.item:@default in profile http://dsf.dev/fhir/StructureDefinition/questionnaire|1.0.0 - None of the 1 discriminators [linkId] have fixed value, binding or existence assertions
The @default
slicing specification says: Default slices must not fix the value of the discriminator elements
.
I am not sure if there is an error in the profile or in the validation. Maybe you have time to take a look at it? The profile is the following:
<StructureDefinition xmlns="http://hl7.org/fhir">
<meta>
<tag>
<system value="http://dsf.dev/fhir/CodeSystem/read-access-tag"/>
<code value="ALL"/>
</tag>
</meta>
<url value="http://dsf.dev/fhir/StructureDefinition/questionnaire"/>
<version value="1.0.0"/>
<name value="Questionnaire"/>
<status value="active"/>
<experimental value="false"/>
<date value="2023-06-28"/>
<fhirVersion value="4.0.1"/>
<kind value="resource"/>
<abstract value="true"/>
<type value="Questionnaire"/>
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
<derivation value="constraint"/>
<differential>
<element id="Questionnaire.url">
<path value="Questionnaire.url"/>
<min value="1"/>
</element>
<element id="Questionnaire.version">
<path value="Questionnaire.version"/>
<min value="1"/>
</element>
<element id="Questionnaire.date">
<path value="Questionnaire.date"/>
<min value="1"/>
</element>
<element id="Questionnaire.item">
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
<valueString value="Parameter"/>
</extension>
<path value="Questionnaire.item"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="linkId"/>
</discriminator>
<rules value="closed"/>
</slicing>
<min value="1"/>
<constraint>
<key value="type-code"/>
<severity value="error"/>
<human value="Constrains available types from ValueSet 'http://hl7.org/fhir/item-type'"/>
<expression value="(type = 'display') or
(type = 'string') or
(type = 'text') or
(type = 'integer') or
(type = 'decimal') or
(type = 'boolean') or
(type = 'date') or
(type = 'time') or
(type = 'dateTime') or
(type = 'reference') or
(type = 'url')"/>
</constraint>
</element>
<element id="Questionnaire.item:user-task-id">
<path value="Questionnaire.item"/>
<sliceName value="user-task-id"/>
<min value="1"/>
<max value="1"/>
</element>
<element id="Questionnaire.item:user-task-id.linkId">
<path value="Questionnaire.item.linkId"/>
<fixedString value="user-task-id"/>
</element>
<element id="Questionnaire.item:user-task-id.definition">
<path value="Questionnaire.item.definition"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:user-task-id.code">
<path value="Questionnaire.item.code"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:user-task-id.prefix">
<path value="Questionnaire.item.prefix"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:user-task-id.text">
<path value="Questionnaire.item.text"/>
<min value="1"/>
<fixedString value="The user-task-id of the process execution"/>
</element>
<element id="Questionnaire.item:user-task-id.type">
<path value="Questionnaire.item.type"/>
<fixedCode value="string"/>
</element>
<element id="Questionnaire.item:user-task-id.enableWhen">
<path value="Questionnaire.item.enableWhen"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:user-task-id.answerOption">
<path value="Questionnaire.item.answerOption"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:user-task-id.initial">
<path value="Questionnaire.item.initial"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:user-task-id.item">
<path value="Questionnaire.item.item"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:business-key">
<path value="Questionnaire.item"/>
<sliceName value="business-key"/>
<min value="0"/>
<max value="1"/>
</element>
<element id="Questionnaire.item:business-key.linkId">
<path value="Questionnaire.item.linkId"/>
<fixedString value="business-key"/>
</element>
<element id="Questionnaire.item:business-key.definition">
<path value="Questionnaire.item.definition"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:business-key.code">
<path value="Questionnaire.item.code"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:business-key.prefix">
<path value="Questionnaire.item.prefix"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:business-key.text">
<path value="Questionnaire.item.text"/>
<min value="1"/>
<fixedString value="The business-key of the process execution"/>
</element>
<element id="Questionnaire.item:business-key.type">
<path value="Questionnaire.item.type"/>
<fixedCode value="string"/>
</element>
<element id="Questionnaire.item:business-key.enableWhen">
<path value="Questionnaire.item.enableWhen"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:business-key.answerOption">
<path value="Questionnaire.item.answerOption"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:business-key.initial">
<path value="Questionnaire.item.initial"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:business-key.item">
<path value="Questionnaire.item.item"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:@default">
<path value="Questionnaire.item"/>
<sliceName value="@default"/>
<min value="0"/>
<max value="*"/>
</element>
<element id="Questionnaire.item:@default.definition">
<path value="Questionnaire.item.definition"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:@default.code">
<path value="Questionnaire.item.code"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:@default.prefix">
<path value="Questionnaire.item.prefix"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:@default.text">
<path value="Questionnaire.item.text"/>
<min value="1"/>
</element>
<element id="Questionnaire.item:@default.type">
<path value="Questionnaire.item.type"/>
<min value="1"/>
</element>
<element id="Questionnaire.item:@default.enableWhen">
<path value="Questionnaire.item.enableWhen"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:@default.answerOption">
<path value="Questionnaire.item.answerOption"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:@default.initial">
<path value="Questionnaire.item.initial"/>
<max value="0"/>
</element>
<element id="Questionnaire.item:@default.item">
<path value="Questionnaire.item.item"/>
<max value="0"/>
</element>
</differential>
</StructureDefinition>
A resource I use for testing is the following:
<Questionnaire xmlns="http://hl7.org/fhir">
<meta>
<profile value="http://dsf.dev/fhir/StructureDefinition/questionnaire"></profile>
</meta>
<url value="http://dsf.dev/fhir/Questionnaire/hello-world"></url>
<version value="0.1.0"></version>
<status value="active"></status>
<date value="2023-12-06T10:26:47+01:00"></date>
<item>
<linkId value="business-key"></linkId>
<text value="The business-key of the process execution"></text>
<type value="string"></type>
</item>
<item>
<linkId value="user-task-id"></linkId>
<text value="The user-task-id of the process execution"></text>
<type value="string"></type>
</item>
<item>
<linkId value="valid-type"></linkId>
<text value="valid type"></text>
<type value="string"></type>
</item>
</Questionnaire>
from org.hl7.fhir.core.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.
from org.hl7.fhir.core.
Has this issue been fixed in a version > 5.1.0?
from org.hl7.fhir.core.
@patrick-werner any updates?
from org.hl7.fhir.core.
@wetret according to: https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/.40default.20slice/near/399975447 it should be supported in recent versions
from org.hl7.fhir.core.
Related Issues (20)
- Validator based on a directory does not check local file in profile based slices HOT 1
- Errors splitting canonical in URL and version HOT 11
- Request CDA namespace prefix be added to support Australian CDA transformations
- SNOWMED - oops
- Error element [path] launches straight into slicing without the slicing being set up properly first
- Error Index -1 out of bounds for length 0 in derived profiles where base profile has sliced value[x] element on type
- Cannot resolve plugin org.sonatype.plugins:nexus-staging-maven-plugin:<unknown>
- Concurrency issues with package cache in validator HOT 3
- Support for fhirpath evaluation
- FHIRPath expression with date math
- Mime type checking can't handle dash character
- Boundary functions return incorrect results HOT 2
- Reopen https://github.com/hapifhir/org.hl7.fhir.core/issues/1524 HOT 2
- Validator circular dependency issue
- The `div` field is missing in `Narrative.listChildren` for some versions. HOT 4
- "-no-extensible-binding-warnings" not working properly HOT 1
- Anchors broken in validator html report
- Validator CLI - Loading of profiles via canonical URL doesn't take into account path params HOT 1
- Validator CLI - Loading of profiles via local file doesn't appear to work HOT 1
- Class too large: org/hl7/fhir/r4/formats/JsonParser HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org.hl7.fhir.core.