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

Temporality #22

Open
ShahimEssaid opened this issue Oct 28, 2020 · 5 comments
Open

Temporality #22

ShahimEssaid opened this issue Oct 28, 2020 · 5 comments
Labels
domain A tag for domain related issues regardless of their representation in models.

Comments

@ShahimEssaid
Copy link
Member

Discussion thread for page: https://phenopackets-analysis.readthedocs.io/en/latest/domain-entities/temporality.html

@ShahimEssaid ShahimEssaid added the domain A tag for domain related issues regardless of their representation in models. label Oct 28, 2020
@ShahimEssaid
Copy link
Member Author

ShahimEssaid commented Oct 29, 2020

@rrfreimuth @pnrobinson would FHIR SimpleQuantity and Range be enough to capture Phenopackets' Age and AgeRange? We'll convert from the original PP ISO8601 string based on the smallest unit in the string and make that unit the unit for FHIR Quantity. There is still some lossiness with this but we can also capture the original string with this general extension on the Quantity datatype, with or without a profile on the datatype.

@ShahimEssaid
Copy link
Member Author

ShahimEssaid commented Oct 29, 2020

For example, the age example here can be represented as shown below if we do some rough conversion with 25x365.25 + 3x30 + 2 and make the unit days. And also capture the original string. We can profile Quantity (so we can have a page in the IG to document this and bind the extension) and use this Quantity profile wherever we need to capture Age. Same for AgeRange. We profile FHIR Range to use our Quantity profile.

    {
      "resource": {
        "resourceType": "Observation",
        "code": {
          "text": "Age of something"
        },
        "valueQuantity": {
          "unit": "Days",
          "value": 274029.5,
          "system": "http://someUnitSystem",
          "code": "SomeDayUnitCode",
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/originalText",
              "valueString": "P25Y3M2D"
            }
          ]
        }
      }
    }

@pnrobinson
Copy link
Collaborator

In general, I do not think we should worry about FHIR elements capturing all nuances of a phenopacket -- there are few compelling uses cases where we would transform a protobuf phenopacket into FHIR, the vast majority of interesting use cases are in the other direction (IMO).
If we accept this, then we should try to be able to transform any valid FHIR modality for representing Age into one of the phenopacket representations.

@pnrobinson
Copy link
Collaborator

For instance, we do not expect to get an Age range for an individual patient from FHIR (this is not the way we would represent Age in an EHR). Therefore, we do not need to worry about this.

@ShahimEssaid
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain A tag for domain related issues regardless of their representation in models.
Projects
None yet
Development

No branches or pull requests

2 participants