Skip to content

How to write DocumentReference? #1782

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

You must be logged in to vote

Here's how I did it:

var categories = new List<CodeableConcept>();
categories.Add(new CodeableConcept(system:"http:https://myURI/fhir/ValueSet/documentreference-class",
  code:"[some code]", display:"[some value]",  text:"[some text]"));

var docType = new CodeableConcept(system:"http:https://myURI/fhir/ValueSet/documentreference-type", 
  code:"[some code]", display:"[some value]",  text:"[some text]");

var attachment = new Attachment()
{
   ContentType = "application/pdf",
   Data = Encoding.ASCII.GetBytes(["BASE64 encoded pdf content"])
};
var content = new DocumentReference.ContentComponent()
{
   Attachment = attachment
};
var contents = new List<DocumentReference.ContentComponent>();
contents.Add

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@marcovisserFurore
Comment options

@mmikaeel
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