- BSTSCMCL ;GDIT/HS/BEE-Standard Terminology Cache Method Calls ; 5 Nov 2012 9:53 AM
- ;;2.0;IHS STANDARD TERMINOLOGY;**1**;Dec 01, 2016;Build 36
- ;
- Q
- ;
- ;BSTS*2.0*1;Added Log History Retrieval
- LHIST(BSTSWS,RSLT) ;EP - Retrieve the log history
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).LogHistory(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("ELOG",STS) I +STS Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- ;BSTS*2.0*1;Added Search String Retrieval
- SRCNT(BSTSWS,RSLT) ;EP - Retrieve the search logs
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).SearchCounts(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("ELOG",STS) I +STS Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- ;BSTS*2.0*1;Added event logging
- ELOG(BSTSWS,RSLT) ;EP - Log an event to DTS
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).LogEntry(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("ELOG",STS) I +STS Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- RCODE(BSTSWS,RSLT) ;EP - DTS4 Return all concepts that are in RxNorm subsets (not including RXNO SRCH Drug Ingredients All)
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getAllRxNormSubsetConcepts(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("SCODE",STS) I +STS Q
- ;
- ;Note - no check for exceeding call timeout since this call
- ; will take longer to complete
- Q STS
- ;
- SCODE(BSTSWS,RSLT) ;EP - DTS4 Return all concepts that are in a subset (not including IHS PROBLEM ALL SNOMED)
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getAllSubsetConcepts(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("SCODE",STS) I +STS Q
- ;
- ;Note - no check for exceeding call timeout since this call
- ; will take longer to complete
- Q STS
- ;
- ACODE(BSTSWS,RSLT) ;EP - DTS4 Return items that have an ICD10 auto-codable value
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getICD10AutoCodes(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("ACODE",STS) I +STS Q
- ;
- ;Note - no check for exceeding call timeout since this call
- ; will take longer to complete
- Q STS
- ;
- ACODEQ(BSTSWS,RSLT) ;EP - DTS4 Return items that have equivalent associations
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getEquivalencyConcepts(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("ACODEDQ",STS) I +STS Q
- ;
- ;Note - no check for exceeding call timeout since this call
- ; will take longer to complete
- Q STS
- ;
- ACODEP(BSTSWS,RSLT) ;EP - DTS4 Return items that have ICD10 auto-codable predicates
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getICD10AutoCodePreds(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("ACODEP",STS) I +STS Q
- ;
- ;Note - no check for exceeding call timeout since this call
- ; will take longer to complete
- Q STS
- ;
- A9CODE(BSTSWS,RSLT) ;EP - DTS4 Return items that have an ICD10 auto-codable value
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getICD9AutoCodes(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("A9CODE",STS) I +STS Q
- ;
- ;Note - no check for exceeding call timeout since this call
- ; will take longer to complete
- Q STS
- ;
- CSTMCDST(BSTSWS,RSLT) ;EP - DTS4 Return items in a custom codeset
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getCustomCodeset(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("CSTMCDST",STS) I +STS Q
- ;
- ;Note - no check for exceeding call timeout since this call
- ; will take longer to complete
- Q STS
- ;
- FSNSRCH(BSTSWS,RSLT) ;EP - DTS4 Fully Specified Name Search
- ;
- ;Perform Concept Search
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).FindConceptsWithNameMatching(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("FSNSRCH",STS) I +STS!($P(STS,U,3)>$G(BSTSWS("TIMEOUT"))) Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- CONSRCH(BSTSWS,RSLT) ;EP - DTS4 Concept Search
- ;
- ;Perform Concept Search
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).executeConceptTextSearch(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("CONSRCH",STS) I +STS!($P(STS,U,3)>$G(BSTSWS("TIMEOUT"))) Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- DSCSRCH(BSTSWS,RSLT) ;EP - DTS4 Description Id Search
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).findDescWithIdMatch(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("DSCSRCH",STS) I +STS!($P(STS,U,3)>$G(BSTSWS("TIMEOUT"))) Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- TRMSRCH(BSTSWS,RSLT) ;EP - DTS4 Term Search
- ;
- ;Perform Concept Search
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).FullTextSearch(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("TRMSRCH",STS) I +STS!($P(STS,U,3)>$G(BSTSWS("TIMEOUT"))) Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- SUBLST(BSTSWS,RSLT) ;EP - DTS4 Retrieve Subset List
- ;
- ;Retrieve list of concepts in a specified subset
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getSubsetList(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("SUBLST",STS) I +STS Q
- ;
- ;Note - do not perform time check - this could be a longer running call
- ;
- Q STS
- ;
- ICD2SMD(BSTSWS,RSLT) ;EP - DTS4 Retrieve ICD9 to SNOMED mappings
- ;
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getICD9toSNOMED(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("ICD2SMD",STS) I +STS Q
- ;
- ;Note - do not perform time check - this could be a longer running call
- ;
- Q STS
- ;
- CNCSR(BSTSWS,RSLT) ;EP - DTS4 Lookup on Concept Id
- ;
- ;Perform Concept Id Search
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).findConceptsWithPropMatch(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("CNCSR",STS) I +STS!($P(STS,U,3)>$G(BSTSWS("TIMEOUT"))) Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- DETAIL(BSTSWS,RSLT) ;EP - DTS4 Retrieve Concept Detail
- ;
- ;Place call to retrieve detail for a concept
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).GetConceptDetail(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("DETAIL",STS) I +STS!($P(STS,U,3)>$G(BSTSWS("TIMEOUT"))) Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- FDESC(BSTSWS) ;EP - DTS4 Retrieve FSN Description Id
- ;
- NEW RSLT,STS,EXEC,TRY
- ;
- ;Place call to retrieve the description id for a FSN
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).findTermsByName(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("FDESC",STS) I +STS!($P(STS,U,3)>$G(BSTSWS("TIMEOUT"))) Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- GCDSDTS4(BSTSWS,RESULT) ;EP - DTS4 update codesets
- ;
- ;Place call to retrieve codesets (namespaces)
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).GetNamespaces(.BSTSWS,.RESULT)" X EXEC D:'+STS ER("GCDSDTS4",STS) I +STS!($P(STS,U,3)>$G(BSTSWS("TIMEOUT"))) Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- GVRDTS4(BSTSWS) ;EP - DTS4 update versions
- ;
- ;Place call to retrieve versions
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).GetVersions(.BSTSWS)" X EXEC D:'+STS ER("GVRDTS4",STS) I +STS Q
- ;
- ;Note - do not perform server status check because the check
- ; uses this call
- ;
- Q STS
- ;
- PTYDTS4(BSTSWS,RSLT) ;EP - DTS4 Perform Property Search
- ;
- ;Search based on property value
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).propertyLookup(.BSTSWS,.RSLT)" X EXEC D:'+STS ER("PTYDTS4",STS) I +STS!($P(STS,U,3)>$G(BSTSWS("TIMEOUT"))) Q
- ;
- ;Check server status
- D SWLCL^BSTSWSV1(.BSTSWS,.STS)
- ;
- Q STS
- ;
- SUBSET(BSTSWS,RESULT) ;EP - DTS4 get subset list
- ;
- ;Place call to retrieve list of subsets
- NEW STS,EXEC,TRY
- F TRY=1:1:+$G(BSTSWS("RETRY")) S STS="",EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getListofSubsets(.BSTSWS,.RESULT)" X EXEC D:'+STS ER("SUBSET",STS) I +STS Q
- ;
- ;Note - do not perform time check - this could be a longer running call
- ;
- Q STS
- ;
- ER(TAG,ER) ;Error Handling
- ;
- D ELOG^BSTSVOFL(TAG_"~BSTSCMCL: "_ER)
- ;
- Q
- BSTSCMCL ;GDIT/HS/BEE-Standard Terminology Cache Method Calls ; 5 Nov 2012 9:53 AM
- +1 ;;2.0;IHS STANDARD TERMINOLOGY;**1**;Dec 01, 2016;Build 36
- +2 ;
- +3 QUIT
- +4 ;
- +5 ;BSTS*2.0*1;Added Log History Retrieval
- LHIST(BSTSWS,RSLT) ;EP - Retrieve the log history
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).LogHistory(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("ELOG",STS)
- IF +STS
- QUIT
- +3 ;
- +4 ;Check server status
- +5 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +6 ;
- +7 QUIT STS
- +8 ;
- +9 ;BSTS*2.0*1;Added Search String Retrieval
- SRCNT(BSTSWS,RSLT) ;EP - Retrieve the search logs
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).SearchCounts(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("ELOG",STS)
- IF +STS
- QUIT
- +3 ;
- +4 ;Check server status
- +5 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +6 ;
- +7 QUIT STS
- +8 ;
- +9 ;BSTS*2.0*1;Added event logging
- ELOG(BSTSWS,RSLT) ;EP - Log an event to DTS
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).LogEntry(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("ELOG",STS)
- IF +STS
- QUIT
- +3 ;
- +4 ;Check server status
- +5 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +6 ;
- +7 QUIT STS
- +8 ;
- RCODE(BSTSWS,RSLT) ;EP - DTS4 Return all concepts that are in RxNorm subsets (not including RXNO SRCH Drug Ingredients All)
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getAllRxNormSubsetConcepts(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("SCODE",STS)
- IF +STS
- QUIT
- +3 ;
- +4 ;Note - no check for exceeding call timeout since this call
- +5 ; will take longer to complete
- +6 QUIT STS
- +7 ;
- SCODE(BSTSWS,RSLT) ;EP - DTS4 Return all concepts that are in a subset (not including IHS PROBLEM ALL SNOMED)
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getAllSubsetConcepts(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("SCODE",STS)
- IF +STS
- QUIT
- +3 ;
- +4 ;Note - no check for exceeding call timeout since this call
- +5 ; will take longer to complete
- +6 QUIT STS
- +7 ;
- ACODE(BSTSWS,RSLT) ;EP - DTS4 Return items that have an ICD10 auto-codable value
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getICD10AutoCodes(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("ACODE",STS)
- IF +STS
- QUIT
- +3 ;
- +4 ;Note - no check for exceeding call timeout since this call
- +5 ; will take longer to complete
- +6 QUIT STS
- +7 ;
- ACODEQ(BSTSWS,RSLT) ;EP - DTS4 Return items that have equivalent associations
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getEquivalencyConcepts(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("ACODEDQ",STS)
- IF +STS
- QUIT
- +3 ;
- +4 ;Note - no check for exceeding call timeout since this call
- +5 ; will take longer to complete
- +6 QUIT STS
- +7 ;
- ACODEP(BSTSWS,RSLT) ;EP - DTS4 Return items that have ICD10 auto-codable predicates
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getICD10AutoCodePreds(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("ACODEP",STS)
- IF +STS
- QUIT
- +3 ;
- +4 ;Note - no check for exceeding call timeout since this call
- +5 ; will take longer to complete
- +6 QUIT STS
- +7 ;
- A9CODE(BSTSWS,RSLT) ;EP - DTS4 Return items that have an ICD10 auto-codable value
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getICD9AutoCodes(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("A9CODE",STS)
- IF +STS
- QUIT
- +3 ;
- +4 ;Note - no check for exceeding call timeout since this call
- +5 ; will take longer to complete
- +6 QUIT STS
- +7 ;
- CSTMCDST(BSTSWS,RSLT) ;EP - DTS4 Return items in a custom codeset
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getCustomCodeset(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("CSTMCDST",STS)
- IF +STS
- QUIT
- +3 ;
- +4 ;Note - no check for exceeding call timeout since this call
- +5 ; will take longer to complete
- +6 QUIT STS
- +7 ;
- FSNSRCH(BSTSWS,RSLT) ;EP - DTS4 Fully Specified Name Search
- +1 ;
- +2 ;Perform Concept Search
- +3 NEW STS,EXEC,TRY
- +4 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).FindConceptsWithNameMatching(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("FSNSRCH",STS)
- IF +STS!($PIECE(STS,U,3)>$GET(BSTSWS("TIMEOUT")))
- QUIT
- +5 ;
- +6 ;Check server status
- +7 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +8 ;
- +9 QUIT STS
- +10 ;
- CONSRCH(BSTSWS,RSLT) ;EP - DTS4 Concept Search
- +1 ;
- +2 ;Perform Concept Search
- +3 NEW STS,EXEC,TRY
- +4 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).executeConceptTextSearch(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("CONSRCH",STS)
- IF +STS!($PIECE(STS,U,3)>$GET(BSTSWS("TIMEOUT")))
- QUIT
- +5 ;
- +6 ;Check server status
- +7 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +8 ;
- +9 QUIT STS
- +10 ;
- DSCSRCH(BSTSWS,RSLT) ;EP - DTS4 Description Id Search
- +1 NEW STS,EXEC,TRY
- +2 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).findDescWithIdMatch(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("DSCSRCH",STS)
- IF +STS!($PIECE(STS,U,3)>$GET(BSTSWS("TIMEOUT")))
- QUIT
- +3 ;
- +4 ;Check server status
- +5 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +6 ;
- +7 QUIT STS
- +8 ;
- TRMSRCH(BSTSWS,RSLT) ;EP - DTS4 Term Search
- +1 ;
- +2 ;Perform Concept Search
- +3 NEW STS,EXEC,TRY
- +4 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).FullTextSearch(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("TRMSRCH",STS)
- IF +STS!($PIECE(STS,U,3)>$GET(BSTSWS("TIMEOUT")))
- QUIT
- +5 ;
- +6 ;Check server status
- +7 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +8 ;
- +9 QUIT STS
- +10 ;
- SUBLST(BSTSWS,RSLT) ;EP - DTS4 Retrieve Subset List
- +1 ;
- +2 ;Retrieve list of concepts in a specified subset
- +3 NEW STS,EXEC,TRY
- +4 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getSubsetList(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("SUBLST",STS)
- IF +STS
- QUIT
- +5 ;
- +6 ;Note - do not perform time check - this could be a longer running call
- +7 ;
- +8 QUIT STS
- +9 ;
- ICD2SMD(BSTSWS,RSLT) ;EP - DTS4 Retrieve ICD9 to SNOMED mappings
- +1 ;
- +2 NEW STS,EXEC,TRY
- +3 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getICD9toSNOMED(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("ICD2SMD",STS)
- IF +STS
- QUIT
- +4 ;
- +5 ;Note - do not perform time check - this could be a longer running call
- +6 ;
- +7 QUIT STS
- +8 ;
- CNCSR(BSTSWS,RSLT) ;EP - DTS4 Lookup on Concept Id
- +1 ;
- +2 ;Perform Concept Id Search
- +3 NEW STS,EXEC,TRY
- +4 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).findConceptsWithPropMatch(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("CNCSR",STS)
- IF +STS!($PIECE(STS,U,3)>$GET(BSTSWS("TIMEOUT")))
- QUIT
- +5 ;
- +6 ;Check server status
- +7 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +8 ;
- +9 QUIT STS
- +10 ;
- DETAIL(BSTSWS,RSLT) ;EP - DTS4 Retrieve Concept Detail
- +1 ;
- +2 ;Place call to retrieve detail for a concept
- +3 NEW STS,EXEC,TRY
- +4 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).GetConceptDetail(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("DETAIL",STS)
- IF +STS!($PIECE(STS,U,3)>$GET(BSTSWS("TIMEOUT")))
- QUIT
- +5 ;
- +6 ;Check server status
- +7 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +8 ;
- +9 QUIT STS
- +10 ;
- FDESC(BSTSWS) ;EP - DTS4 Retrieve FSN Description Id
- +1 ;
- +2 NEW RSLT,STS,EXEC,TRY
- +3 ;
- +4 ;Place call to retrieve the description id for a FSN
- +5 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).findTermsByName(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("FDESC",STS)
- IF +STS!($PIECE(STS,U,3)>$GET(BSTSWS("TIMEOUT")))
- QUIT
- +6 ;
- +7 ;Check server status
- +8 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +9 ;
- +10 QUIT STS
- +11 ;
- GCDSDTS4(BSTSWS,RESULT) ;EP - DTS4 update codesets
- +1 ;
- +2 ;Place call to retrieve codesets (namespaces)
- +3 NEW STS,EXEC,TRY
- +4 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).GetNamespaces(.BSTSWS,.RESULT)"
- XECUTE EXEC
- IF '+STS
- DO ER("GCDSDTS4",STS)
- IF +STS!($PIECE(STS,U,3)>$GET(BSTSWS("TIMEOUT")))
- QUIT
- +5 ;
- +6 ;Check server status
- +7 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +8 ;
- +9 QUIT STS
- +10 ;
- GVRDTS4(BSTSWS) ;EP - DTS4 update versions
- +1 ;
- +2 ;Place call to retrieve versions
- +3 NEW STS,EXEC,TRY
- +4 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).GetVersions(.BSTSWS)"
- XECUTE EXEC
- IF '+STS
- DO ER("GVRDTS4",STS)
- IF +STS
- QUIT
- +5 ;
- +6 ;Note - do not perform server status check because the check
- +7 ; uses this call
- +8 ;
- +9 QUIT STS
- +10 ;
- PTYDTS4(BSTSWS,RSLT) ;EP - DTS4 Perform Property Search
- +1 ;
- +2 ;Search based on property value
- +3 NEW STS,EXEC,TRY
- +4 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).propertyLookup(.BSTSWS,.RSLT)"
- XECUTE EXEC
- IF '+STS
- DO ER("PTYDTS4",STS)
- IF +STS!($PIECE(STS,U,3)>$GET(BSTSWS("TIMEOUT")))
- QUIT
- +5 ;
- +6 ;Check server status
- +7 DO SWLCL^BSTSWSV1(.BSTSWS,.STS)
- +8 ;
- +9 QUIT STS
- +10 ;
- SUBSET(BSTSWS,RESULT) ;EP - DTS4 get subset list
- +1 ;
- +2 ;Place call to retrieve list of subsets
- +3 NEW STS,EXEC,TRY
- +4 FOR TRY=1:1:+$GET(BSTSWS("RETRY"))
- SET STS=""
- SET EXEC="S STS=##class(BSTS.SOAP.WebFunctions).getListofSubsets(.BSTSWS,.RESULT)"
- XECUTE EXEC
- IF '+STS
- DO ER("SUBSET",STS)
- IF +STS
- QUIT
- +5 ;
- +6 ;Note - do not perform time check - this could be a longer running call
- +7 ;
- +8 QUIT STS
- +9 ;
- ER(TAG,ER) ;Error Handling
- +1 ;
- +2 DO ELOG^BSTSVOFL(TAG_"~BSTSCMCL: "_ER)
- +3 ;
- +4 QUIT