SchemaMap.Tool.Build.Project
abstract class SchemaMap.Tool.Build.Project extends SchemaMap.Tool.Base.Generate
Contains utility methods that have been useful throughout the Schema Mapper tool project, for populating data in the archived schema and mapping tables to support needed feature enhancements. This tends to be necessary because the Schema Mapper tool is data-driven. New features mean new data.Often these methods are intended for one-time-only use, but they remain as useful examples of how to write similar methods which are likely to be needed in the future to maintain the tool. Additionally, the project occasionally needs to return to specific methods to re-use them.
We do not deprecate or discard the methods, but keep them separate, in this class.
Method Inventory
- AddSDA3CustomPairsToCSV()
- AddSDA3InheritedPropertiesToCSV()
- ExportSchemaCSVFile()
- GenerateMapClasses()
- GenerateSchemaClasses()
- IsLookupEntryWorthHighlighting()
- SetMapIssuesAndInfoForAllPaths()
- SetSuperclassForAllClassPaths()
- WriteListOfPreviouslyReleasedDTL()
Methods
This method does not change the SQL table on the current instance. The developer who runs this method must check in the revised schema CSV file to Perforce, then that developer (and all others) must reinstall the tool by importing the new schema CSV file. The reimport updates the SQL table and tool.
The input typeClasses is deprecated (not used in the code, but not removed, to not disrupt the signature). It was intended as a comma-separated list of HS.SDA3 superclass names. All SDA3 classes with this value in the DataType column will get the properties added to it. The HS.SDA3.SuperClass is the superclass targeted by the current implementation of this method.
This is a temporary utility, so it is not fully factored as a reusable API. That is, the names of the properties to add and the specific data to insert into the column entries for these properties in each new row in the table are not parameterized. They are hardcoded inside this method.
The technique, to outsmart Studio source control hooks:
In Perforce, check out all the mapping table classes under SchemaMap.Map. Close all Studio instances. At the Terminal run this command:
do $system.Status.DisplayError(##class(SchemaMap.Tool.Build.Project).GenerateMapClasses())
In Studio, open each mapping table class, do a dummy modification, save, then compile, then close it. Perforce diff to verify changes are correct. Perforce checkin the mapping table classes.
MAINTENANCE NOTE: It is important to keep Studio out of this procedure and to use the procedure steps as written. If you said Yes to delete a generated class from Studio (not using this method, but while using Studio) you can inadvertently also click a second Yes to ask Studio source control hooks to delete the class from Perforce. If this happens, a LOGIC message output by SchemaMap.Tool.Base.Generate:CreateObject will say how to fix it.
MAINTENANCE NOTE: For product release projects for which this method is not needed, or after a project has finished using it, remove or comment out everything inside the try block. Here is an example of code that might appear inside the try block while this method is in use:
set bool = ((from = "FHIR3") && (to = "SDA3")) || ((from = "SDA3") && (to = "FHIR3") && ( ((sourceTable = "HS.SDA3.Blob:FileType") && (targetTable = "MimeType RFC 4289")) || ((sourceTable = "HS.SDA3.CodeTableDetail.DiagnosisStatus") && (targetTable = "condition-clinical")) || ((sourceTable = "HS.SDA3.CodeTableDetail.DocumentCompletionStatus") && (targetTable = "composition-status")) || ((sourceTable = "HS.SDA3.CodeTableDetail.DocumentStatus") && (targetTable = "document-reference-status")) ) )