Ejemplo n.º 1
0
 public CodeableConcept castToCodeableConcept(Base b) throws FHIRException {
   if (b instanceof CodeableConcept) return (CodeableConcept) b;
   else if (b instanceof CodeType) {
     CodeableConcept cc = new CodeableConcept();
     cc.addCoding().setCode(((CodeType) b).asStringValue());
     return cc;
   } else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a CodeableConcept");
 }
Ejemplo n.º 2
0
 public SimpleQuantity castToSimpleQuantity(Base b) throws FHIRException {
   if (b instanceof SimpleQuantity) return (SimpleQuantity) b;
   else if (b instanceof Quantity) {
     Quantity q = (Quantity) b;
     SimpleQuantity sq = new SimpleQuantity();
     sq.setValueElement(q.getValueElement());
     sq.setComparatorElement(q.getComparatorElement());
     sq.setUnitElement(q.getUnitElement());
     sq.setSystemElement(q.getSystemElement());
     sq.setCodeElement(q.getCodeElement());
     return sq;
   } else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to an SimpleQuantity");
 }
Ejemplo n.º 3
0
 public PositiveIntType castToPositiveInt(Base b) throws FHIRException {
   if (b instanceof PositiveIntType) return (PositiveIntType) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a PositiveInt");
 }
Ejemplo n.º 4
0
 public DecimalType castToDecimal(Base b) throws FHIRException {
   if (b instanceof DecimalType) return (DecimalType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Decimal");
 }
Ejemplo n.º 5
0
 public Duration castToDuration(Base b) throws FHIRException {
   if (b instanceof Duration) return (Duration) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to an Duration");
 }
Ejemplo n.º 6
0
 public Meta castToMeta(Base b) throws FHIRException {
   if (b instanceof Meta) return (Meta) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Meta");
 }
Ejemplo n.º 7
0
 public Narrative castToNarrative(Base b) throws FHIRException {
   if (b instanceof Narrative) return (Narrative) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Narrative");
 }
Ejemplo n.º 8
0
 public HumanName castToHumanName(Base b) throws FHIRException {
   if (b instanceof HumanName) return (HumanName) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a HumanName");
 }
Ejemplo n.º 9
0
 public ContactPoint castToContactPoint(Base b) throws FHIRException {
   if (b instanceof ContactPoint) return (ContactPoint) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a ContactPoint");
 }
Ejemplo n.º 10
0
 public Period castToPeriod(Base b) throws FHIRException {
   if (b instanceof Period) return (Period) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Period");
 }
Ejemplo n.º 11
0
 public SampledData castToSampledData(Base b) throws FHIRException {
   if (b instanceof SampledData) return (SampledData) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a SampledData");
 }
Ejemplo n.º 12
0
 public IdType castToId(Base b) throws FHIRException {
   if (b instanceof IdType) return (IdType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Id");
 }
Ejemplo n.º 13
0
 public UnsignedIntType castToUnsignedInt(Base b) throws FHIRException {
   if (b instanceof UnsignedIntType) return (UnsignedIntType) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a UnsignedInt");
 }
Ejemplo n.º 14
0
 public CodeType castToCode(Base b) throws FHIRException {
   if (b instanceof CodeType) return (CodeType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Code");
 }
Ejemplo n.º 15
0
 public DateTimeType castToDateTime(Base b) throws FHIRException {
   if (b instanceof DateTimeType) return (DateTimeType) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a DateTime");
 }
Ejemplo n.º 16
0
 public UriType castToUri(Base b) throws FHIRException {
   if (b instanceof UriType) return (UriType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Uri");
 }
Ejemplo n.º 17
0
 public StringType castToString(Base b) throws FHIRException {
   if (b instanceof StringType) return (StringType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a String");
 }
Ejemplo n.º 18
0
 public Base64BinaryType castToBase64Binary(Base b) throws FHIRException {
   if (b instanceof Base64BinaryType) return (Base64BinaryType) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a Base64Binary");
 }
Ejemplo n.º 19
0
 public Ratio castToRatio(Base b) throws FHIRException {
   if (b instanceof Ratio) return (Ratio) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Ratio");
 }
Ejemplo n.º 20
0
 public MarkdownType castToMarkdown(Base b) throws FHIRException {
   if (b instanceof MarkdownType) return (MarkdownType) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Markdown");
 }
Ejemplo n.º 21
0
 public Signature castToSignature(Base b) throws FHIRException {
   if (b instanceof Signature) return (Signature) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Signature");
 }
Ejemplo n.º 22
0
 public Attachment castToAttachment(Base b) throws FHIRException {
   if (b instanceof Attachment) return (Attachment) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to an Attachment");
 }
Ejemplo n.º 23
0
 public Address castToAddress(Base b) throws FHIRException {
   if (b instanceof Address) return (Address) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Address");
 }
Ejemplo n.º 24
0
 public Identifier castToIdentifier(Base b) throws FHIRException {
   if (b instanceof Identifier) return (Identifier) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to an Identifier");
 }
Ejemplo n.º 25
0
 public Timing castToTiming(Base b) throws FHIRException {
   if (b instanceof Timing) return (Timing) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Timing");
 }
Ejemplo n.º 26
0
 public Quantity castToQuantity(Base b) throws FHIRException {
   if (b instanceof Quantity) return (Quantity) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to an Quantity");
 }
Ejemplo n.º 27
0
 public Resource castToResource(Base b) throws FHIRException {
   if (b instanceof Resource) return (Resource) b;
   else
     throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Resource");
 }
Ejemplo n.º 28
0
 public Money castToMoney(Base b) throws FHIRException {
   if (b instanceof Money) return (Money) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to an Money");
 }
Ejemplo n.º 29
0
 public ElementDefinition castToElementDefinition(Base b) throws FHIRException {
   if (b instanceof ElementDefinition) return (ElementDefinition) b;
   else
     throw new FHIRException(
         "Unable to convert a " + b.getClass().getName() + " to a ElementDefinition");
 }
Ejemplo n.º 30
0
 public BooleanType castToBoolean(Base b) throws FHIRException {
   if (b instanceof BooleanType) return (BooleanType) b;
   else throw new FHIRException("Unable to convert a " + b.getClass().getName() + " to a Boolean");
 }