public abstract class EntityFactory extends Object
Entity
objects. The behavior of this factory varies depending on whether or not a
ServiceLocator is supplied.
If a ServiceLocator is supplied, then the factories will assign an 'internal
identifier' with the root specified by
OIDService.getOID(OIDService.INTERNAL_ROOT)
and a sequence
generated extension text to every RIM object created with a
newX
method below.
If no ServiceLocator is supplied, then allocation of the internal identifier
is defered until RimService.submit()
. In this case no roundtrips
will every be performed by this class.Constructor and Description |
---|
EntityFactory() |
Modifier and Type | Method and Description |
---|---|
static EntityFactory |
getInstance()
Used by services to create an
Instance of the
EntityFactory . |
abstract Entity |
makeReference(ReferenceModifier modifier,
CS entityClass,
CE code,
CS determiner,
SET<II> id,
int versionNumber)
Creates a reference to an object that is assumed to already exist in HDR.
|
abstract NonPersonLivingSubject |
newAnimal(CE code,
CS determiner,
SET<II> id)
ANM (animal) A living subject from the animal kingdom.
|
abstract Device |
newCertificateRepresentation(CE code,
CS determiner,
SET<II> id)
CER (certificate representation) A physical artifact that stores
information about the granting of authorization.
|
abstract Material |
newChemicalSubstance(CE code,
CS determiner,
SET<II> id)
CHEM (chemical substance) A substance that is fully defined by an organic
or inorganic chemical formula, includes mixtures of other chemical
substances.
|
abstract Place |
newCity(CE code,
CS determiner,
SET<II> id)
CITY (city or town) The territory of a city, town or other municipality.
|
abstract Container |
newContainer(CE code,
CS determiner,
SET<II> id)
CONT (container) A container of other entities.
|
abstract Place |
newCountry(CE code,
CS determiner,
SET<II> id)
COUNTRY (country) The territory of a sovereign nation.
|
abstract Place |
newCounty(CE code,
CS determiner,
SET<II> id)
COUNTY (county or parish) The territory of a county, parish or other
division of a state or province.
|
abstract Device |
newDevice(CE code,
CS determiner,
SET<II> id)
DEV (device) A subtype of
ManufacturedMaterial used in an
activity, without being substantially changed through that activity. |
abstract Entity |
newEntity(CS entityClass,
CE code,
CS determiner,
SET<II> id)
Used by applications where the class is passed in rather than determined
Programmatically.
|
abstract Material |
newFood(CE code,
CS determiner,
SET<II> id)
FOOD (food) Naturally occurring, processed or manufactured entities that
are primarily used as food for humans and animals.
|
abstract Entity |
newGroup(CE code,
CS determiner,
SET<II> id)
GROUP (group) Any grouping of entities that are not considered resources.
|
abstract Entity |
newHealthChart(CE code,
CS determiner,
SET<II> id)
HCE (health chart entity) a health chart included to serve as a document
receiving entity in the management of medical records.
|
abstract Container |
newHolder(CE code,
CS determiner,
SET<II> id)
HOLD (holder) A type of container that can hold other containers or other
holders.
|
abstract Device |
newImagingModality(CE code,
CS determiner,
SET<II> id)
MODDV (imaging modality) Class to contain unique attributes of diagnostic
imaging equipment.
|
abstract LanguageCommunication |
newLanguageCommunication()
Creates a
LanguageCommunication object. |
abstract LivingSubject |
newLivingSubject(CE code,
CS determiner,
SET<II> id)
LIV (living subject) Anything that essentially has the property of life,
independent of current state (a dead human corpse is still essentially a
living subject).
|
abstract ManufacturedMaterial |
newManufacturedMaterial(CE code,
CS determiner,
SET<II> id)
MMAT (manufactured material) Corresponds to the
ManufacturedMaterial class. |
abstract Material |
newMaterial(CE code,
CS determiner,
SET<II> id)
MAT (material) Anything that has extension in space and mass, may be of
living or non-living origin.
|
abstract NonPersonLivingSubject |
newMicroorganism(CE code,
CS determiner,
SET<II> id)
MIC (microorganism) All single celled living organisms including
protozoa, bacteria, yeast, viruses, etc.
|
abstract Organization |
newNation(CE code,
CS determiner,
SET<II> id)
NAT (Nation) A politically organized body of people bonded by territory,
culture, or ethnicity, having sovereignty (to a certain extent) granted
by other states (enclosing or neighboring states).
|
abstract NonPersonLivingSubject |
newNonPersonLivingSubject(CE code,
CS determiner,
SET<II> id)
NLIV (non-person living subject) A living subject that is not a person.
|
abstract Organization |
newOrganization(CE code,
CS determiner,
SET<II> id)
ORG (organization) A social or legal structure formed by human beings.
|
abstract Person |
newPerson(CE code,
CS determiner,
SET<II> id)
PSN (Person) A living subject of the species homo sapiens.
|
abstract Place |
newPlace(CE code,
CS determiner,
SET<II> id)
PLC (place) A physical place or site with its containing structure.
|
abstract NonPersonLivingSubject |
newPlant(CE code,
CS determiner,
SET<II> id)
PLNT (plant) A living subject from the order of plants.
|
abstract Place |
newProvince(CE code,
CS determiner,
SET<II> id)
PROVINCE (state or province) The territory of a state, province,
department or other division of a sovereign country.
|
abstract Organization |
newPublicInstitution(CE code,
CS determiner,
SET<II> id)
PUB (public institution) An agency of the people of a state often
assuming some authority over a certain matter.
|
abstract Entity |
newResourceGroup(CE code,
CS determiner,
SET<II> id)
RGRP (group) A grouping of resources (personnel, material, or places) to
be used for scheduling purposes.
|
abstract Organization |
newState(CE code,
CS determiner,
SET<II> id)
STATE (State) A politically organized body of people bonded by territory,
culture, or ethnicity, having sovereignty (to a certain extent) granted
by other states (enclosing or neighboring states).
|
public static EntityFactory getInstance()
Instance
of the
EntityFactory
.public abstract Entity newEntity(CS entityClass, CE code, CS determiner, SET<II> id) throws HDRRimException
entityClass
- EntityClass
. This is a
mandatory parametercode
- Entity Code for the Entity
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Entity
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the entityClass is passed as null
.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.public abstract Entity newHealthChart(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the HealthChart
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the HealthChart
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.HCE
public abstract Organization newOrganization(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Organization
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Organization
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.ORG
public abstract Organization newPublicInstitution(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the PublicInstitution
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the PublicInstitution
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.PUB
public abstract Organization newNation(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the State
determiner
- EntityDeterminer
. This is a
mandatory parameter.id
- Identification of the Nation
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.NAT
public abstract Organization newState(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the State
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the State
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.STATE
public abstract Person newPerson(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Person
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Person
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.PSN
public abstract LivingSubject newLivingSubject(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the LivingSubject
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the LivingSubject
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.LIV
public abstract NonPersonLivingSubject newNonPersonLivingSubject(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the NonPersonLivingSubject
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the NonPersonLivingSubject
, may
be null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.NLIV
public abstract NonPersonLivingSubject newAnimal(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Animal
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Animal
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.ANM
public abstract NonPersonLivingSubject newMicroorganism(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Microorganism
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Microorganism
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.MIC
public abstract NonPersonLivingSubject newPlant(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Plant
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Plant
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.PLNT
public abstract Material newMaterial(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Material
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Material
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.MAT
public abstract Material newChemicalSubstance(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the ChemicalSubstance
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the ChemicalSubstance
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.CHEM
public abstract Material newFood(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Food
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Food
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.FOOD
public abstract ManufacturedMaterial newManufacturedMaterial(CE code, CS determiner, SET<II> id) throws HDRRimException
ManufacturedMaterial
class.code
- Entity Code for the ManufacturedMaterial
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the ManufacturedMaterial
, may
be null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.MMAT
public abstract Container newContainer(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Container
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Container
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.CONT
public abstract Container newHolder(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Holder
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Holder
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.HOLD
public abstract Device newDevice(CE code, CS determiner, SET<II> id) throws HDRRimException
DEV (device) A subtype of ManufacturedMaterial
used in an
activity, without being substantially changed through that activity. The
kind of device is identified by the code attribute inherited from
Entity
.
Usage: This includes durable (reusable) medical equipment as well as disposable equipment.
code
- Entity Code for the Device
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Device
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.DEV
public abstract Device newCertificateRepresentation(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the CertificateRepresentation
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the CertificateRepresentation
,
may be null
. However, HDR will
always generate an internal identifier. The II is unique
across a broad class (Act, Entity, non-owned Role) rather than
across the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.CER
public abstract Device newImagingModality(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the ImagingModality
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the ImagingModality
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.MODDV
public abstract Place newPlace(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Place
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Place
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.PLC
public abstract Place newCity(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the City
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the City
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.CITY
public abstract Place newCountry(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Country
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Country
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.COUNTRY
public abstract Place newCounty(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the County
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the County
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.COUNTY
public abstract Place newProvince(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the Province
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the Province
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.PROVINCE
public abstract Entity newResourceGroup(CE code, CS determiner, SET<II> id) throws HDRRimException
code
- Entity Code for the ResourceGroup
determiner
- EntityDeterminer
. This is a
mandatory parameterid
- Identification of the ResourceGroup
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.RGRP
public abstract Entity newGroup(CE code, CS determiner, SET<II> id) throws HDRRimException
EntityCode
can
further specify the type of group.code
- Entity Code for the Group
determiner
- EntityDeterminer
. This is a
mandatory parameter.id
- Identification of the Group
, may be
null
. However, HDR will always
generate an internal identifier. The II is unique across a
broad class (Act, Entity, non-owned Role) rather than across
the finer grained classes of HL7.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.EntityClass.GROUP
public abstract LanguageCommunication newLanguageCommunication() throws HDRRimException
LanguageCommunication
object.HDRRimException
- when the determiner is passed as null
.HDRRimException
- when the id passed is same as
INTERNAL_ROOT
.public abstract Entity makeReference(ReferenceModifier modifier, CS entityClass, CE code, CS determiner, SET<II> id, int versionNumber) throws HDRRimException
Creates a reference to an object that is assumed to already exist in HDR. Only the first and last argument are mandatory.
modifier
- Controls the behavior of the reference when submitted.
Possible values include:
entityClass
- Class Code of the Entity
. This parameter must be
specified for CreateIf, CreateOrOverlay, CreateOrUpdate, and
Overlay modifiers.determiner
- of the Entity
. This parameter must be specified
for CreateIf, CreateOrOverlay, CreateOrUpdate, and Overlay
modifiers.code
- entity code. This parameter may be null. However a null value
may result in validation failures for Overlay or
CreateOrOverlay references if an attempt is made to modify an
object that has a code.id
- Identification of the position, which is mandatory and cannot
be an empty set. The II is unique across a broad class (Act,
Entity, non-owned Role) rather than across the finer grained
classes of HL7.versionNumber
- Zero or a valid positive integer. If it is zero, then the
current version will be used. For positive integer values the
behavior will vary depending on the modifier. It is ignored
for CREATE_IF references. For MUST_EXIST references, the
specified versionNumber must correspond to a version in the
database. For UPDATE or OVERLAY references the specified
versionNumber must correspond to a version in the database and
be the current version at the time of submission.
CREATE_OR_OVERLAY and CREATE_OR_UPDATE references will behave
like CREATE_IF or UPDATE/OVERLAY depending on whether an
object exists in the database.Entity
object which is being referenced here.
This can be downcasted to the proper sub class of
Entity
based on the class code passed.HDRRimException
HDR Glossary HDR Concept Lists HDR Exceptions HDR Programmer's Guide HDR Implementation Guide HDR Profile Options
Copyright © 2016, 2018, Oracle. All rights reserved