Hi Yone,

Try to append in the bigginer of you XML Strign the XML declarion:

In the line:

do mensajeXML.Write($zcvt("<ORM_O01>........

Try:

do mensajeXML.Write($zcvt("<?xml version="1.0" encoding="utf-8"?> <ORM_O01>........

And check if had some character that can cause the <SINTAX > error in the cos.

Hi Abel,

The simplet way to create a new HL7 message form a existing message is call the method OutputToIOStream from the original message and the call the classmethod  ImportFromIOStream  of the subclass.

The global ^PAADMi("No", "") is a index global, if I'm not wrong ,is a index of PA_AADM table and the field of the index is PAADM_PAPMI_NO (MRN number of patient).  Maybe then idex have some problem.

Do you have access to the stored procedure code?, If yes try to execute the query of procedure manually in the System Adminstration Portal. If not, I think you will need some suport.

Hi Eric,

Ensemble manage all automaticaly.

Could you post the content of tah Log Tab? 

Hi,

The error occour in the line:


zPATADVICEINFOExecute+15^web.DHCENS.CDSS.PARADVINCEINFO.1

When try to access the global ^PAADMi("No", ""), the error occours because is trying to acces a null subscript.

Maybe a parameter was not passed in the procedure call ?

Hi Abel,

When we subclass a persistent class and we need that this subclass have a own storage we need to add in the inheritance class list the %Persistent class  first of all classes.

Shared storage

Class sample.MyHL7 Extends EnsLib.HL7.Message
{ 

Storage Default
{
<Type>%Library.CacheStorage</Type>
}

}

Own storage

Class sample.MyHL7 Extends (%Persistent, EnsLib.HL7.Message)
{ 

Storage Default
{
<Data name="MyHL7DefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>ParentId</Value>
</Value>
<Value name="3">
<Value>DocType</Value>
</Value>
<Value name="4">
<Value>Envelope</Value>
</Value>
<Value name="5">
<Value>Source</Value>
</Value>
<Value name="6">
<Value>IsMutable</Value>
</Value>
<Value name="7">
<Value>OriginalDocId</Value>
</Value>
<Value name="8">
<Value>MessageTypeCategory</Value>
</Value>
<Value name="9">
<Value>TimeCreated</Value>
</Value>
</Data>
<Data name="UserValues">
<Attribute>UserValues</Attribute>
<Structure>subnode</Structure>
<Subscript>"UserValues"</Subscript>
</Data>
<DataLocation>^sample.MyHL7D</DataLocation>
<DefaultData>MyHL7DefaultData</DefaultData>
<IdLocation>^sample.MyHL7D</IdLocation>
<IndexLocation>^sample.MyHL7I</IndexLocation>
<StreamLocation>^sample.MyHL7S</StreamLocation>
<Type>%Library.CacheStorage</Type>
} 

}

Hi Davi,

A simplest way is creating a datatype class:

Class system.dto.sector.SectorStatusEnum Extends %Integer [ ClassType = datatype ]
{
 
Parameter DISPLAYLIST = ",Active,Inactive,Production,Upkeep,NewValue";

Parameter VALUELIST = ",1,2,3,4,5"; 

}

And use the datatype in your class:

Class system.dto.sector.Test Extends %Persistent
{ 

Property SectorStatus As SectorStatusEnum;

}

Example: