Add pattern support to 2016may
This commit is contained in:
parent
bd38230662
commit
2b0dbf7224
|
@ -3640,6 +3640,8 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
|
|
||||||
|
|
||||||
public static ElementDefinitionSlicingDiscriminatorComponent interpretR2Discriminator(String discriminator) {
|
public static ElementDefinitionSlicingDiscriminatorComponent interpretR2Discriminator(String discriminator) {
|
||||||
|
if (discriminator.endsWith("@pattern"))
|
||||||
|
return makeDiscriminator(DiscriminatorType.PATTERN, discriminator.length() == 8 ? "" : discriminator.substring(0,discriminator.length()-9));
|
||||||
if (discriminator.endsWith("@profile"))
|
if (discriminator.endsWith("@profile"))
|
||||||
return makeDiscriminator(DiscriminatorType.PROFILE, discriminator.length() == 8 ? "" : discriminator.substring(discriminator.length()-9));
|
return makeDiscriminator(DiscriminatorType.PROFILE, discriminator.length() == 8 ? "" : discriminator.substring(discriminator.length()-9));
|
||||||
if (discriminator.endsWith("@type"))
|
if (discriminator.endsWith("@type"))
|
||||||
|
@ -3656,6 +3658,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
public static String buildR2Discriminator(ElementDefinitionSlicingDiscriminatorComponent t) throws FHIRException {
|
public static String buildR2Discriminator(ElementDefinitionSlicingDiscriminatorComponent t) throws FHIRException {
|
||||||
switch (t.getType()) {
|
switch (t.getType()) {
|
||||||
case PROFILE: return t.getPath()+"/@profile";
|
case PROFILE: return t.getPath()+"/@profile";
|
||||||
|
case PATTERN: return t.getPath()+"/@pattern";
|
||||||
case TYPE: return t.getPath()+"/@type";
|
case TYPE: return t.getPath()+"/@type";
|
||||||
case VALUE: return t.getPath();
|
case VALUE: return t.getPath();
|
||||||
case EXISTS: return t.getPath(); // determination of value vs. exists is based on whether there's only 2 slices - one with minOccurs=1 and other with maxOccur=0
|
case EXISTS: return t.getPath(); // determination of value vs. exists is based on whether there's only 2 slices - one with minOccurs=1 and other with maxOccur=0
|
||||||
|
|
|
@ -4675,6 +4675,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
public static String buildR2Discriminator(ElementDefinitionSlicingDiscriminatorComponent t) throws FHIRException {
|
public static String buildR2Discriminator(ElementDefinitionSlicingDiscriminatorComponent t) throws FHIRException {
|
||||||
switch (t.getType()) {
|
switch (t.getType()) {
|
||||||
case PROFILE: return t.getPath()+"/@profile";
|
case PROFILE: return t.getPath()+"/@profile";
|
||||||
|
case PATTERN: return t.getPath()+"/@pattern";
|
||||||
case TYPE: return t.getPath()+"/@type";
|
case TYPE: return t.getPath()+"/@type";
|
||||||
case VALUE: return t.getPath();
|
case VALUE: return t.getPath();
|
||||||
case EXISTS: return t.getPath(); // determination of value vs. exists is based on whether there's only 2 slices - one with minOccurs=1 and other with maxOccur=0
|
case EXISTS: return t.getPath(); // determination of value vs. exists is based on whether there's only 2 slices - one with minOccurs=1 and other with maxOccur=0
|
||||||
|
|
Loading…
Reference in New Issue