查找

質問
· 8 hr 前

Warning on Message Body

I am trying to centralize our FHIR queries into a single BP object that would send the FHIR query to the EMR, interpret the response into a %Persistent structure that could be sent back to the requestor. In theory it seemed like it would work but I am running into an issue..

"Warning on Message body 5@osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record'
/ 229 because Status 'ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>Transform+3 ^osuwmc.Scott.FHIR.DemoOutboundHL7Message.1 *DocType,osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record -- logged as '-'
number - @' Set:""=source.DocType tBlankSrc=1, source.DocType="ORMORUPDF:MDM_T02"''
matched ReplyCodeAction 1 : 'E=W'
resulting in Action code W"

When I interpret the FHIR Response into a %Persistent structure, I get the error above. Am I missing something? I do not reference the DocType anywhere in my Transformation...

Class osuwmc.Epic.FHIR.DTL.FHIRResponseToPatient Extends Ens.DataTransform
{

ClassMethod Transform(source As HS.FHIRServer.Interop.Response, target As osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record) As %Status
{
  Set tSC=$$$OK
  set tQuickStream = ##Class(HS.SDA3.QuickStream).%OpenId(source.QuickStreamId)
  set tRawJSON = ##Class(%Library.DynamicObject).%FromJSON(tQuickStream)
  $$$TRACE(tRawJSON.%ToJSON())
  set tResource = tRawJSON.entry.%Get(0).resource
  $$$LOGINFO("Resource Type: "_tResource.resourceType)
  if tResource.resourceType '= "Patient" {
    set tSC = $$$ERROR($$$GeneralError, "FHIRResponseToPatient: Resource type is not Patient")
    return tSC
  }
  else{
    set target = ##class(osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record).%New()
    set mrnIter = tResource.identifier.%GetIterator()
    while mrnIter.%GetNext(,.identifier) {
      if identifier.system = "urn:oid:1.2.840.114350.1.13.172.2.7.5.737384.100" {
        set target.MRN = identifier.value
      }
    }
    set NameIter = tResource.name.%GetIterator()
    while NameIter.%GetNext(,.humanName) {
      if humanName.use = "official" {
        set target.lastname = humanName.family
        set target.firstname = humanName.given.%Get(0)
      }
    set target.birthdate = tResource.birthDate
    set target.gender = tResource.gender
    }
    set addrIter = tResource.address.%GetIterator()
    while addrIter.%GetNext(,.address) {
      if address.use = "home" {
        set target.address = address.line.%Get(0)
        set target.city = address.city
        set target.state = address.state
        set target.postalcode = address.postalCode
      }
    }
  }
  $$$LOGINFO(target.MRN_" "_target.lastname_" "_target.firstname_" "_target.birthdate_" "_target.gender_" "_target.address_" "_target.city_" "_target.state_" "_target.postalcode)
  return tSC
}

}

Maybe it's because I use osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record for the request to get generated, and for me to send the response back to the requestor? Should I be using a different %Persistent class, so the system does not get confused?

1件の新着コメント
ディスカッション (1)1
続けるにはログインするか新規登録を行ってください
質問
· 10 hr 前

Is there an analogy of Log() function for Embedded Python to Log errors?

Hi developers!
Happy holidays!

In ObjectScript there is neat option to log errors - call Log() method of an exception intance, e.g.:

ClassMethod MyMethod() {

Try {

w 1/0

}

Catch e {

do e.Log() // logging error in the app log

write "the error happened: "_e.DisplayString()

}

}

Is there anything like that for Embedded Python? e.g:

ClassMethod MyMethod() [Language = python] {

 try:

   print(1/0)

 except ZeroDivisionError as e:

   // how can I log e into IRIS App Error Log here?

   print("Caught exception: " + str(e))

}

Any ideas?

3件の新着コメント
ディスカッション (3)1
続けるにはログインするか新規登録を行ってください
お知らせ
· 10 hr 前

Avis de maintenance du 26 décembre 2025

Salut la Communauté,

Nous effectuons actuellement des travaux techniques. Durant cette période, vous pourriez rencontrer des problèmes avec le portail de la communauté des développeurs, l'IA de la communauté des développeurs et la fonction de recherche :

🔹 "Demandez à DC AI" est temporairement indisponible.

🔹 La recherche peut être plus longue que d'habitude ou ne pas renvoyer de résultats.

Nous mettons tout en œuvre pour rétablir le fonctionnement normal au plus vite. Merci de votre patience et de votre compréhension.

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
お知らせ
· 10 hr 前

Maintenance Notice Dec 26, 2025

Dear Community members,

We are currently performing technical work, and during this time, you may experience issues with the Developer Community portal, Developer Community AI, and search functionality:

🔹 Ask DC AI is temporarily unavailable
🔹 Search may take longer than usual or may not return results

We’re working to restore full functionality as quickly as possible. Thank you for your patience and understanding.

ディスカッション (0)2
続けるにはログインするか新規登録を行ってください
記事
· 11 hr 前 1m read

Commandes terminal pour la gestion de la production

Commandes pour la gestion des productions :

Démarrer, arrêter, mettre à jour, restaurer et nettoyer une production

Do ##class(Ens.Director).StartProduction("ProductionName")
Do ##class(Ens.Director).StopProduction()
Do ##class(Ens.Director).UpdateProduction()
Do ##class(Ens.Director).RecoverProduction()
Do ##class(Ens.Director).CleanProduction()

Interrompre les messages en attente :

d ##class(Ens.Queue).AbortQueue("Component Name")

Obtenir le nom de l’instance :

W !,##class(%SYS.System).GetUniqueInstanceName()

Obtenir le nom du nœud :

W !,##class(%SYS.System).GetNodeName()

Terminer un Job (JobId) :

d $SYSTEM.Process.Terminate(jobid)

Activer un espace de nom (Namespace) :

 do ##class(%EnsembleMgr).EnableNamespace($namespace)

Activer un élément de configuration (ConfigItem) :

Do ##class(Ens.Director).EnableConfigItem("ConfigNameHere", 0, 1)

Obtenir un GUID :

write $System.Util.CreateGUID()

Obtenir les informations du CPU :

d $system.CPU.Dump()

Obtenir le nombre de CPU :

Retourne le nombre de CPU virtuels (également appelés CPU logiques ou threads) disponibles sur le système.

W $SYSTEM.Util.NumberOfCPUs()

Vérifier l’espace disque disponible :

Affiche l’espace libre des bases de données pour tous les namespaces.

do ALL^%FREECNT

 

Merci,
 

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください