Summary
The augmentation metadata and augmentation input models use a string for the eICR IDs.
# packages/shared-models/src/shared_models/__init__.py
class TTCAugmenterInput(FrozenBaseModel):
"""Input for the augmentation service."""
persistence_id: str
original_eicr_id: str | None = None
nonstandard_codes: list[NonstandardCodeInstance] = []
passthrough: bool = False
passthrough_reason: PassthroughReason | None = None
# packages/augmentation/src/augmentation/models/application.py
class Metadata(FrozenBaseModel):
"""Model to hold augmentation metadata."""
original_eicr_id: str
augmented_eicr_id: str
nonstandard_codes: list[NonstandardCodeInstanceMetadata]
"""List of the nonstandard codes TTC attempted to resolve."""
error: str | None = None
passthrough: bool = False
passthrough_reason: PassthroughReason | None = None
While using just the root attribute of the id element is sufficient if the id does not have an extension attribute, but it is possible for 2 eICRs to have an ID with the same root, but different extensions. Therefore we should use the CdaInstanceIdentifier model used by the TTC Metadata so that we can record both the root and extension.
Summary
The augmentation metadata and augmentation input models use a string for the eICR IDs.
While using just the
rootattribute of theidelement is sufficient if theiddoes not have anextensionattribute, but it is possible for 2 eICRs to have an ID with the same root, but different extensions. Therefore we should use theCdaInstanceIdentifiermodel used by the TTCMetadataso that we can record both the root and extension.