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

Generating Narrative Div's #72

Open
BillyYarosh-WellSky opened this issue Jul 30, 2020 · 3 comments
Open

Generating Narrative Div's #72

BillyYarosh-WellSky opened this issue Jul 30, 2020 · 3 comments

Comments

@BillyYarosh-WellSky
Copy link

Is there any tooling or recommendation on how to generate a Narrative div for specific resources?

@arscan
Copy link
Member

arscan commented Jul 30, 2020

Could you elaborate a little more on what you are trying to do?

@BillyYarosh-WellSky
Copy link
Author

BillyYarosh-WellSky commented Jul 30, 2020

So a Patient resource has a Narrative ('text') section. I was wondering if there was a method for generating those divs like in this example:

{
  "resourceType" : "Patient",
  "id" : "example",
  "meta" : {
    "profile" : [
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"
    ]
  },
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t<p>\n\t\t\t\t<b>Generated Narrative with Details</b>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<b>id</b>: example</p>\n\t\t\t<p>\n\t\t\t\t<b>identifier</b>: Medical Record Number = 1032702 (USUAL)</p>\n\t\t\t<p>\n\t\t\t\t<b>active</b>: true</p>\n\t\t\t<p>\n\t\t\t\t<b>name</b>: Amy V. Shaw </p>\n\t\t\t<p>\n\t\t\t\t<b>telecom</b>: ph: 555-555-5555(HOME), [email protected]</p>\n\t\t\t<p>\n\t\t\t\t<b>gender</b>: </p>\n\t\t\t<p>\n\t\t\t\t<b>birthsex</b>: Female</p>\n\t\t\t<p>\n\t\t\t\t<b>birthDate</b>: Feb 20, 2007</p>\n\t\t\t<p>\n\t\t\t\t<b>address</b>: 49 Meadow St Mounds OK 74047 US </p>\n\t\t\t<p>\n\t\t\t\t<b>race</b>: White, American Indian or Alaska Native, Asian, Shoshone, Filipino</p>\n\t\t\t<p>\n\t\t\t\t<b>ethnicity</b>: Hispanic or Latino, Dominican, Mexican</p>\n\t\t</div>"
  },
  ...
}

This is something that is needed for a CCDS document, and was wondering if this library supports a method for generating that xhtml text in a narrative from the model?

@arscan
Copy link
Member

arscan commented Jul 30, 2020

We do not have any helper functionality to generate narratives based on the content of a resource. That would be a useful thing for the library to do though, I think.

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