From 87cec52f92b14a9dad610afd39f5f0dab56cffa5 Mon Sep 17 00:00:00 2001 From: Joseph Snyder Date: Thu, 11 Oct 2018 19:28:00 +0000 Subject: [PATCH] Add changes for ViViaN-R Add the changes necessary for the ViViaN-R instance to be generated by utilizing the RPMS code with the OSEHRA testing repository. Change-Id: I78cc13bdac508c8b57e8cfce1d84683440bec5e3 --- Utilities/Dox/CMakeLists.txt | 4 +-- Utilities/Dox/Patches/XT-7p3-10001T4.KID | 2 +- .../Dox/PythonScripts/CallerGraphParser.py | 8 +++--- .../PythonScripts/CrossReferenceBuilder.py | 2 +- .../Dox/PythonScripts/DataDictionaryParser.py | 2 +- .../Dox/PythonScripts/FileManDataToHtml.py | 28 +++++++++++++++++-- .../Dox/PythonScripts/FileManSchemaParser.py | 10 ++++++- .../Dox/PythonScripts/WebPageGenerator.py | 1 + 8 files changed, 45 insertions(+), 12 deletions(-) diff --git a/Utilities/Dox/CMakeLists.txt b/Utilities/Dox/CMakeLists.txt index 0da52648a..2034304e1 100644 --- a/Utilities/Dox/CMakeLists.txt +++ b/Utilities/Dox/CMakeLists.txt @@ -136,7 +136,7 @@ if (GENERATE_DOX OR GENERATE_VIVIAN) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FileManGlobalAttributes.py.in ${SCRIPT_OUTPUT_DIR}/FilemanGlobalAttributes.py) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/GetFilemanSchema.cmake.in ${SCRIPT_OUTPUT_DIR}/GetFilemanSchema.cmake @ONLY) add_test(GetFilemanSchema ${CMAKE_COMMAND} -P ${SCRIPT_OUTPUT_DIR}/GetFilemanSchema.cmake) - set_tests_properties(GetFilemanSchema PROPERTIES TIMEOUT 7200) + set_tests_properties(GetFilemanSchema PROPERTIES TIMEOUT 10000) set(FILEMANDBCALL_JSON "${DOCUMENT_VISTA_OUTPUT_DIR}/filemanDBCall.json") endif() @@ -154,7 +154,7 @@ endif() if (GENERATE_DOX OR GENERATE_VIVIAN) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FileManGlobalDataParser.cmake.in ${SCRIPT_OUTPUT_DIR}/FileManGlobalDataParser.cmake @ONLY) add_test(FileManGlobalDataParser ${CMAKE_COMMAND} -P ${SCRIPT_OUTPUT_DIR}/FileManGlobalDataParser.cmake) - set_tests_properties(FileManGlobalDataParser PROPERTIES TIMEOUT 9000) + set_tests_properties(FileManGlobalDataParser PROPERTIES TIMEOUT 10000) endif() # 5. Run ICR Parser Script to parse and convert the downloaded ICR text file diff --git a/Utilities/Dox/Patches/XT-7p3-10001T4.KID b/Utilities/Dox/Patches/XT-7p3-10001T4.KID index 2cb478c87..b4e505e91 100644 --- a/Utilities/Dox/Patches/XT-7p3-10001T4.KID +++ b/Utilities/Dox/Patches/XT-7p3-10001T4.KID @@ -5165,6 +5165,6 @@ TEST S STR=$E($T(TEST+2),4,999) D XINDX9 "RTN","XINDX9",187,0) ;;NUMVAL?.1(1"+",1"-")1(1.N.1".".N,.N.1"."1.N).1(1"E".1(1"+",1"-")1.N) "VER") -8.0^22.2 +8.0^22.0 **END** **END** diff --git a/Utilities/Dox/PythonScripts/CallerGraphParser.py b/Utilities/Dox/PythonScripts/CallerGraphParser.py index b42d721aa..caf372eeb 100755 --- a/Utilities/Dox/PythonScripts/CallerGraphParser.py +++ b/Utilities/Dox/PythonScripts/CallerGraphParser.py @@ -459,10 +459,10 @@ def parseLine(self, line, Routine, CrossReference): self._varPrefix = line[0:DEFAULT_NAME_FIELD_START_INDEX] self._varValue = match.groups()[1] self._varName = match.groups()[0].strip() - if self._localHandler._addVarToRoutine: - self._localHandler._addVarToRoutine(self._curRoutine, CrossReference) - if self._localHandler._postParsingRoutine: - self._localHandler._postParsingRoutine(self._curRoutine, CrossReference) + if self._addVarToRoutine: + self._addVarToRoutine(self._curRoutine, CrossReference) + if self._postParsingRoutine: + self._postParsingRoutine(self._curRoutine, CrossReference) return if self._suspiousLine: self.__handleSuspiousCases__(Routine, CrossReference) diff --git a/Utilities/Dox/PythonScripts/CrossReferenceBuilder.py b/Utilities/Dox/PythonScripts/CrossReferenceBuilder.py index d3df30bde..f73569387 100755 --- a/Utilities/Dox/PythonScripts/CrossReferenceBuilder.py +++ b/Utilities/Dox/PythonScripts/CrossReferenceBuilder.py @@ -15,8 +15,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -#--------------------------------------------------------------------------- +import os import argparse from InitCrossReferenceGenerator import createInitialCrossRefGenArgParser from InitCrossReferenceGenerator import parseCrossReferenceGeneratorArgs diff --git a/Utilities/Dox/PythonScripts/DataDictionaryParser.py b/Utilities/Dox/PythonScripts/DataDictionaryParser.py index 86a4aac8d..4ce422587 100755 --- a/Utilities/Dox/PythonScripts/DataDictionaryParser.py +++ b/Utilities/Dox/PythonScripts/DataDictionaryParser.py @@ -500,7 +500,7 @@ class DataDictionaryListFileLogParser(IDataDictionaryListFileLogParser): REFERENCED_BY_START = re.compile("^REFERENCED BY:") INDEXED_BY_START = re.compile("^INDEXED BY: ") PRIMARY_KEY_START = re.compile("^PRIMARY KEY: ") - FILEMAN_FIELD_START = re.compile("(?P^[.0-9]+),(?P[.0-9]+)") + FILEMAN_FIELD_START = re.compile("(?P^[.0-9]+),(?P([0-9]+)?(\.[0-9]+)?)") FILES_POINTED_TO_START = re.compile("^ +FILES POINTED TO +FIELDS$") FILE_RECORD_INDEXED_START = re.compile("^File #[.0-9]+$") SUBFILE_RECORD_INDEXED_START = re.compile("^Subfile #[.0-9]+$") diff --git a/Utilities/Dox/PythonScripts/FileManDataToHtml.py b/Utilities/Dox/PythonScripts/FileManDataToHtml.py index 2f8a1fcc2..a5198b595 100644 --- a/Utilities/Dox/PythonScripts/FileManDataToHtml.py +++ b/Utilities/Dox/PythonScripts/FileManDataToHtml.py @@ -564,29 +564,53 @@ def _generateServerMenu(self, allMenuList, allOptionList, serverMenuList): menuArray = {} fileDataArray = {} package_name_dict = {"3": "Kernel", + "177": "Kernel", #RPMS "4": "MailMan", + "139": "MailMan", #RPMS "5": "Toolkit", + "232": "Toolkit", #RPMS "14": "Lab Service", + "249": "Lab Service", #RPMS "33": "Health Level Seven", + "238": "Health Level Seven", #RPMS "49": "Integrated Billing", + "329": "Integrated Billing", #RPMS "52": "IFCAP", + "325": "IFCAP", #RPMS "53": "Accounts Receivable", + "295": "Accounts Receivable", #RPMS "73": "Network Health Exchange", + "340": "Network Health Exchange", #RPMS "82": "CMOP", + "303": "CMOP", #RPMS "85": "Patient Data Exchange", + "345": "Patient Data Exchange", #RPMS "93": "Automated Med Information Exchange", + "300": "Automated Med Information Exchange", #RPMS "99": "EEO Complaint Tracking", + "311": "EEO Complaint Tracking", #RPMS "114": "Fee Basis", + "315": "Fee Basis", #RPMS "115": "Radiology/Nuclear Medicine", + "256": "Radiology/Nuclear Medicine", #RPMS "124": "Medicine", + "335": "Medicine", #RPMS "127": "Surgery", + "363": "Surgery", #RPMS "128": "Oncology", + "343": "Oncology", #RPMS + "204": "Alcohol Chemical Dependency", #RPMS "147": "Remote Order/Entry System", + "360": "Remote Order/Entry System", #RPMS "149": "Voluntary Timekeepting", + "368": "Voluntary Timekeepting", #RPMS "165": "DSS Extracts", + "310": "DSS Extracts", #RPMS "181": "Enrollment Application System", "188": "Functional Independence", - "201": "Health Data & Informatics"} + "201": "Health Data & Informatics", + "417": "Health Data & Informatics", #RPMS + "153": "Registration"} #RPMS menuArray['0'] = FileManDataEntry(19, "9999990") menuArray['0'].addField(FileManDataField('1', 4, 'MENU TEXT', 'Unknown')) menuArray['0'].addField(FileManDataField('4', 2, 'TYPE', 'menu')) @@ -930,7 +954,7 @@ def _fileManDataEntryToHtml(self, output, dataEntry, isRoot): elif fieldType == FileManField.FIELD_TYPE_FREE_TEXT and name.find("ROUTINE") >=0: value = _getRoutineHRefLink(dataEntry, str(value), crossRef=self.crossRef) elif fieldType == FileManField.FIELD_TYPE_SUBFILE_POINTER: - if value and value.dataEntries: + if value and ("dataEntries" in dir(value)): if isRoot: output.write("\n") output.write("%s\n" % name) diff --git a/Utilities/Dox/PythonScripts/FileManSchemaParser.py b/Utilities/Dox/PythonScripts/FileManSchemaParser.py index 1442bfc3b..cca5a588b 100644 --- a/Utilities/Dox/PythonScripts/FileManSchemaParser.py +++ b/Utilities/Dox/PythonScripts/FileManSchemaParser.py @@ -314,7 +314,15 @@ def _setFieldSpecificData(self, zeroFields, fileField, rootNode, logger.warn("No subfile is set for file:%s, field:%r 0-index:%s" % (fileSchema.getFileNo(), fileField, zeroFields)) elif fileField.getType() == FileManField.FIELD_TYPE_SET and not subFile and zeroFields[2]: - setDict = dict([x.split(':') for x in zeroFields[2].rstrip(';').split(';')]) + setDict=dict() + for x in zeroFields[2].rstrip(';').split(';'): + dictPair = x.split(':', 1) + # If len == 1, DD is malformed and we append an empty string to it + # Example: + # DD-1+0.zwr:^DD("63.04",1115010,0)="HERPES SIMPLEX VIRUS TYPE 1^S^N:NEGATIVE;P:POSITIVE;E:EQUIVOCAL;BORDERLINE;^1115010;1^Q" + if len(dictPair) == 1: + dictPair = ['',x] + setDict[dictPair[0]] = dictPair[1] fileField.setSetMembers(setDict) elif fileField.getType() == FileManField.FIELD_TYPE_VARIABLE_FILE_POINTER: if "V" in rootNode: # parsing variable pointer diff --git a/Utilities/Dox/PythonScripts/WebPageGenerator.py b/Utilities/Dox/PythonScripts/WebPageGenerator.py index ef223d3d1..f2bc550f0 100755 --- a/Utilities/Dox/PythonScripts/WebPageGenerator.py +++ b/Utilities/Dox/PythonScripts/WebPageGenerator.py @@ -946,6 +946,7 @@ def generateIndividualGlobalPage(self): for package in self._allPackages.itervalues(): packageName = package.getName() + fileManDbCallRtns = None for (globalName, globalVar) in package.getAllGlobals().iteritems(): isFileManFile = globalVar.isFileManFile() if isFileManFile: