// using XDSDotNet;
// using System.ServiceModel;
// using System.ServiceModel.Channels;
var documentContents = new byte[] { 1, 2, 3, 4};
var provideAndRegisterDocumentSet = new ProvideAndRegisterDocumentSet_ITI41(
"patientid",
"sourceid",
"Document Name",
"mime/type", documentContents
);
provideAndRegisterDocumentSet.AddSubmissionSetClassification(new XDSClassification {
ClassificationScheme = XDSStrings.CLASSIFICATIONSCHEME_SUBMISSIONSET_CONTENTTYPECODE,
NodeRepresentation = "...",
Name = "..."
});
// ... add all required document classifications
provideAndRegisterDocumentSet.AddDocumentClassification(new XDSClassification {
ClassificationScheme = XDSStrings.CLASSIFICATIONSCHEME_TYPECODE,
NodeRepresentation = "...",
Name = "..."
});
// ... add slots
provideAndRegisterDocumentSet.AddDocumentSlot(new XDSSlot {
Name = "creationTime",
Value = "..."
});
// ... set authorPerson
provideAndRegisterDocumentSet.AuthorPerson = (new XCN { FirstName = "...", LastName = "..." }).Serialize();
// ... and optionally authorInstitutions
provideAndRegisterDocumentSet.AuthorInstitutions = new[] { (new XON { InstitutionName = "..."}).Serialize() };
// the soap request body, ready for execution
var requestBody = provideAndRegisterDocumentSet.CreateRequestBody();
var requestMessage = Message.CreateMessage(MessageVersion.Soap12WSAddressing10, "urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b", requestBody);
// create WCF channel
var channelFactory = new ChannelFactory<IProvideAndRegisterDocumentSetITI41>("wcf endpoint configuration name");
var channel = channelFactory.CreateChannel();
// execute web service call
var response = channel.ProvideAndRegisterDocumentSet(requestMessage);
var responseBody = XElement.ReadFrom(response.GetReaderAtBodyContents());
-
Notifications
You must be signed in to change notification settings - Fork 2
codeape2/XDSDotNet
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published