Пример #1
0
        internal MeasureMap(StructureMessage message)
        {
            Map(o => TempConceptRef.Create(o.Concept)).ToAttributeGroup("conceptRef")
            .Set(v => _measure = Create(message.GetConcept(v.ID, v.AgencyID, v.Version)))
            .GroupTypeMap(new TempConceptRefMap());

            Map(o => TempCodelistRef.Create(o.CodeList)).ToAttributeGroup("codelist")
            .Set(v => _measure.CodeList = message.GetCodeList(v.ID, v.AgencyID, v.Version))
            .GroupTypeMap(new TempCodelistRefMap());

            Map(o => o.TextFormat).ToElement("TextFormat", false)
            .Set(v => _measure.TextFormat = v)
            .ClassMap(() => new TextFormatMap());
        }
Пример #2
0
        public CompoenentMap(StructureMessage message)
        {
            Map(o => TempConceptRef.Create(o.Concept)).ToAttributeGroup("conceptRef")
            .Set(v => _component = Create(message.GetConcept(v.ID, v.AgencyID, v.Version)))
            .GroupTypeMap(new TempConceptRefMap());

            Map(o => TempCodelistRef.Create(o.CodeList)).ToAttributeGroup("codelist")
            .Set(v => _component.CodeList = message.GetCodeList(v.ID, v.AgencyID, v.Version))
            .GroupTypeMap(new TempCodelistRefMap());

            Map(o => o.CrossSectionalAttachmentLevel).ToAttributeGroup("crossSectionalAttachmentLevel", CrossSectionalAttachmentLevel.None)
            .Set(v => _component.CrossSectionalAttachmentLevel = v)
            .GroupTypeMap(new CrossSectionalAttachmentLevelMap());

            Map(o => o.TextFormat).ToElement("TextFormat", false)
            .Set(v => _component.TextFormat = v)
            .ClassMap(() => new TextFormatMap());
        }
Пример #3
0
        Concept GetConcept(StructureMessage message, ConceptRef v)
        {
            var concept = message.GetConcept(v.SchemeRef.Id, v.SchemeRef.AgencyId, v.SchemeRef.Version, v.Id, v.AgencyId, v.Version);

            if (concept == null || concept.Count() == 0)
            {
                SignalError("Concept not found: conceptSchemeId='{0}',conceptSchemeAgencyId='{1}',conceptSchemeVersion='{2}, conceptId='{3}',concpetAgencyId='{4}',conceptVersion='{5}'. Concepts thar are referenced by a key family must exist in the same file of the key family.",
                            v.SchemeRef.Id, v.SchemeRef.AgencyId, v.SchemeRef.Version, v.Id, v.AgencyId, v.Version);
                return(null);
            }

            if (concept.Count() > 1)
            {
                SignalError("Duplicate Concepts found: conceptSchemeId='{0}',conceptSchemeAgencyId='{1}',conceptSchemeVersion='{2}, conceptId='{3}',concpetAgencyId='{4}',conceptVersion='{5}'. Concepts thar are referenced by a key family must exist in the same file of the key family.",
                            v.SchemeRef.Id, v.SchemeRef.AgencyId, v.SchemeRef.Version, v.Id, v.AgencyId, v.Version);
                return(concept.First());
            }

            return(concept.Single());
        }