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

contact.telecom.extension.valueUrl does not validate phone number values #62

Closed
lee-hyunkyu opened this issue Mar 15, 2021 · 2 comments
Closed

Comments

@lee-hyunkyu
Copy link

lee-hyunkyu commented Mar 15, 2021

  • fhir.resources version: 6.1.0
  • Python version: 3.7
  • Operating System: Ubuntu 18.04

Description

I'm trying to construct a Patient resource after fetching it via a FHIR call.

What I Did

I fetched some data and tried to construct it using the Patient model class.

The contact field for the resulting patient information was

"contact": [
    {
        "relationship": [{ /* a relationship object */}],
        "name": { /* a name object */ },
        "telecom": [{
            "extension": [{
                "valueUrl": "(123)123-1234",
                "url": "http://hl7.org/fhir/StructureDefinition/iso21090-TEL-address"
            }],
            /* rest of the telecom object*/
        }]
    }],
contact -> 0 -> telecom -> 0 -> extension -> 0 -> valueUrl
invalid or missing URL scheme (type=value_error.url.scheme)

The url rfc defines that parenthesis are not valid so the sender seems to be at fault. Is there any way for me to continue to use the library to construct this Patient resource and specifically ignore validating this field?

@nazrulworld
Copy link
Owner

One solution could be if possible change valueUrl to valueString. But it is not possible to turn that validation off.

@lee-hyunkyu
Copy link
Author

Unfortunately that's not possible. Going to close the issue since we found a workaround

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

2 participants