HL7

Syndicate content 16 

(Originally posted by @Benjamin Spead on June 25, 2014)

This code snippet generates a list of Ensemble Lookup Tables and Schema documents in the user's current namespace. Run the code by running the class method "test":


Class benspead.EnsTablesSchema
{
    classmethod test() {
        If ##class(%Dictionary.CompiledClass).%ExistsId("Ens.Util.LookupTableDocument") {
            // only supported in Ensemble 2012.1+
            Write !,!,"Exporting Ensemble Lookup Tables..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("Ens.Util.LookupTableDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Write "document found: "_ item,!
            }
            Do rs.Close()
            Set rs=""
        }
        If ##class(%Dictionary.CompiledClass).%ExistsId("EnsLib.HL7.SchemaDocument") {
            Write !,!,"Exporting Ensemble HL7 Schemas..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("EnsLib.HL7.SchemaDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Continue:$listfind($lb("2.1.HL7","2.2.HL7","2.3.HL7","2.4.HL7","2.5.HL7","2.6.HL7","2.7.HL7","2.3.1.HL7","2.5.1.HL7","2.7.1.HL7","ITK.HL7")
                                    ,item)
                Write "document found: "_ item,!
            }
            Do rs.Close()
            Set rs=""
        }
    }
}

Here's a link to the code on GitHub: https://github.com/intersystems-community/code-snippets/blob/master/src/...

Last comment 2 days ago
0 2
29

views

0

rating

Hi Everyone!

New video"SMART on FHIR: The Basics" is available now on  DC YouTube Channel:

 

0 0
0

comments

128

views

0

rating

Hi Community!

Check the new video on DC YouTube Channel:

SMART on FHIR Apps for Information Exchange

 

0 1
0

comments

73

views

0

rating

Hi Community!

Join us at the FHIR event of the year in the US: the HL7 FHIR Dev Days 2018!
A unique chance to meet 400 colleagues and discuss all topics relating to your field.

InterSystems is proud to be the Host Sponsor of HL7 FHIR Dev Days for its first U.S. edition, Boston, June 19 – 21st! We support the HL7 FHIR standard as it is critical for rapid innovation. FHIR can be used as an accelerant to bring all the information that matters for a patent into a unified health record. 

0 2
0

comments

187

views

0

rating