Skip to content

InstanceOperation with FhirString parameter #1769

Answered by marcovisserFurore
elvetian asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @elvetian,

Indeed, this is the way to do it. In the FhirClientTest we are executing a validate operation. That operation demands a code as parameter (see also the definition here). So actually theFhirClient request should be like this:

      Parameters p = new Parameters();
      p.Add("mode", new Code("create"));
      p.Add("resource", pat);
      OperationOutcome ooI = (OperationOutcome)client.InstanceOperation(ri.WithoutVersion(), "validate", p);

But, when an operation demands a parameter of type string, then you use the FhirString class. See here an example of the operation $graphql, (definition):

      Parameters p = new Parameters();
      p.Add("query", new FhirString("{name{te…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@elvetian
Comment options

@marcovisserFurore
Comment options

@mbaltus
Comment options

mbaltus Jun 25, 2021
Collaborator

@elvetian
Comment options

Answer selected by elvetian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants