Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set id constraints in v8 #173

Open
imranq2 opened this issue Jan 29, 2025 · 0 comments
Open

Cannot set id constraints in v8 #173

imranq2 opened this issue Jan 29, 2025 · 0 comments

Comments

@imranq2
Copy link

imranq2 commented Jan 29, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant