Skip to main content


class SchemaMap.Tool.UI.View extends

This tool is a data viewing, validation, analysis, and editing tool that helps developers understand and create mappings between complete patient data schemas such as FHIR, SDA3, Trak, and HL7.

A code generation framework behind this tool generates the data transformations that execute these mappings. This framework includes a library of supporting utilities and sub-transformations that handle known issues and differences between schemas. Features of the front end tool are:


Choose an item of interest (resource, object, or data type) from the source schema to be mapped. You see a table with one row per field in the source item. In columns at left is data defined by the schema itself: Data type, list vs. single, object vs. value, required vs. optional.


The UI has a view-only mode, which is shipped with the product. In this mode, the UI serves as documentation of field-to-field mappings from one schema to another. The remainder of this description text concerns the read-write mode used in development to create and modify those mappings. Ignore for view-only mode.


In columns at right, you can add/edit/save a mapping from each field in the source item to some field in the target schema. As you work, the tool validates potential issues and flags them for you automatically.


Generated code executes the transformations you defined in the tool. The generated code is InterSystems DTL, well known to customers. About 80% of the code for a project is generated from mappings defined in Schema Mapper. The other 20% must be hand-written to complete the project.


For each new schema added to this framework, the team writes code that reads the specification published by the schema authority, transforms its contents into this code generation framework's own schema-agnostic notation, then writes the result out to rows in a CSV file.

To start work on a project, one command imports the full code generation framework, plus the schema and mapping CSV files to be shared by the project. Upon import, these CSV files become usable as both SQL tables and ObjectScript classes.


Starting from the imported schema and mapping tables, import generates a structured set of lookup tables and other reference data that drive code generation and other tool features.

Import also generates full class model of each FHIR schema, for use by DTL, which requires a class model to exist, in order to perform transformations between properties in the objects.


Export is one button click. Exported schema and mapping CSV files are archived in the project branch, for reference, but not shipped. Only the generated transformations and supporting code are shipped.


Delivery of project code is more complex than export, and less frequent. Delivery involves an automated refactoring of all delivered code to match the package structure of the project branch receiving the code. This package structure and its naming conventions may vary between projects.


Validation of each mapping entry flags issues, outputs notices in the editing UI, sends annotations to the output DTL code, and fuels "percent done" calculations for online progress reports.

More detailed reports on the technical issues detected can be exported for study. Documents for review with expert advisers also exist; the development team can export these for review cycles as needed.


The tool automatically creates links in the view, and in its generated reports, whenever the data contains any item of interest, such as the name of another resource, class, data type, or field.

When you click one of these automatic links, the tool navigates to the source of information. This may be an alternate view in the tool, or it may be a reference site, such as a FHIR specification on, an InterSystems class documentation page, or an IETF RFC.

Property Inventory

Method Inventory


parameter APPLICATION;
Class name of application this page belongs to.
parameter CSSINCLUDES =,;
Inherited description: Comma-separated list of additional CSS include files for the page. If this page is using CSS3 then the CSS3INCLUDES parameter is used (if defined).
parameter DOMAIN;
Domain used for localization.
Inherited description: If defined, this is the url of the "favorite" (or shortcut) icon to display for this page.
Defining this causes Zen to include a <link rel="shortcut icon" href="FAVORITEICON"> in the head section of the page.
For maximum browser compatibility this should be an .ico file.
parameter PAGENAME = View Mapping;
Displayed name of this page.
parameter RESOURCE = %Ens_EDISchemaAnnotations:READ;
Inherited description: This is a comma-delimited list of system Resources and associated permissions. A user must hold the specified permissions on at least one of the specified resources in order to view this page or invoke any of its server-side methods from the client.
The format of each item in the list should be as follows:
Permission is optional, and defaults to USE if not supplied. If it is supplied, it should be one of USE, READ or WRITE.


property EditEnabled as %Boolean;
Property methods: EditEnabledDisplayToLogical(), EditEnabledGet(), EditEnabledIsValid(), EditEnabledLogicalToDisplay(), EditEnabledLogicalToXSD(), EditEnabledNormalize(), EditEnabledSet(), EditEnabledXSDToLogical()
property From as %String;
Property methods: FromDisplayToLogical(), FromGet(), FromIsValid(), FromLogicalToDisplay(), FromLogicalToOdbc(), FromNormalize(), FromSet()
property Mode (ZENURL = "MODE") [ InitialExpression = "table" ];
Property methods: ModeDisplayToLogical(), ModeGet(), ModeIsValid(), ModeLogicalToDisplay(), ModeLogicalToOdbc(), ModeNormalize(), ModeSet()
property Package [ InitialExpression = $$$MapGenDTLPackage ];
Property methods: PackageDisplayToLogical(), PackageGet(), PackageIsValid(), PackageLogicalToDisplay(), PackageLogicalToOdbc(), PackageNormalize(), PackageSet()
property Pair (ZENURL = "PAIR");
Property methods: PairDisplayToLogical(), PairGet(), PairInProjectDisplayToLogical(), PairInProjectGet(), PairInProjectIsValid(), PairInProjectLogicalToDisplay(), PairInProjectLogicalToXSD(), PairInProjectNormalize(), PairInProjectSet(), PairInProjectXSDToLogical(), PairIsValid(), PairLogicalToDisplay(), PairLogicalToOdbc(), PairNormalize(), PairSet()
property PairInProject as %Boolean;
Property methods: PairInProjectDisplayToLogical(), PairInProjectGet(), PairInProjectIsValid(), PairInProjectLogicalToDisplay(), PairInProjectLogicalToXSD(), PairInProjectNormalize(), PairInProjectSet(), PairInProjectXSDToLogical()
property Path (ZENURL = "PATH");
Property methods: PathDisplayToLogical(), PathGet(), PathIsValid(), PathLogicalToDisplay(), PathLogicalToOdbc(), PathNormalize(), PathSet()
property Sort (ZENURL = "SORT");
Property methods: SortDisplayToLogical(), SortGet(), SortIsValid(), SortLogicalToDisplay(), SortLogicalToOdbc(), SortNormalize(), SortSet()
property To as %String;
Property methods: ToDisplayToLogical(), ToGet(), ToIsValid(), ToLogicalToDisplay(), ToLogicalToOdbc(), ToNormalize(), ToSet()


method %OnAfterCreatePage() as %Status
This callback is called after the server-side page object and all of its children are created.
Subclasses can override this to add, remove, or modify items within the page object model, or to provide values for controls.
method CalculateDisplayForPath(Output displayList As %List, count As %Numeric, isResourceInProject As %Boolean, isMostImportant As %Boolean, mappedNoIssues As %Numeric, mappedWithIssues As %Numeric, notMappedWithIssues As %Numeric, notAnalyzed As %Numeric) as %Status
method ClearResource(clearAll As %ZEN.Datatype.boolean) as %String [ ZenMethod ]
Clears mapping table for the given resource
method CreateEmptyMappingEntry(path As %String, sourceValue As %String, mapSource As %Boolean = 0) as %String [ ZenMethod ]
This method creates and displays a new, empty mapping table entry for a given "from" path, after one mapping table entry already exists for that same "from" path.

Running this method creates a new row that is empty. The user edits this row to add the mapping.

There can be a lot of ways to handle this UX case, but this way turned out to be the simplest to implement when both back end and front end code are considered.

TO DO: The back end method checks to see if there is already at least 1 mapping for this path. If not, it does nothing and returns a message. In practice, this case should not happen because the Add Row icon does not display in the row when there are 0 existing mappings for the path. Instead the Add Row icon is hidden and the user must click the Edit icon to add the first mapping for that row.

method DeleteMappingEntry(row) as %String [ ZenMethod ]
Delete a mapping table entry
method DrawActionKey() as %Status
method DrawClassResource(schema, path, displaySide, order) as %Status
method DrawCodeTableDetail(schema As %String) as %Status
method DrawContent(seed As %String) as %Status
method DrawFHIRLevel(schema, path, displaySide, order) as %Status
method DrawFHIRResource(schema, path, displaySide, order) as %Status
method DrawGuide(seed As %String) as %Status
deprecated method DrawHelp() as %Status
Deprecated. There is no real need for this help, with Actions and Issues available.
method DrawIssueKey() as %Status
method DrawModeButton() as %Status
method DrawPairSelector() as %Status
method DrawReport(excludePrimitives As %Boolean = 1) as %Status
method DrawSelector() as %Status
method DrawTable() as %Status
method DrawTableRow(resource As %String, fromPath As %String, index, groupIndex, subIndex, subGroupIndex, totalGroupSize, groupHeaderRow As %Boolean = 0, listFromPath, isSubpath As %Boolean = 0, highlight As %String, ByRef wroteHeader, ByRef wroteMapping, ByRef wroteSourceValue, ByRef wroteFooter) as %Status
method EditIcon(path, row, column, value, lowlight As %Boolean = 0, table As %Boolean = 0, utility As %String = "", dependsOn As %String = "", extension As %String = "", haveMapping As %Boolean = 0, subObjects As %Boolean = 0, topLevelItem As %Boolean = 0, sourceValue As %String = "", mapSource As %Boolean = 0, defaultValue As %String = "", append As %Boolean = 0) as %String
Provide action icons for the Actions column in the mapping display table.
classmethod ExportProjectFiles() as %String [ ZenMethod ]
classmethod ExportReportFilesAsync(from, to) [ ZenMethod ]
classmethod ExportReportFilesSync(from As %String = "", to As %String = "") as %String [ ZenMethod ]
classmethod GenerateTransformsAsync(package, from, to) [ ZenMethod ]
classmethod GenerateTransformsSync(package, from, to, resource) as %String [ ZenMethod ]
method GetCurrentValues(seed As %String) as %Status
classmethod GetResourceCount(from As %String, to As %String) as %String [ ZenMethod ]
method GetSDAExtensionMappingsURL(Output pExtensionURL As %String = "")
method HasTarget() as %Boolean [ ZenMethod ]
Returns true if there is a target that shares the same name as the source
method ResourceMap() as %String [ ZenMethod ]
Map from the source to a target that shares the same name as the source
method SaveRowColumnValue(path, mapSource As %Boolean = 0, row, columns, values, applyAllToXF As %Boolean = 0) as %String [ ZenMethod ]
Save a mapping table entry.
method SetMappingEntryActive(status As %Boolean = 1, resource As %String, row As %String) as %String [ ZenMethod ]
Set only the Active status of a mapping table entry
method SumValuesForPath(titleRow As %Boolean = 0, mapIssues, haveMapping As %Boolean = 0, mapNotes, ByRef difficulty As %Numeric, ByRef mappedNoIssues As %Numeric, ByRef mappedWithIssues As %Numeric, ByRef notMappedWithIssues As %Numeric, ByRef notAnalyzed As %Numeric) as %Status
clientmethod addRow(path, sourceValue, mapSourceBoolean) [ Language = javascript ]
clientmethod adjustActive(value) [ Language = javascript ]
clientmethod adjustHeight() [ Language = javascript ]
clientmethod applyClearAll(value) [ Language = javascript ]
clientmethod applyEditPopup(path, mapSourceBoolean, row, columns, values, applyAllToXF) [ Language = javascript ]
clientmethod applyValues(path, mapSourceBoolean, row, columns, values, applyAllToXF) [ Language = javascript ]
The columns and values input arguments may contain multiple values separated by the \u0002 character. If so, these arguments are parallel collections of column names, and values to place into those columns.
clientmethod autoMap() [ Language = javascript ]
clientmethod changePair(pair) [ Language = javascript ]
clientmethod clear() [ Language = javascript ]
clientmethod configure() [ Language = javascript ]
clientmethod configureLookup(pair) [ Language = javascript ]
clientmethod correctHeader() [ Language = javascript ]
clientmethod deleteMapping(path, sourceValue, mapSourceBoolean, row, target, promptUser) [ Language = javascript ]
clientmethod doResize() [ Language = javascript ]
clientmethod editRowColumnValue(path, sourceValue, mapSourceBoolean, row, column) [ Language = javascript ]
clientmethod export(dir) [ Language = javascript ]
clientmethod exportReports(dir, from, to) [ Language = javascript ]
clientmethod getProxyForState(seed) [ Language = javascript ]
clientmethod getWeightsAndGotoPage(path, pair, mode, sort) [ Language = javascript ]
clientmethod hideDiv(id) [ Language = javascript ]
clientmethod initializeCurrentState() [ Language = javascript ]
clientmethod initializeLayout() [ Language = javascript ]
clientmethod onPopupAction(popupName, action, value) [ Language = javascript ]
This client event is fired when the a popup page launched from this page fires an action.
clientmethod onloadHandler(load) [ Language = javascript ]
Inherited description: This client event, if present, is fired when the page is loaded.
clientmethod onresizeHandler() [ Language = javascript ]
This client event, if present, is fired when the page is resized.
clientmethod openTable(path) [ Language = javascript ]
clientmethod pathScrollIntoView(path, sourceValue, mapSourceBoolean) [ Language = javascript ]
When scrolling to view path, scroll to view ALL the rows that display the same path value.
clientmethod pushCurrentState(seed) [ Language = javascript ]
handle Back/Forward on client side
clientmethod redrawPage(proxy, pushstate) [ Language = javascript ]
clientmethod refreshAndScrollIntoView(path, sourceValue, mapSourceBoolean) [ Language = javascript ]
clientmethod refreshCurrentTable() [ Language = javascript ]
clientmethod reinitDisplay() [ Language = javascript ]
clientmethod reviseDisplay(seed, pushstate) [ Language = javascript ]
clientmethod reviseSelector(seed) [ Language = javascript ]
clientmethod setSelector() [ Language = javascript ]
clientmethod showDiv(id) [ Language = javascript ]
clientmethod transform(from, to, resource) [ Language = javascript ]
clientmethod updateActive(path, sourceValue, mapSourceBoolean, row, target, id) [ Language = javascript ]
clientmethod userWillWait() [ Language = javascript ]
clientmethod viewReport(fileName) [ Language = javascript ]

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab