You need to traverse the array using the foreach action. The key of you array wil be the key of the OBXgrp. for the others group I'll assume that are fix with the key "1". Bellow a simple example.
Have you tired to export in UDL format (the UDL format is the document that we edit in Studio, VSCode, or in Atelier) via classmethod ExportUDL from the class %SYSTEM.OBJ
Bellow the query in the INFORMATION_SCHEMA tables:
SELECT Tables.TABLE_SCHEMA, Tables.TABLE_NAME, Columns.COLUMN_NAME, Columns.DATA_TYPE
FROM INFORMATION_SCHEMA.TABLES AS Tables
INNER JOIN INFORMATION_SCHEMA.COLUMNS AS Columns
ON (Columns.TABLE_SCHEMA = Tables.TABLE_SCHEMA) AND (Columns.TABLE_NAME = Tables.TABLE_NAME)
WHERE (Tables.TABLE_SCHEMA = 'Sample') AND (Tables.TABLE_NAME = 'Person')
In the package %Dictionary you can query all information about classes.
To list all properties before compilation (columns):
SELECT Class.Name AS ClassName, Prop.Name AS PropertyName, Prop.Type
FROM %Dictionary.ClassDefinition AS Class
INNER JOIN %Dictionary.PropertyDefinition AS Prop ON Prop.parent = Class.%ID
WHERE Class.Name = 'Sample.Person'
ClassName
PropertyName
Type
Sample.Person
Age
%Integer
Sample.Person
DOB
%Date
Sample.Person
FavoriteColors
%String
Sample.Person
Home
Address
Sample.Person
Name
%String
Sample.Person
Office
Address
Sample.Person
SSN
%String
Sample.Person
Spouse
Person
To list all properties after compilation (columns):
SELECT Class.Name AS ClassName, Prop.Name AS PropertyName, Prop.Type
FROM %Dictionary.CompiledClass AS Class
INNER JOIN %Dictionary.CompiledProperty AS Prop ON Prop.parent = Class.%ID
WHERE Class.Name = 'Sample.Person'
Then indexes variables is analogous to the ORM messages.
The easy way to you "discover" the property path is creating a DTL data transformation and map the property that you need in a fake assign action, save, compile and change to the generated routine (in studio use the shortcut Ctrl+Shift+V, 2 times)
go to post
Hi Jeff,
You need to traverse the array using the foreach action. The key of you array wil be the key of the OBXgrp. for the others group I'll assume that are fix with the key "1". Bellow a simple example.
go to post
Hi Robert,
Have you tired to export in UDL format (the UDL format is the document that we edit in Studio, VSCode, or in Atelier) via classmethod ExportUDL from the class %SYSTEM.OBJ
https://docs.intersystems.com/irisforhealth20201/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25SYSTEM.OBJ#METHOD_ExportUDL
To import you can use the classmethods Load, LoadDir or any other method that load code from disk,. Or you can import from Studio to.
https://docs.intersystems.com/irisforhealth20201/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25SYSTEM.OBJ#METHOD_Load
For me worked export from:
And import in:
go to post
Thanks Benjamin for the explanation,
Bellow the query in the INFORMATION_SCHEMA tables:
go to post
Hi Meenakshi,
In the package %Dictionary you can query all information about classes.
To list all properties before compilation (columns):
To list all properties after compilation (columns):
go to post
Hi Thembelani
If I understood, you don't want to project the SerialC. If is this, remove the %XML.Adaptor from the Extends class list.
go to post
Yone,
This information is only in the Message Header, to relate the header with the message body use the properties MessageBodyId and MessageBodyClassName.
https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=ENSLIB&CLASSNAME=Ens.MessageHeader
go to post
You can set in the Business Service the Setting: MessageSchemaCategory and then the Ensemble will recognize your message and map all properties.
I hope be helped you.
go to post
Eric,
The problem is that ensemble do not recognized your Message Type, then in this case you can only access properties by Index.
In your case is segment 9 field 6:
pRequest.GetValueAt("9:6")
To see the problem call the method GetValueAt and log the status code:
Do pRequest.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp(2).OBX:6", , .statusCode)
$$$LOGSTATUS(statusCode)
See de documentation for mor detail about message schema:
https://docs.intersystems.com/irisforhealthlatest/csp/docbook/Doc.View.cls?KEY=EHL72_tools
go to post
It's correct, you can use index or name of a field.
Are you sure about the value of a field?
Could you post the entire HL7 message?
go to post
Hi Eric,
In ORM messages the property path is:
Where <indexORC> is the "line" of ORC segment, the <indexOBX> is the same to OBX segment, generally we iterate over a loop.
In ORU messages the property path is:
Then indexes variables is analogous to the ORM messages.
The easy way to you "discover" the property path is creating a DTL data transformation and map the property that you need in a fake assign action, save, compile and change to the generated routine (in studio use the shortcut Ctrl+Shift+V, 2 times)