Skip to content

Commit

Permalink
adding conditional feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelynJefferson committed Sep 16, 2024
1 parent c3b1785 commit d032ee8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/export/ValueSetExporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export class ValueSetExporter {
this.addConceptComposeElement(composeElement, valueSet.compose.include);
}
} else {
if (composeElement.valueSet?.length != 0) {
if (composeElement.valueSet?.length !== 0 || composeElement.system != undefined) {
valueSet.compose.include.push(composeElement);
}
}
Expand Down
6 changes: 6 additions & 0 deletions test/export/ValueSetExporter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ describe('ValueSetExporter', () => {
valueSet.id = 'dinner-vs';
const component = new ValueSetConceptComponentRule(true);
component.from = {
system: 'http://food.org/food1',
valueSets: [
'http://food.org/food/ValueSet/hot-food',
'http://food.org/food/ValueSet/cold-food',
Expand All @@ -488,6 +489,7 @@ describe('ValueSetExporter', () => {
};
const component2 = new ValueSetConceptComponentRule(true);
component2.from = {
system: 'http://food.org/food2',
valueSets: ['DinnerVS', 'http://hl7.org/fhir/us/minimal/ValueSet/dinner-vs', 'dinner-vs']
};
valueSet.rules.push(component);
Expand All @@ -504,10 +506,14 @@ describe('ValueSetExporter', () => {
compose: {
include: [
{
system: 'http://food.org/food1',
valueSet: [
'http://food.org/food/ValueSet/hot-food',
'http://food.org/food/ValueSet/cold-food'
]
},
{
system: 'http://food.org/food2'
}
]
}
Expand Down

0 comments on commit d032ee8

Please sign in to comment.