Skip to content

QRF-5 ExtraComponents #471

Answered by milkshakeuk
alberk8 asked this question in Q&A
Discussion options

You must be logged in to vote

@alberk8 here is how you could customise QRF-5:

using System;
using NHapi.Base.Parser;
using NHapi.Base.Model;
using NHapi.Model.V26.Message;
using NHapi.Model.V26.Datatype;

var er7 = """
	MSH|^~\&||KC1234F3|||20230810160302+0800||QRY^R02|202308101603020042|P|2.6
	QRD|20230810160302+0800|R|I|Q101||||TXE107200400230|RES
	QRF|MON||||168430091&5^5^1^0^2005&2005&2005&2005&2005
	""".ReplaceLineEndings("\r");
	
var pipeParser = new PipeParser();

var qryR02 = pipeParser.Parse(er7) as QRY_R02;
ST part5 = qryR02.QRF.GetOtherQRYSubjectFilter(0);

// getting non-existent component at index 4 component will create it
var newComponent = part5.ExtraComponents.GetComponent(4);
((GenericPrimitive)newCo…

Replies: 9 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by alberk8
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #469 on August 14, 2023 10:09.