Skip to content

Use eICR Identifier object for eicr IDs #629

Description

@JNygaard-Skylight

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions