Closed pjmonks closed 1 day ago
@mhocc I've looked at the code and think choices are being rendered to DITA only, but not the HTML preview.
For DITA, I've traced markup generation to this:
NhsDDDataSetClass
represents a table, or a sub-group within a table.NhsDDDataSetClass.outputClassAsDita()
will render the table and rowsNhsDDDataSetClass.addAllChildRows()
will render the list of rows to add to the table/group. NhsDDDataSetClass.addChildRow()
will render the row itself, which will have two columns - a "Mandation" and a text entry containing a link to a data elementNhsDDDataSetClass.getXRefStringFromItem()
will produce the paragraphs/links for the rowNhsDDDataSetClass.createEntryParagraphs()
is where all the possible choice options are considered for rendering, including "Address choice"For HTML markup generation, a different route is taken:
NhsDDDataSet.getStructureAsHtml()
is the entry pointOtherDataSetToHtml.outputAsHtml()
to render the whole data set to HTMLOtherDataSetToHtml.outputClassAsHtml()
is the equivalent of NhsDDDataSetClass.outputClassAsDita()
, along with other similarities to the DITA codeOtherDataSetToHtml.addChildRow()
is where the problem is, it does not include the choice logic that the DITA version has.This is partially working: it gets the address links and produces the two options but there's too much hard-coding and the links are to https://datadictionary.nhs.uk/ and not styled correctly
Overview
The data set "Clinical Data Sets > COSDS > Cancer Outcomes and Services Data Set - Core" has a table called "DEMOGRAPHICS - CORE". The live published website looks like this:
But the Orchestrator preview does not show the address choice field:
Mauro Views
In Mauro, the address choice field is set up like this:
This is the "Data Set Table" profile for the "Address Choice" class:
And here is some additional hidden metadata to complete the row information:
Other choice types
Upon further investigation, I don't think any choice type is being rendered to the HTML preview of a data set table. For example, this is the live published "Diagnostic Imaging Data Set" from https://www.datadictionary.nhs.uk/data_sets/clinical_data_sets/diagnostic_imaging_data_set.html:
This is the Mauro structure of the "IMAGING CODE" choice:
But this is the preview of the data set in the Orchestrator. Notice the choice between "IMAGING CODE" elements is missing:
Fixes