BDSC-CDS / glowing-bear-medco-bioref

A modification of the MedCo front-end project which brings reference intervals to the rescue. Check the following link for a documentation about the BioRef-specific implementation: https://github.com/CHUV-DS/glowing-bear-medco-bioref/blob/bioref/bioref_doc.md
Mozilla Public License 2.0
0 stars 0 forks source link

Print additional info in the pdf export #4

Closed WiseIndian closed 2 years ago

WiseIndian commented 2 years ago

print

WiseIndian commented 2 years ago

Details of selected cohort and query are missing, they are however essential to the report generated. Variables included in the report should be: time stamp of running the analysis; full cohort selection (inclusion / exclusion criteria if set); name, unit and LOINC of the analyte(s); the reference interval, confidence intervals, and the numbers of data points considered in the calculation

WiseIndian commented 2 years ago

if the option “treat groups independently” influences the query in any way, it should also be included in the report.

WiseIndian commented 2 years ago

The query definition can be more or less difficult to implement depending on our design choice. Printing the constraints defining the cohort definition is the feature that will have most influence on the time needed to finish the pdf export creation.

The fanciest design would be to reproduce the look of the cohort summary in the pdf. But since we cannot use HTML and CSS to print in a PDF we will have to elect a more sober look.

The first step is to chose how we want the concepts to be printed. Take for example the Female concept. It would not be too hard to reuse previous code in order to print the concept with the path leading to it like so: Administrative gender > Gender > Female

A second aspect is to pretty print the combination of concepts. We could use a combination of newlines and tabs in order to make the pretty print the combination of concepts. Each OR/AND operator applied to a group of constraints would shift the content of this group to the right by means of tabs. Each concept would be separated from another concept in the same group of combination of constraint by a newline.

Imagine the following example the user choses Male AND ( Tumor grade 4 OR Tumor stage IV) as criterions for the population. It would be translated like so:

\tAdministrative Gender > Male \tAND \t\t Tumor grade > 4 \t\t OR \t\t Tumor stage > IV

In order to deal with the recursivity of the cohort definition I could implement a custom version of the ConstraintVisitor for this case.

In the case where simply adding tabulation and new lines is not working we could resort to the simpler look;

(Administrative Gender > Male AND ( Tumor grade > 4 OR Tumor stage > IV))

Harald-W commented 2 years ago

compare https://github.com/CHUV-DS/glowing-bear-medco-bioref/issues/28#issuecomment-1060627163:

Copyright notices to be displayed both in the user interface AND on the PDF-report:

We can use short copyright notices at the bottom of the UI (Try out different font sizes - notices need to be clearly legible!): LOINC ® codes and long common names: © 1995-2022, Regenstrief Institute, Inc. and the LOINC Committee GMDN ® codes, terms, and descriptions: © GMDN Agency 2005-2022. GUDI codes: courtesy of the the U.S. National Library of Medicine in collaboration with the U.S. Food and Drug Administration ICD-10-GM codes and descriptions: © 2022 Bundesinstitut für Arzneimittel und Medizinprodukte

Extended copyright notices should be used at the bottom of the page of PDF-report: LOINC: This material contains content from LOINC (http://loinc.org/). LOINC is copyright © 1995-2022, Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc. GMDN: GMDN ® is a registered trademark of The GMDN Agency. All rights reserved. The copyright and database rights in the original GMDN materials are owned by The GMDN Agency Ltd 2005-2022. Used under licence from The GMDN Agency Ltd. GUDI: Global Unique Device Identification codes from the Global Unique Device Identification Database (GUDID) have been retrieved at the AccessGUDID-portal and are a courtesy of the the U.S. National Library of Medicine in collaboration with the U.S. Food and Drug Administration. ICD-10-GM: © 2022 German Federal Institute for Drugs and Medical Devices (Bundesinstitut für Arzneimittel und Medizinprodukte BfArM) on behalf of the German Federal Ministry of Health (Bundesministerium für Gesundheit BMG) with the participation of the ICD Working Group of the Board of Trustees for Questions of Classification in Health Care (KKG)

WiseIndian commented 2 years ago

https://github.com/CHUV-DS/glowing-bear-medco-bioref/commit/3e01cb46039864f968ca1cc418ec534159b3844b