Skip to content

Cannot set id constraints in v8 #173

@imranq2

Description

@imranq2

In v7, we used to use the following code to allow bad ids we get from data sources before we fix them:

from fhir.resources.R4B.fhirtypes import Id


"""
These settings are for fhir.resources package

"""
regex = re.compile(
    r"^[A-Za-z0-9\-_.]+$"
)  # allow _ since some resources in our fhir server have that
# remove the 64-character limit on ids
Id.configure_constraints(min_length=1, max_length=1024 * 1024, regex=regex)

In v8, we get the error:

from fhir.resources.R4B.fhirtypes import Id was not found

What is the way to achieve the same goal in v8?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions