public virtual void SetUp() { MockMessageBeanRegistry.Initialize(); DefaultCodeResolutionConfigurator.ConfigureCodeResolversWithTrivialDefault(); CodeResolverRegistry.Register(new TrivialCodeResolver()); this.service = new MockTestCaseMessageDefinitionService(); }
public virtual void SetUp() { MockMessageBeanRegistry.Initialize(); CodeResolverRegistry.Register(new TrivialCodeResolver()); this.document = GetSourceDocument(); this.service = new MockTestCaseMessageDefinitionService(); this.messageSource = new Hl7MessageSource(MockVersionNumber.MOCK_NEWFOUNDLAND, this.document, null, null, service); }
internal ConversionContext(MessageDefinitionService service, VersionNumber version, TimeZoneInfo dateTimeZone, TimeZoneInfo dateTimeTimeZone, string messageId, ICollection <string> templateIdsFromDocument, Hl7Errors errors) { this.service = service; this.version = version; this.dateTimeTimeZone = dateTimeTimeZone; this.dateTimeZone = dateTimeZone; this.interaction = DetermineInteraction(messageId, templateIdsFromDocument, version, service, errors); }
internal MessagePartHolder(MessageDefinitionService service, VersionNumber version, string typeName, IList <TypeName> typeHierarchy ) { // intentionally specified as an ArrayList for translation purposes this.messagePart = service.GetMessagePart(version, typeName); this.allRelationships = MergeRelationships(service, version, typeHierarchy); if (typeHierarchy.Count > 1) { this.allRelationships.Sort(); } }
public virtual void SetUp() { MockMessageBeanRegistry.Initialize(); CodeResolverRegistry.Register(new TrivialCodeResolver()); this.service = new MockTestCaseMessageDefinitionService(); this.document = GetSourceDocument(); Hl7MessageSource rootSource = new Hl7MessageSource(MockVersionNumber.MOCK_NEWFOUNDLAND, document, null, null, this.service ); this.element = document.DocumentElement; this.partSource = rootSource.CreatePartSource(CreateRelationship("MFMI_MT700711CA.Author"), element); }
public MessageBeanTransformerImpl(MessageDefinitionService service, RenderMode renderMode, TimeZoneInfo dateTimeZone, TimeZoneInfo dateTimeTimeZone, bool performAdditionalCdaValidationWhenUnmarshalling) { this.service = service; this.renderMode = renderMode; this.dateTimeZone = dateTimeZone; this.dateTimeTimeZone = dateTimeTimeZone; this.performAdditionalCdaValidationWhenUnmarshalling = performAdditionalCdaValidationWhenUnmarshalling; if (this.service != null) { this.service.Initialize(); } MessageBeanRegistry.GetInstance(); }
public virtual void SetUp() { MockMessageBeanRegistry.Initialize(); CodeResolverRegistry.Register(new EnumBasedCodeResolver(typeof(Ca.Infoway.Messagebuilder.Domainvalue.Controlact.ActStatus ))); CodeResolverRegistry.Register(new TrivialCodeResolver()); this.service = new MockTestCaseMessageDefinitionService(); this.document = GetSourceDocument(XML); this.element = this.document.DocumentElement; Hl7MessageSource rootSource = new Hl7MessageSource(MockVersionNumber.MOCK_NEWFOUNDLAND, this.document, null, null, this.service ); this.partSource = rootSource.CreatePartSource(CreateRelationship("MCCI_MT002100CA.Sender"), element); }
private Interaction DetermineInteraction(string messageId, ICollection <string> templateIdsFromDocument, VersionNumber version , MessageDefinitionService service, Hl7Errors errors) { Interaction result = null; if (service.IsCda(version)) { result = ObtainCdaInteraction(templateIdsFromDocument, version, service, errors); } else { result = ObtainHl7v3Interaction(messageId, version, service, errors); } return(result); }
private List <Relationship> MergeRelationships(MessageDefinitionService service, VersionNumber version, IList <TypeName> typeHierarchy ) { List <Relationship> mergedRelationships = new List <Relationship>(); foreach (TypeName type in typeHierarchy) { MessagePart part = service.GetMessagePart(version, type.Name); if (part != null) { mergedRelationships.AddAll(part.Relationships); } } return(mergedRelationships); }
public Hl7MessageSource(VersionNumber version, XmlDocument document, TimeZoneInfo dateTimeZone, TimeZoneInfo dateTimeTimeZone , MessageDefinitionService service) { this.document = document; this.isR2 = service.IsR2(version); this.isCda = service.IsCda(version); string messageIdFromDocument = GetMessageIdFromDocument(); ICollection <string> templateIdsFromDocument = GetTemplateIdsFromDocument(); this.result = new XmlToModelResult(); this.context = new ConversionContext(service, version, dateTimeZone, dateTimeTimeZone, messageIdFromDocument, templateIdsFromDocument , result); if (this.context.GetInteraction() != null) { this.messagePart = InitMessagePart(); } }
public MessageValidatorImpl(MessageDefinitionService service) { this.messageTransformer = new MessageBeanTransformerImpl(service, RenderMode.PERMISSIVE); }
private Interaction ObtainCdaInteraction(ICollection <string> templateIdsFromDocument, VersionNumber version, MessageDefinitionService service, Hl7Errors errors) { Interaction baseModel = null; Interaction firstInteractionMatch = null; ICollection <string> parentTemplateIds = new HashSet <string>(); IDictionary <string, Interaction> candidateInteractions = new Dictionary <string, Interaction>(); foreach (Interaction matchingInteraction in service.GetAllInteractions(version)) { string templateId = matchingInteraction.TemplateId; if (templateIdsFromDocument.Contains(templateId)) { if (firstInteractionMatch == null) { // first matching interaction will not necessarily be the first templateId in the document firstInteractionMatch = matchingInteraction; } candidateInteractions[templateId] = matchingInteraction; string parentTemplateId = matchingInteraction.ParentTemplateId; if (parentTemplateId != null) { parentTemplateIds.Add(parentTemplateId); } } else { if (templateId == null) { baseModel = matchingInteraction; } } } ICollection <string> keysToRemove = new HashSet <string>(); for (IEnumerator <KeyValuePair <string, Interaction> > iterator = candidateInteractions.GetEnumerator(); iterator.MoveNext() ;) { KeyValuePair <string, Interaction> entry = iterator.Current; if (parentTemplateIds.Contains(entry.Key)) { keysToRemove.Add(entry.Key); } } foreach (string key in keysToRemove) { candidateInteractions.Remove(key); } return(DetermineSuitableInteraction(candidateInteractions, baseModel, firstInteractionMatch, version, errors)); }
private Interaction ObtainHl7v3Interaction(string messageId, VersionNumber version, MessageDefinitionService service, Hl7Errors errors) { Interaction result = service.GetInteraction(version, messageId); if (result == null) { string message = System.String.Format("The interaction {0} for version {1} could not be found (and is possibly not supported). Please ensure an appropriate version code has been provided." , messageId, version); errors.AddHl7Error(new Hl7Error(Hl7ErrorCode.UNSUPPORTED_INTERACTION, message, (string)null)); } return(result); }
public virtual void SetUp() { MockMessageBeanRegistry.Initialize(); CodeResolverRegistry.Register(new TrivialCodeResolver()); this.service = new MockTestCaseMessageDefinitionService(); }
public MessageWalker(MessageDefinitionService service, XmlDocument message, VersionNumber version) { this.service = service; this.message = message; this.version = version; }
public BridgeFactoryImpl(MessageDefinitionService service, VersionNumber version) { this.service = service; this.version = version; }
internal TealBeanRenderWalker(IInteraction tealBean, VersionNumber version, TimeZoneInfo dateTimeZone, TimeZoneInfo dateTimeTimeZone , MessageDefinitionService service) : this(tealBean, version, dateTimeZone, dateTimeTimeZone, new BridgeFactoryImpl(service , version)) { }
public ClinicalDocumentTransformer(MessageDefinitionService service, RenderMode renderMode, TimeZoneInfo dateTimeZone, TimeZoneInfo dateTimeTimeZone, bool performAdditionalCdaValidationWhenUnmarshalling) { this.delegate_ = new MessageBeanTransformerImpl(service, renderMode, dateTimeZone, dateTimeTimeZone, performAdditionalCdaValidationWhenUnmarshalling ); }
public ClinicalDocumentTransformer(MessageDefinitionService service, RenderMode renderMode, TimeZoneInfo dateTimeZone, TimeZoneInfo dateTimeTimeZone) { this.delegate_ = new MessageBeanTransformerImpl(service, renderMode, dateTimeZone, dateTimeTimeZone); }
internal PathBuilder(MessageDefinitionService service, VersionNumber version) { this.service = service; this.version = version; }
public MessageBeanTransformerImpl(MessageDefinitionService service, RenderMode renderMode, TimeZoneInfo dateTimeZone, TimeZoneInfo dateTimeTimeZone) : this(service, renderMode, null, null, true) { }
internal MessagePartHolder(MessageDefinitionService service, VersionNumber version, string superTypeName) : this(service, version, superTypeName, Arrays.AsList(new TypeName(superTypeName))) { }
public MessageBeanTransformerImpl(MessageDefinitionService service, RenderMode renderMode) : this(service, renderMode, null , null) { }
public virtual void SetUp() { MockMessageBeanRegistry.Initialize(); this.service = new MockTestCaseMessageDefinitionService(); this.mockService = new MockMessageDefinitionService(); }