Hi,
Terser, works with defined fields, can not do this.
In
pdf QPD-8 is defined as follows.
Table 3.21-2: IHE Profile - QPD segment
QPD-8 CX O What Domains Returned
Type is
CX. Only element names is different.
Element names changed code is below :
Code: Select all
unit Unit2;
interface
uses diHL7Base,diHL725,diHL7DT25;
type
TMyQPD_25 = class(TdiSegment)
protected
function GetMessageQueryName : TdiCE_25;
procedure SetMessageQueryName(Value : TdiCE_25);
function GetQueryTag : TdiST_25;
procedure SetQueryTag(Value : TdiST_25);
function GetQueryInputParameterList(RepCount :Integer ) : TdiQIP_25;
procedure SetQueryInputParameterList(RepCount :Integer; Value : TdiQIP_25);
function GetParametersforFuzzySearch : TdiQIP_25;
procedure SetParametersforFuzzySearch(Value : TdiQIP_25);
function GetUserParameters : TdiNode;
procedure SetUserParameters(Value : TdiNode);
function GetUserParameters2 : TdiNode;
procedure SetUserParameters2(Value : TdiNode);
function GetUserParameters3 : TdiNode;
procedure SetUserParameters3(Value : TdiNode);
function GetWhatDomainsReturned: TdiCX_25;
procedure SetWhatDomainsReturned(const Value: TdiCX_25);
public
property MessageQueryName : TdiCE_25 read GetMessageQueryName write SetMessageQueryName;
property QueryTag : TdiST_25 read GetQueryTag write SetQueryTag;
property QueryInputParameterList[RepCount :Integer ] : TdiQIP_25 read GetQueryInputParameterList write SetQueryInputParameterList;
function QueryInputParameterListRepCount : Integer ;
property ParametersforFuzzySearch : TdiQIP_25 read GetParametersforFuzzySearch write SetParametersforFuzzySearch;
property UserParameters : TdiNode read GetUserParameters write SetUserParameters;
property UserParameters2 : TdiNode read GetUserParameters2 write SetUserParameters2;
property UserParameters3 : TdiNode read GetUserParameters3 write SetUserParameters3;
property WhatDomainsReturned: TdiCX_25 read GetWhatDomainsReturned write SetWhatDomainsReturned;
procedure Init; override;
end;
TMyQBP_Q22_25= class(TdiMessage)
private
protected
function GetMSH : TdiMSH_25;
procedure SetMSH(Value : TdiMSH_25);
function GetSFT(RepCount :Integer ) : TdiSFT_25;
procedure SetSFT(RepCount :Integer;Value : TdiSFT_25);
function GetQPD : TMyQPD_25;
procedure SetQPD(Value : TMyQPD_25);
function GetRCP : TdiRCP_25;
procedure SetRCP(Value : TdiRCP_25);
function GetDSC : TdiDSC_25;
procedure SetDSC(Value : TdiDSC_25);
public
property MSH : TdiMSH_25 read GetMSH write SetMSH;
property SFT[RepCount :Integer ] : TdiSFT_25 read GetSFT write SetSFT;
function SFTRepCount : Integer ;
property QPD : TMyQPD_25 read GetQPD write SetQPD;
property RCP : TdiRCP_25 read GetRCP write SetRCP;
property DSC : TdiDSC_25 read GetDSC write SetDSC;
procedure Init; override;
end;
implementation
procedure TMyQPD_25.Init;
begin
inherited;
Name :='QPD';
Definitions.Add('MessageQueryName',TdiCE_25,1,1);
Definitions.Add('QueryTag',TdiST_25,0,1);
Definitions.Add('QueryInputParameterList',TdiQIP_25,0,1);
Definitions.Add('ParametersforFuzzySearch',TdiQIP_25,0,1);
Definitions.Add('UserParameters',TdiNode,0,1);
Definitions.Add('UserParameters2',TdiNode,0,1);
Definitions.Add('UserParameters3',TdiNode,0,1);
Definitions.Add('ExtendedCompositeIDwithCheckDigit',TdiCX_25,0,1);
end;
function TMyQPD_25.GetMessageQueryName : TdiCE_25;
begin
Result:= TdiCE_25(GetStructure('MessageQueryName',0));
end;
procedure TMyQPD_25.SetMessageQueryName(Value : TdiCE_25);
begin
SetStructure('MessageQueryName',0,Value);
end;
function TMyQPD_25.GetQueryTag : TdiST_25;
begin
Result:= TdiST_25(GetStructure('QueryTag',0));
end;
procedure TMyQPD_25.SetQueryTag(Value : TdiST_25);
begin
SetStructure('QueryTag',0,Value);
end;
function TMyQPD_25.GetQueryInputParameterList(RepCount :Integer ) : TdiQIP_25;
begin
Result:=TdiQIP_25(GetStructure('QueryInputParameterList',RepCount));
end;
procedure TMyQPD_25.SetQueryInputParameterList(RepCount :Integer; Value : TdiQIP_25);
begin
SetStructure('QueryInputParameterList',RepCount,Value);
end;
function TMyQPD_25.QueryInputParameterListRepCount: Integer;
begin
Result := GetNodeCount('QueryInputParameterList');
end;
function TMyQPD_25.GetParametersforFuzzySearch : TdiQIP_25;
begin
Result:= TdiQIP_25(GetStructure('ParametersforFuzzySearch',0));
end;
procedure TMyQPD_25.SetParametersforFuzzySearch(Value : TdiQIP_25);
begin
SetStructure('ParametersforFuzzySearch',0,Value);
end;
function TMyQPD_25.GetUserParameters : TdiNode;
begin
Result:= TdiNode(GetStructure('UserParameters',0));
end;
procedure TMyQPD_25.SetUserParameters(Value : TdiNode);
begin
SetStructure('UserParameters',0,Value);
end;
function TMyQPD_25.GetUserParameters2 : TdiNode;
begin
Result:= TdiNode(GetStructure('UserParameters2',0));
end;
procedure TMyQPD_25.SetUserParameters2(Value : TdiNode);
begin
SetStructure('UserParameters2',0,Value);
end;
function TMyQPD_25.GetUserParameters3 : TdiNode;
begin
Result:= TdiNode(GetStructure('UserParameters3',0));
end;
procedure TMyQPD_25.SetUserParameters3(Value : TdiNode);
begin
SetStructure('UserParameters3',0,Value);
end;
function TMyQPD_25.GetWhatDomainsReturned: TdiCX_25;
begin
Result:= TdiCX_25(GetStructure('WhatDomainsReturned',0));
end;
procedure TMyQPD_25.SetWhatDomainsReturned(
const Value: TdiCX_25);
begin
SetStructure('WhatDomainsReturned',0,Value);
end;
function TMyQBP_Q22_25.GetMSH : TdiMSH_25;
begin
Result:=TdiMSH_25(GetStructure('MSH',0));
end;
procedure TMyQBP_Q22_25.SetMSH(Value : TdiMSH_25);
begin
SetStructure('MSH',0,Value);
end;
function TMyQBP_Q22_25.GetSFT(RepCount :Integer ) : TdiSFT_25;
begin
Result:=TdiSFT_25(GetStructure('SFT',RepCount));
end;
procedure TMyQBP_Q22_25.SetSFT(RepCount :Integer;Value : TdiSFT_25);
begin
SetStructure('SFT',RepCount,Value);
end;
function TMyQBP_Q22_25.SFTRepCount : Integer;
begin
Result := GetNodeCount('SFT');
end;
function TMyQBP_Q22_25.GetQPD : TMyQPD_25;
begin
Result:=TMyQPD_25(GetStructure('QPD',0));
end;
procedure TMyQBP_Q22_25.SetQPD(Value : TMyQPD_25);
begin
SetStructure('QPD',0,Value);
end;
function TMyQBP_Q22_25.GetRCP : TdiRCP_25;
begin
Result:=TdiRCP_25(GetStructure('RCP',0));
end;
procedure TMyQBP_Q22_25.SetRCP(Value : TdiRCP_25);
begin
SetStructure('RCP',0,Value);
end;
function TMyQBP_Q22_25.GetDSC : TdiDSC_25;
begin
Result:=TdiDSC_25(GetStructure('DSC',0));
end;
procedure TMyQBP_Q22_25.SetDSC(Value : TdiDSC_25);
begin
SetStructure('DSC',0,Value);
end;
procedure TMyQBP_Q22_25.Init;
begin
inherited;
Name :='QBP_Q22';
MessageType :='QBP';
TriggerEvent :='Q22';
HL7Version :='2.5';
Definitions.Add('MSH',TdiMSH_25,1,1);
Definitions.Add('SFT',TdiSFT_25,0,-1);
Definitions.Add('QPD',TMyQPD_25,1,1);
Definitions.Add('RCP',TdiRCP_25,1,1);
Definitions.Add('DSC',TdiDSC_25,0,1);
ParseHL7(InitMsg);
end;
initialization
diRegisterClass(TMyQBP_Q22_25,'QBP_Q22','2.5');
diRegisterClass(TMyQPD_25,'QPD','2.5');
finalization
diUnRegisterClass(TMyQBP_Q22_25);
diUnRegisterClass(TMyQPD_25);
end.
If your element type different, please write us.
Best regards.