HS.Doc.Mapping.CDAToSDAMapper
abstract class HS.Doc.Mapping.CDAToSDAMapper
Create Mapping XML from CDA to SDA. Find mapping comments from XSLT transformations, extract them, and convert the Mappings to XML file.Method Inventory
- AddHeaders()
- BuildMapping()
- BuildMappingFromData()
- BuildRegularMapping()
- BuildStructuredMapping()
- GetFiles()
- LogError()
- MergeMappings()
- OutputAllMappings()
- OutputMap()
- ParseSourceString()
- Run()
- RunOnSingleFile()
- SearchDirectory()
Parameters
parameter COMMENTEND = -->;
parameter COMMENTSTART = <!--;
parameter FIELDKW = Field;
parameter NOTEKW = Note;
parameter PATHKW = Path;
parameter SMAPPINGKW = StructuredMapping;
parameter SMAPPINGREFKW = StructuredMappingRef;
parameter SOURCEKW = Source;
parameter TARGETKW = Target;
Methods
classmethod AddHeaders(Output pMap As HS.Doc.Mapping.Common.HealthShareMapping, pCDAType As %String) as %Status
classmethod BuildMapping(Path As %String = "", Output pMap As HS.Doc.Mapping.Common.HealthShareMapping, pCDAType As %String, displayDetail As %Boolean = 0) as %Status
Extract annotations from file of given path
then convert to mapping XML.
classmethod BuildMappingFromData(ByRef pData As %String = "", Output pMap As HS.Doc.Mapping.Common.HealthShareMapping, displayDetail As %Boolean = 0) as %Status
Populate pMap using raw dataset.
classmethod BuildRegularMapping(ByRef pData As %String, pNode As %String, Output pMap As HS.Doc.Mapping.Common.HealthShareMapping, displayDetail As %Boolean = 0) as %Status
BuildRegularMapping depends upon the following XSLT comment structure and rules:
- One field mapping per comment block.
- Must have one Field line.
- Must have one SDA Streamlet Target line.
- Must have at least one SDA XPath Target line, and may have multiple if there are not multiple CDA Source lines.
- Must have at least one CDA Source line, and may have multiple if there are not multiple SDA XPath Target lines.
- May have zero or one StructuredMappingRef line.
- May have one line labeled to indicate Note.
- May have zero to many unlabeled lines after the Note line. These
unlabeled lines are considered to be part of the Note text.
classmethod BuildStructuredMapping(ByRef pData As %String, pNode As %String, Output pMap As HS.Doc.Mapping.Common.HealthShareMapping, displayDetail As %Boolean = 0) as %Status
classmethod GetFiles(pSourceDirs As %String, pFiles As %ListOfDataTypes, displayDetail As %Boolean = 0) as %Status
classmethod LogError(pErrorMessage)
classmethod MergeMappings(pHSMappings As %ListOfObjects, Output pHSMapping As HS.Doc.Mapping.Common.HealthShareMapping, pCDAType As %String, displayDetail As %Boolean = 0) as %Status
Class Method Annotations here
classmethod OutputAllMappings(pInputPaths As %ListOfDataTypes, pOutputPath As %String = "", pCDAType As %String, displayDetail As %Boolean = 0) as %Status
classmethod OutputMap(pPath As %String = "", pFilename As %String = "", displayDetail As %Boolean = 0) as %Status
Output to XML
classmethod ParseSourceString(pSource As %String = "", Output Sources As %ListOfDataTypes, displayDetail As %Boolean = 0)
classmethod Run(pInputDirectory As %String = "", pOutputPath As %String = "", pCDAType As %String = "", displayDetail As %Boolean = 0)
classmethod RunOnSingleFile(pInputPath As %String = "", pOutputPath As %String = "", displayDetail As %Boolean = 0)
classmethod SearchDirectory(pSourceDir As %String, ByRef pFiles As %ListOfDataTypes, displayDetail As %Boolean = 0) as %Status
Returns the names of all the files in pSourceDir.