arkhn / Cohort360

A web application to find patients, build cohorts and visualize data
Apache License 2.0
0 stars 0 forks source link

Render documents for Toulouse #110

Closed MiskoG closed 3 years ago

MiskoG commented 3 years ago

Context

To give some context, this is how we currently store in FHIR for Toulouse the content of the documents available

{
  "resourceType" : "DocumentReference",

  "extension": [ 

  {
  "url": "http://arkhn-orbis-thrombectomie.com",
  "valueString": "This is the first part of the document \r\r Operator: Dr John DOE  \r Etc Etc"
  }, 

  { 
  "url": "http://arkhn-orbis-thrombectomie.com",
  "valueString": "Second part of the same document.  \r\r Etc etc"
  }  ],

  "...": "...",

}

As far as I know this is not very standard FHIR-ly speaking, but was the quickest solution to implement as Cohort already checks this extension when searching on documents.

here image

or here while creating a cohort image

Issue

Now that we can search on those documents, we want to be able to show them.

image

Today it seems that Cohort knows how to render a DocumentReference when it contains an external reference to an image (png for instance) or a PDF.

"content": [ {
    "attachment": {
          "url": "file://992327893739375.pdf",
          "title": "file://992327893739375.pdf"
     }
} ],

In our case in Toulouse, it doesn't render anything as the DocumentReference directly contains a string which is the text extracted from the original document.

I raise 2 questions here @elsiehoffet-94 @Peltier10 @simonvadee

MiskoG commented 3 years ago

@simonvadee As we discussed, we can disaply a mention at the beginning of each document preview. Something like this, just for the user to know that the original document may be presented in a slightly more "damaged" way.

----------------------------------------------------------------
Ce document a été automatiquement généré
à partir du contenu texte d'un compte-rendu médical
----------------------------------------------------------------

... actual content ...