Class ChEmedEprMedicationIngredient
java.lang.Object
org.hl7.fhir.r4.model.Base
org.hl7.fhir.r4.model.Element
org.hl7.fhir.r4.model.BackboneElement
org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent
org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprMedicationIngredient
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement
,Serializable
,org.hl7.fhir.instance.model.api.IBase
,org.hl7.fhir.instance.model.api.IBaseBackboneElement
,org.hl7.fhir.instance.model.api.IBaseElement
,org.hl7.fhir.instance.model.api.IBaseHasExtensions
,org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions
public class ChEmedEprMedicationIngredient
extends org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent
The HAPI custom structure for CH-EMED-EPR MedicationIngredient.
- Author:
- Ronaldo Loureiro
- See Also:
-
Field Summary
Fields inherited from class org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent
isActive, item, strength
Fields inherited from class org.hl7.fhir.r4.model.BackboneElement
modifierExtension
Fields inherited from class org.hl7.fhir.r4.model.Element
extension, id
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor for the parser.ChEmedEprMedicationIngredient
(org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent ingredientComponent) Constructor fromMedication.MedicationIngredientComponent
object. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Resolves the active ingredient name.@Nullable ChEmedRatioWithEmedUnits
Resolves the dose per unit.setActiveIngredient
(ActivePharmaceuticalIngredient ingredient) Sets the active ingredient.Sets the dose per unit.Methods inherited from class org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent
addChild, copyValues, equalsDeep, equalsShallow, fhirType, getIsActive, getIsActiveElement, getItem, getItemCodeableConcept, getItemReference, getNamedProperty, getProperty, getStrength, getTypesForProperty, hasIsActive, hasIsActiveElement, hasItem, hasItemCodeableConcept, hasItemReference, hasStrength, isEmpty, listChildren, makeProperty, removeChild, setIsActive, setIsActiveElement, setItem, setProperty, setProperty, setStrength
Methods inherited from class org.hl7.fhir.r4.model.BackboneElement
addModifierExtension, addModifierExtension, addModifierExtension, checkNoModifiers, copyExtensions, copyNewExtensions, copyValues, getExtensionByUrl, getExtensionsByUrl, getExtensionsByUrl, getModifierExtension, getModifierExtensionFirstRep, hasExtension, hasExtension, hasModifierExtension, removeExtension, setModifierExtension
Methods inherited from class org.hl7.fhir.r4.model.Element
addExtension, addExtension, addExtension, copyExtensions, copyNewExtensions, copyValues, getExtension, getExtensionFirstRep, getExtensionString, getId, getIdBase, getIdElement, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, noExtensions, setDisallowExtensions, setExtension, setId, setIdBase, setIdElement
Methods inherited from class org.hl7.fhir.r4.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getXhtml, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isPrimitive, isResource, listChildrenByName, listChildrenByName, primitiveValue, setUserData, setUserDataINN
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseElement
getUserData, setUserData
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseHasExtensions
addExtension, getExtension, hasExtension
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions
addModifierExtension, getModifierExtension, hasModifierExtension
-
Constructor Details
-
ChEmedEprMedicationIngredient
public ChEmedEprMedicationIngredient()Empty constructor for the parser. -
ChEmedEprMedicationIngredient
public ChEmedEprMedicationIngredient(org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent ingredientComponent) Constructor fromMedication.MedicationIngredientComponent
object.- Parameters:
ingredientComponent
- the ingredient
-
-
Method Details
-
resolveStrength
@ExpectsValidResource public @Nullable ChEmedRatioWithEmedUnits resolveStrength() throws InvalidEmedContentExceptionResolves the dose per unit.- Returns:
- the dose per unit.
- Throws:
InvalidEmedContentException
- if the dose per unit isn't of the right type.
-
resolveActiveIngredient
@ExpectsValidResource public ActivePharmaceuticalIngredient resolveActiveIngredient() throws InvalidEmedContentExceptionResolves the active ingredient name.- Returns:
- the active ingredient name.
- Throws:
InvalidEmedContentException
- if the active ingredient is missing or unknown.
-
setStrength
Sets the dose per unit.- Parameters:
ratio
- the dose per unit.- Returns:
- this.
-
setActiveIngredient
Sets the active ingredient.- Parameters:
ingredient
- the active ingredient.- Returns:
- this.
-
copy
- Overrides:
copy
in classorg.hl7.fhir.r4.model.Medication.MedicationIngredientComponent
-