Skip to content

Issue 693 Add interoperability files to Baseline Export #748

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Partial support for production decomposition with the new interoperability editors
- Added Lock Branch setting to prevent switching branches for a protected namespace (#709)
- Tooltips on branch operations in Git UI (#725)
- Expanded Baseline Export to include custom HL7, X12, ASTM schemas and Lookup Tables (#693)

### Fixed
- Changing system mode (environment name) in setting spersists after instance restart (#655)
Expand Down
18 changes: 17 additions & 1 deletion cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -2981,7 +2981,7 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
try {
write !, "Exporting items..."
set rs = ##class(%Library.RoutineMgr).StudioOpenDialogFunc(
"*.mac,*.int,*.inc,*.cls,*.csp"
"*.mac,*.int,*.inc,*.cls,*.csp,*.HL7,*.LUT,*.AST,*.X12"
, , ,0 // SystemFiles
,1 // Flat
,0 // NotStudio
Expand All @@ -2992,6 +2992,7 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
while rs.%Next(.sc) {
$$$ThrowOnError(sc)
set internalName = rs.Name
continue:..IsSchemaStandard(internalName)
// exclude items in a non-default IPM package
set context = ##class(SourceControl.Git.PackageManagerContext).ForInternalName(internalName)
continue:($isobject(context.Package) && 'context.IsInDefaultPackage)
Expand Down Expand Up @@ -3181,4 +3182,19 @@ ClassMethod GitUnstage(Output output As %Library.DynamicObject) As %Status
return $$$OK
}

ClassMethod IsSchemaStandard(pName As %String = "") As %Boolean [ Internal ]
{
Set parts = $Length(pName,".")
Set category = $Piece(pName,".",1,parts-1)
Set ext = $Piece(pName,".",parts)
If (pName = "") {
Quit 0
}
Quit +$Case(ext,
"AST":$Get(^EnsEDI.ASTM.Description(category,"std")),
"HL7":$Get(^EnsHL7.Description(category,"std")),
"X12":$Get(^EnsEDI.X12.Description(category,"std")),
:0)
}

}
Loading