首先,我为这个问题的长度表示歉意。我以下列方式进行了全局设置:
^WHEAIPP(1,116444,1)=3
^WHEAIPP(1,116444,1,1)="58898^^LSWELFER^58898,0"
^WHEAIPP(1,116444,1,2)="58898^59128^MPHILLIPS^59135,0"
^WHEAIPP(1,116444,1,3)="62626^62745^FXALTMAN^62626,58427^^^^^^2^"
^WHEAIPP(1,116444,2)=3
^WHEAIPP(1,116444,2,1)="59129^^MPHILLIPS^59910,0^^^^^^"
^WHEAIPP(1,116444,2,2)="59129^59547^SSNARE^59934,0^^^^^^"
^WHEAIPP(1,116444,2,3)="59129^62954^FXALTMAN^62654,32289^^^^^^3^"
^WHEAIPP(1,116444,3)=4
^WHEAIPP(1,116444,3,1)="60311^^SALFANO^60311,0^^^^^^"
^WHEAIPP(1,116444,3,2)="60311^^SSNARE^60754,0^^^^^^2"
^WHEAIPP(1,116444,3,3)="60311^^NEPAXSON^60757,0^^^^^^2"
^WHEAIPP(1,116444,3,4)="60311^62636^FXALTMAN^62626,58428^=^100^=^25^^5"
^WHEAIPP(1,116444,4)=4
^WHEAIPP(1,116444,4,1)="59548^^SSNARE^59550,0"
^WHEAIPP(1,116444,4,2)="59548^60310^SSNARE^59934,0^^^^^^2"
^WHEAIPP(1,116444,4,3)="62626^^FXALTMAN^62626,61050^^^^^^^1"
^WHEAIPP(1,116444,4,4)="62617^62647^FXALTMAN^62627,27518^^^^^^4"
第一个下标是内部 Hmo,第二个是内部提供,第三个是行号,最后一个是行详细信息号。第 4 下标级别的数据是行的组合审计跟踪历史记录,最高行详细编号为当前行。
我有 3 个具有父子关系的类设置如下: 主类
Class XFXA.Try3.IppProv Extends (%Persistent, %Populate, %XML.Adaptor) [ ClassType =
persistent, Inheritance = right, ProcedureBlock, SqlRowIdName = Id, StorageStrategy
= SQLMapping ]
{
Property Hmo As %Integer [ Required ];
Property Keen As %Integer [ Required ];
/// Contains the array of data initially loaded into the class
Property OriginalData As %String [ MultiDimensional ];
Property ReadyToFile As %Boolean [ InitialExpression = 0, Transient ];
Relationship IppLines As XFXA.Try3.IppProvLine [ Cardinality = children, Inverse =
relIppProv ];
Index iMaster On (Hmo, Keen) [ IdKey, PrimaryKey, Unique ];
.
.
.
<Storage name="SQLMapping">
<DataLocation>^[%extRef("UCKE"),%extRef("SYKE")]WHEAIPP</DataLocation>
<ExtentSize>100000</ExtentSize>
<SequenceNumber>19</SequenceNumber>
<SQLMap name="DBMS">
<Global>^[%extRef("UCKE"), %extRef("SYKE")]WHEAIPP</Global>
<Structure>delimited</Structure>
<Subscript name="1">
<Expression>{Hmo}</Expression>
</Subscript>
<Subscript name="2">
<Expression>{Keen}</Expression>
</Subscript>
<Type>data</Type>
</SQLMap>
<StreamLocation>^XFXA.Try3.IppProvS</StreamLocation>
<Type>%Library.CacheSQLStorage</Type>
</Storage>
}
线类
Class XFXA.Try3.IppProvLine Extends (%Persistent, %Populate, %XML.Adaptor) [ ClassType
= persistent, Inheritance = right, ProcedureBlock, SqlRowIdName = Id, StorageStrategy
=SQLMapping ]
{
Relationship relIppProv As XFXA.Try3.IppProv [ Cardinality = parent, Inverse =
IppLines ];
Relationship IppLineDetail As XFXA.Try3.IppProvLineDetail [ Cardinality = children,
Inverse = relIppProvLinex ];
Property Line As %String;
Property IppLineDetailCount As %String;
Index iMaster On Line [ IdKey, PrimaryKey, Unique ];
.
.
.
<Storage name="SQLMapping">
<ExtentSize>100000</ExtentSize>
<SequenceNumber>14</SequenceNumber>
<SQLMap name="DBMS">
<Data name="IppLineDetailCount">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>1</Piece>
</Data>
<Global>^[%extRef("UCKE"), %extRef("SYKE")]WHEAIPP</Global>
<Structure>delimited</Structure>
<Subscript name="1">
<Expression>{XFXA_Try3.IppProv.Hmo}</Expression>
</Subscript>
<Subscript name="2">
<Expression>{XFXA_Try3.IppProv.Keen}</Expression>
</Subscript>
<Subscript name="3">
<Expression>{Line}</Expression>
</Subscript>
<Type>data</Type>
</SQLMap>
<StreamLocation>^XFXA.Try3.IppProvLineS</StreamLocation>
<Type>%Library.CacheSQLStorage</Type>
</Storage>
}
Line Detail Class Class XFXA.Try3.IppProvLineDetail Extends (%Persistent, %XML.Adaptor) [ ClassType = persistent, Inheritance = right, ProcedureBlock, SqlRowIdName = Id, StorageStrategy = SQLMapping ] {
Relationship relIppProvLinex As XFXA.Try3.IppProvLine [ Cardinality = parent, Inverse =
IppLineDetail ];
Property LnDetail As %String;
Index iMaster On LnDetail [ IdKey, PrimaryKey, Unique ];
.
.
.
<Storage name="SQLMapping">
<ExtentSize>100000</ExtentSize>
<SQLMap name="DBMS">
<Data name="ClmAmtAllowed">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>6</Piece>
</Data>
<Data name="ClmLineAmtAllowed">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>8</Piece>
</Data>
<Data name="ClmLineOp">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>7</Piece>
</Data>
<Data name="ClmOp">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>5</Piece>
</Data>
<Data name="Deleted">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>11</Piece>
</Data>
<Data name="EffDt">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>1</Piece>
</Data>
<Data name="IppCode">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>10</Piece>
</Data>
<Data name="LastChgDt">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>4</Piece>
</Data>
<Data name="PxDxCdeFlag">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>9</Piece>
</Data>
<Data name="TermDt">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>2</Piece>
</Data>
<Data name="UserIni">
<Delimiter>"^"</Delimiter>
<Node>+0</Node>
<Piece>3</Piece>
</Data>
<Global>^[%extRef("UCKE"), %extRef("SYKE")]WHEAIPP</Global>
<Structure>delimited</Structure>
<Subscript name="1">
<Expression>{XFXA_Try3.IppProv.Hmo}</Expression>
</Subscript>
<Subscript name="2">
<Expression>{XFXA_Try3.IppProv.Keen}</Expression>
</Subscript>
<Subscript name="3">
<Expression>{XFXA_Try3.IppProvLine.Line}</Expression>
</Subscript>
<Subscript name="4">
<Expression>{LnDetail}</Expression>
</Subscript>
<Type>data</Type>
</SQLMap>
<StreamLocation>^XFXA.Try3.IppProvLineDetails</StreamLocation>
<Type>%Library.CacheSQLStorage</Type>
</Storage>
}
当用户标记要删除的行时,在第 4 下标级别的当前详细信息行中将已删除标志设置为 1,如果该行不是最后一行,则归档代码移动到最后一行。如果我尝试在我的主类的删除方法中执行此操作,我会收到一条错误消息,指出不允许更新 RowIds。这是因为我试图操纵线类的 Line 属性移动线以将删除的线推到最后。对文档的检查发现 AllowRowIDUpdate 带有一些警告,但不清楚如何使用它的示例。有谁知道实现这一目标的方法?