Closed erakadjiev closed 7 months ago
Hello @donmendelson @kleihan
Sorry for the delayed response! I've added an example XML file that demonstrates the new attributes for type scenarios. I also noticed that the schema was missing the data type scenario attributes for code sets. I've added that too.
Please take a look when you have a chance. Please also check the questions from my initial comment. Thank you!
Could we simplify this by constraining to either (type or codeSet) plus typeScenarioId that would apply to either a datatype or codeset? One less attribute.
I removed my earlier comment as I think I misunderstood the proposal. How does a typeScenarioId apply to either a datatype or codeset? If attributes codeSet and codeSetScenarioId are present but type and typeScenarioId are not, how does the constraint apply technically? Is this what it would look like?
<xs:key name="typeCodeSetKey">
<xs:selector xpath="."/>
<xs:field xpath="@type|@codeSet"/>
<xs:field xpath="@typeScenarioId"/>
</xs:key>
This PR is a follow-up to the discussion we had on #171 and in iMeetCentral. It addresses the following 2 points:
typeScenarioId
andcodeSetScenarioId
attributes. The reason for this change is that the current implicit link 1) is inconsistent with the rest of Orchestra where a missing scenario specification means "base" scenario, 2) limits the ability of having a field with scenario X point to data type or code set with scenario Y, and 3) causes confusion and mistakes for developers working with Orchestra.typeScenarioId
orcodeSetScenarioId
in field references, but still keep scenarios for field definitions and field references. This would allow 1) having just a single field definition and field references withtypeScenarioId
/codeSetScenarioId
overrides (suggested by @kleihan as a way to simplify creating of new Orchestra-based specs), 2) having multiple field scenarios for reasons other than just each pointing to a different type/code set scenario, and 3) remain more backwards compatible with 1.0 (at least in the sense that field scenarios will not need to be removed).I have some questions related to those changes.
type+codeSetScenarioId
orcodeSet+typeScenarioId
?repositoryTypes.xsd
. How can we define the following key constraints inrepository.xsd
?fieldRefs
(I assume the selector would be.//fixr:fieldRef
on therepository
level).typeScenarioId
orcodeSetScenarioId
is specified (how can we define this optionality?)fieldRuleType
, there's an override fortype
. Shouldn't there be then also overrides forcodeSet
,typeScenarioId
,codeSetScenarioId
? I.e. infieldRuleType
shouldn't we replacetype
with the newfieldTypeAttribGrp
?typeId
/codeSetId
(similar to how we do for scenarios and other elements that rely onrefidGrp
), or we'll stick to referencing the data type/code set by name only?