Пример #1
0
        private void FillValues(string version, string sctid)
        {
            this.conceptMap = new ConceptMap();

            this.conceptMap.Id  = "SCT_NZREAD";
            this.conceptMap.Url = ServerCapability.TERMINZ_CANONICAL + "/ConceptMap/Sct_NzRead";
            //this.conceptMap.Identifier = new Identifier { System = "urn:ietf:rfc:3986", Value = "urn:uuid:53cd62ee-033e-414c-9f58-3ca97b5ffc3b" };

            this.conceptMap.Name  = this.conceptMap.Id;
            this.conceptMap.Title = "SNOMED CT to NZ Read Codes";

            string caveat = string.Empty;

            if (string.IsNullOrEmpty(sctid))
            {
                caveat = " Definition only - complete map too large to download (over 100k elements).";
            }

            this.conceptMap.Description  = new Markdown("A mapping between SNOMED CT and the NZ Read Codes, published by NHS Digital and augmented for use in NZ." + caveat);
            this.conceptMap.Version      = "20190501";
            this.conceptMap.Status       = PublicationStatus.Draft;
            this.conceptMap.Experimental = true;
            this.conceptMap.Publisher    = "Ministry of Health";
            this.conceptMap.Date         = new FhirDateTime(2019, 05, 01).Value;
            this.conceptMap.Purpose      = new Markdown("Used by the NZ Ministry of Social Development to help process SNOMED - coded work capacity medical certificates.");
            this.conceptMap.Copyright    = new Markdown("© 2010+ New Zealand Crown Copyright");

            ContactPoint cp = new ContactPoint {
                System = ContactPoint.ContactPointSystem.Email, Value = "*****@*****.**"
            };
            ContactDetail cd = new ContactDetail();

            cd.Telecom.Add(cp);
            cd.Name = "Patients First Ltd";
            this.conceptMap.Contact.Add(cd);

            string sourceCodeSystemUri = FhirSnomed.URI;
            string sourceValueSetUri   = @"http://snomed.info/sct?fhir_vs";

            string targetCodeSystemUri = @"http://health.govt.nz/read-codes";
            string targetValueSetUri   = @"http://health.govt.nz/read-codes/fhir_vs";

            this.conceptMap.Source = new FhirUri(sourceValueSetUri);
            this.conceptMap.Target = new FhirUri(targetValueSetUri);

            if ((string.IsNullOrEmpty(version) || version == this.conceptMap.Version) && !string.IsNullOrEmpty(sctid))
            {
                List <Coding> map = SnomedCtSearch.GetConceptMap_NZ(REFSET_ID, sctid);

                ConceptMap.GroupComponent gc = new ConceptMap.GroupComponent();
                gc.Source = sourceCodeSystemUri;
                gc.Target = targetCodeSystemUri;

                foreach (Coding mv in map)
                {
                    ConceptMap.ConceptMapEquivalence  cme = ConceptMap.ConceptMapEquivalence.Equivalent;
                    ConceptMap.SourceElementComponent sec = new ConceptMap.SourceElementComponent {
                        Code = mv.Version, Display = mv.System
                    };
                    ConceptMap.TargetElementComponent tec = new ConceptMap.TargetElementComponent {
                        Code = mv.Code, Equivalence = cme, Display = mv.Display
                    };

                    sec.Target.Add(tec);
                    gc.Element.Add(sec);
                }

                this.conceptMap.Group.Add(gc);
            }
        }
Пример #2
0
        private void FillValues(string version, string nzmpCode)
        {
            this.conceptMap = new ConceptMap();

            this.conceptMap.Id  = "NZMP_SCT";
            this.conceptMap.Url = ServerCapability.TERMINZ_CANONICAL + "/ConceptMap/NzMp_Sct";

            this.conceptMap.Name         = this.conceptMap.Id;
            this.conceptMap.Title        = "NZMT medicinal product to SNOMED CT map";
            this.conceptMap.Description  = new Markdown("A mapping between NZMT Medicinal Products and SNOMED CT, published by NZMT in May 2018.");
            this.conceptMap.Version      = "20180501";
            this.conceptMap.Status       = PublicationStatus.Draft;
            this.conceptMap.Experimental = true;
            this.conceptMap.Publisher    = "Ministry of Health";
            this.conceptMap.Date         = new FhirDateTime(2018, 05, 1).Value;
            this.conceptMap.Purpose      = new Markdown("To begin alignment between NZMT and SNOMED CT");
            this.conceptMap.Copyright    = new Markdown("© 2018+ New Zealand Crown Copyright");

            ContactPoint cp = new ContactPoint {
                System = ContactPoint.ContactPointSystem.Email, Value = "*****@*****.**"
            };
            ContactDetail cd = new ContactDetail();

            cd.Telecom.Add(cp);
            cd.Name = "Patients First Ltd";
            this.conceptMap.Contact.Add(cd);

            string sourceCodeSystemUri = NzMt.URI;
            string sourceValueSetUri   = @"http://itp.patientsfirst.org.nz/ValueSet/NzulmMp";

            string targetCodeSystemUri = FhirSnomed.URI;
            string targetValueSetUri   = @"http://snomed.info/sct?fhir_vs";

            this.conceptMap.Source = new FhirUri(sourceValueSetUri);
            this.conceptMap.Target = new FhirUri(targetValueSetUri);

            if ((string.IsNullOrEmpty(version) || version == this.conceptMap.Version))
            {
                List <Coding> map = SnomedCtSearch.GetConceptMap_NZ(REFSET_ID, nzmpCode);

                ConceptMap.GroupComponent gc = new ConceptMap.GroupComponent();
                gc.Source = sourceCodeSystemUri;
                gc.Target = targetCodeSystemUri;

                foreach (Coding mv in map)
                {
                    ConceptMap.ConceptMapEquivalence  cme = ConceptMap.ConceptMapEquivalence.Equivalent;
                    ConceptMap.SourceElementComponent sec = new ConceptMap.SourceElementComponent {
                        Code = mv.Version, Display = mv.System
                    };
                    ConceptMap.TargetElementComponent tec = new ConceptMap.TargetElementComponent {
                        Code = mv.Code, Equivalence = cme, Display = mv.Display
                    };

                    sec.Target.Add(tec);
                    gc.Element.Add(sec);
                }

                this.conceptMap.Group.Add(gc);
            }
        }
Пример #3
0
        private void FillValues(string version, string readcode)
        {
            this.conceptMap = new ConceptMap();

            this.conceptMap.Id  = "NZREAD_SCT";
            this.conceptMap.Url = ServerCapability.TERMINZ_CANONICAL + "/ConceptMap/NzRead_Sct";
            //this.conceptMap.Identifier = new Identifier { System = "urn:ietf:rfc:3986", Value = "urn:uuid:53cd62ee-033e-414c-9f58-3ca97b5ffc3b" };

            this.conceptMap.Name  = this.conceptMap.Id;
            this.conceptMap.Title = "NZ Read Codes to SNOMED CT";

            string caveat = string.Empty;

            if (string.IsNullOrEmpty(readcode))
            {
                caveat = " Definition only - complete map too large to download (over 100k elements).";
            }

            this.conceptMap.Description  = new Markdown("A mapping between the NZ Read Codes and SNOMED CT, published by NHS Digital and augmented for use in NZ." + caveat);
            this.conceptMap.Version      = "20190501";
            this.conceptMap.Status       = PublicationStatus.Draft;
            this.conceptMap.Experimental = true;
            this.conceptMap.Publisher    = "Ministry of Health";
            this.conceptMap.Date         = new FhirDateTime(2019, 05, 01).Value;
            this.conceptMap.Purpose      = new Markdown("To help primary care facilities translate legacy Read Codes");
            this.conceptMap.Copyright    = new Markdown("© 2010+ New Zealand Crown Copyright");

            ContactPoint cp = new ContactPoint {
                System = ContactPoint.ContactPointSystem.Email, Value = "*****@*****.**"
            };
            ContactDetail cd = new ContactDetail();

            cd.Telecom.Add(cp);
            cd.Name = "Patients First Ltd";
            this.conceptMap.Contact.Add(cd);

            string sourceCodeSystemUri = @"http://health.govt.nz/read-codes";
            string sourceValueSetUri   = @"http://health.govt.nz/read-codes/fhir_vs";

            string targetCodeSystemUri = FhirSnomed.URI;
            string targetValueSetUri   = @"http://snomed.info/sct?fhir_vs";

            this.conceptMap.Source = new FhirUri(sourceValueSetUri);
            this.conceptMap.Target = new FhirUri(targetValueSetUri);

            if ((string.IsNullOrEmpty(version) || version == this.conceptMap.Version) && !string.IsNullOrEmpty(readcode))
            {
                // add any missing periods to end of code and default Term ID of '00'
                //readcode = readcode.PadRight(5, '.');
                //readcode = readcode + (readcode.Length == 5 ? "00" : "");

                List <Coding> map = SnomedCtSearch.GetConceptMap_NZ(REFSET_ID, readcode);

                ConceptMap.GroupComponent gc = new ConceptMap.GroupComponent();
                gc.Source = sourceCodeSystemUri;
                gc.Target = targetCodeSystemUri;

                foreach (Coding mv in map)
                {
                    ConceptMap.ConceptMapEquivalence  cme = ConceptMap.ConceptMapEquivalence.Equivalent;
                    ConceptMap.SourceElementComponent sec = new ConceptMap.SourceElementComponent {
                        Code = mv.Version, Display = mv.System
                    };
                    ConceptMap.TargetElementComponent tec = new ConceptMap.TargetElementComponent {
                        Code = mv.Code, Equivalence = cme, Display = mv.Display
                    };

                    sec.Target.Add(tec);
                    gc.Element.Add(sec);
                }

                this.conceptMap.Group.Add(gc);
            }
        }