Skip to content

Fix hl7 extensions inconsistencies #508

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 2, 2024
Merged
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 @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed prompts in configure from 0/1 to no/yes (#461)
- Added warnings when user is using incompatible git version (#488)
- Fixed the back button navigation between WebUI and Settings page (#361)
- Fixed issues with HL7 file extension inconsistencies (#495)
- Basic mode Sync operation now imports items changed on the remote merge branch (#506)
- Fetch diff output uses correct remote branch (#509)

Expand Down
32 changes: 31 additions & 1 deletion cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,36 @@ ClassMethod NormalizeFolder(folder As %String) As %String

ClassMethod ExternalName(InternalName As %String, ByRef MappingExists As %Boolean) As %String
{
quit $Replace(..Name(.InternalName,.MappingExists),"/",..#Slash)
set root = ..TempFolder()
set file = $Replace(..Name(.InternalName,.MappingExists),"/",..#Slash)
set fullFile = root_file
if '..Exists(.fullFile) {
quit file
}
quit $Piece(fullFile,root,2,*)
}

/// Check if file exists but case insensitive on file extension
/// Stolen from %IPM.Utils.File
ClassMethod Exists(ByRef pFilename) As %Boolean
{
If ##class(%File).Exists(pFilename) {
Return 1
}
Set tDirectory = ##class(%File).ParentDirectoryName(pFilename)
If '##class(%File).DirectoryExists(tDirectory) {
Return 0
}
Set tName = $Piece(pFilename, tDirectory, 2, *)
Set tFileName = $Piece(tName, ".", 1, * - 1)
Set tFileExt = $Piece(tName, ".", *)
for tExt = $$$LOWER(tFileExt), $$$UPPER(tFileExt) {
If ##class(%File).Exists(tDirectory _ tFileName _ "." _ tExt) {
Set pFilename = tDirectory _ tFileName _ "." _ tExt
Return 1
}
}
Return 0
}

ClassMethod AddToServerSideSourceControl(InternalName As %String) As %Status
Expand Down Expand Up @@ -2694,3 +2723,4 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
}

}

Loading