Hur hämtar man utbildningsnivåer som motsvarar gamla Taxonomy?

Vi behöver hämta ut utbildningsnivåer som motsvarar den gamla Taxonomy. Hur gör man det? LegacyId motsvarar inte den gamla om man hämtar listan med följande parametrar specific/concepts/sun-education-level?include-legacy-information=true&type=sun-education-level-1&version=1
Gamla listan hämtas med http://wstaxonomiservice.ams.se/TaxonomiService.asmx metoden GetAllOccupationLevels

Hej Vladimir! Tack för frågan - vi kollar upp och återkommer.

Hej! För mig ser legacy-id:na ut att stämma. Om jag tar Förskola som exempel:

I gamla webservicen:

   **<SUNLevel3ID>2</SUNLevel3ID>**
   <SUNLevel3Code>001</SUNLevel3Code>
   <Term>Förskola</Term>
   <SUNLevel2ID>1</SUNLevel2ID>

I nya databasen:

"taxonomy/type": "sun-education-level-3",
"taxonomy/definition": "Förskola",
"taxonomy/id": "HBVy_FJQ_kv9",
"taxonomy/sun-education-level-code-2000": "001",
"taxonomy/preferred-label": "Förskola",
"taxonomy/deprecated": true,
**"taxonomy/deprecated-legacy-id": "2",**
"taxonomy/relations": {
  "taxonomy/broader": 1,
  "taxonomy/narrower": 0,
  "taxonomy/related": 0,
  "taxonomy/substitutability-to": 0,
  "taxonomy/substitutability-from": 0
}

Men jag använder: https://taxonomy.api.jobtechdev.se/v1/taxonomy/specific/concepts/sun-education-level?include-legacy-information=true&deprecated=true

Sätter jag bara include legacy information utan att sätta deprecated=true får jag dock inte med legacy-id.

Hej! Vi kollar närmare på det där med att man måste sätta deprecated=true för att informationen ska dyka upp. Här är ticketen: https://gitlab.com/team-batfish/jobtech-taxonomy-api/-/issues/162

David du hämtade level-2 kod

Här är svaren jag får från både Gamla(SOAP) och Nya(REST) tjänster:

5 Eftergymnasial utbildning kortare än två år 3 Eftergymnasial utbildning två år eller längre 4 Forskarutbildning 1 Förgymnasial utbildning 9 (10 år) Grundskola eller motsvarande. 10 Förgymnasial utbildning kortare än 9 år 2 Gymnasial utbildning 9 Saknar formell grundläggande utbildning Saknar formell grundläggande utbildning

[
{
“taxonomy/id”: “4HfD_y1M_8Pw”,
“taxonomy/type”: “sun-education-level-1”,
“taxonomy/definition”: “Saknar formell, grundläggande utbildning”,
“taxonomy/preferred-label”: “Saknar formell, grundläggande utbildning”,
“taxonomy/sun-education-level-code-2000”: “0”,
“taxonomy/deprecated-legacy-id”: “1”,
“taxonomy/relations”: {
“taxonomy/broader”: 0,
“taxonomy/narrower”: 1,
“taxonomy/related”: 1,
“taxonomy/substitutability-to”: 0,
“taxonomy/substitutability-from”: 0
}
},
{
“taxonomy/id”: “3Bof_mmm_XRk”,
“taxonomy/type”: “sun-education-level-1”,
“taxonomy/definition”: “Eftergymnasial utbildning kortare än två år”,
“taxonomy/preferred-label”: “Eftergymnasial utbildning kortare än två år”,
“taxonomy/sun-education-level-code-2000”: “4”,
“taxonomy/deprecated-legacy-id”: “5”,
“taxonomy/relations”: {
“taxonomy/broader”: 0,
“taxonomy/narrower”: 1,
“taxonomy/related”: 113,
“taxonomy/substitutability-to”: 0,
“taxonomy/substitutability-from”: 0
}
},
{
“taxonomy/id”: “asZm_TEQ_Srk”,
“taxonomy/type”: “sun-education-level-1”,
“taxonomy/definition”: “Eftergymnasial utbildning två år eller längre”,
“taxonomy/preferred-label”: “Eftergymnasial utbildning två år eller längre”,
“taxonomy/sun-education-level-code-2000”: “5”,
“taxonomy/deprecated-legacy-id”: “6”,
“taxonomy/relations”: {
“taxonomy/broader”: 0,
“taxonomy/narrower”: 4,
“taxonomy/related”: 113,
“taxonomy/substitutability-to”: 0,
“taxonomy/substitutability-from”: 0
}
},
{
“taxonomy/id”: “hxDt_SD3_1qX”,
“taxonomy/type”: “sun-education-level-1”,
“taxonomy/definition”: “Förgymnasial utbildning kortare än 9 år”,
“taxonomy/preferred-label”: “Förgymnasial utbildning kortare än 9 år”,
“taxonomy/sun-education-level-code-2000”: “1”,
“taxonomy/deprecated-legacy-id”: “2”,
“taxonomy/relations”: {
“taxonomy/broader”: 0,
“taxonomy/narrower”: 1,
“taxonomy/related”: 2,
“taxonomy/substitutability-to”: 0,
“taxonomy/substitutability-from”: 0
}
},
{
“taxonomy/id”: “DeBt_ahh_bkx”,
“taxonomy/type”: “sun-education-level-1”,
“taxonomy/definition”: “Gymnasial utbildning”,
“taxonomy/preferred-label”: “Gymnasial utbildning”,
“taxonomy/sun-education-level-code-2000”: “3”,
“taxonomy/deprecated-legacy-id”: “4”,
“taxonomy/relations”: {
“taxonomy/broader”: 0,
“taxonomy/narrower”: 3,
“taxonomy/related”: 89,
“taxonomy/substitutability-to”: 0,
“taxonomy/substitutability-from”: 0
}
},
{
“taxonomy/id”: “SdS6_SLL_mRJ”,
“taxonomy/type”: “sun-education-level-1”,
“taxonomy/definition”: “Forskarutbildning”,
“taxonomy/preferred-label”: “Forskarutbildning”,
“taxonomy/sun-education-level-code-2000”: “6”,
“taxonomy/deprecated-legacy-id”: “7”,
“taxonomy/relations”: {
“taxonomy/broader”: 0,
“taxonomy/narrower”: 3,
“taxonomy/related”: 113,
“taxonomy/substitutability-to”: 0,
“taxonomy/substitutability-from”: 0
}
},
{
“taxonomy/id”: “NcLy_JUs_APX”,
“taxonomy/type”: “sun-education-level-1”,
“taxonomy/definition”: “Förgymnasial utbildning 9 (10) år”,
“taxonomy/preferred-label”: “Förgymnasial utbildning 9 (10) år”,
“taxonomy/sun-education-level-code-2000”: “2”,
“taxonomy/deprecated-legacy-id”: “3”,
“taxonomy/relations”: {
“taxonomy/broader”: 0,
“taxonomy/narrower”: 1,
“taxonomy/related”: 2,
“taxonomy/substitutability-to”: 0,
“taxonomy/substitutability-from”: 0
}
}
]

5 Eftergymnasial utbildning kortare än två år 3 Eftergymnasial utbildning två år eller längre 4 Forskarutbildning 1 Förgymnasial utbildning 9 (10 år) Grundskola eller motsvarande. 10 Förgymnasial utbildning kortare än 9 år 2 Gymnasial utbildning 9 Saknar formell grundläggande utbildning Saknar formell grundläggande utbildning

Hmm, det här ser jag när jag kollar på SOAP-tjänsten:

  <GetAllSUNLevel1Response xmlns="urn:ams.se:Taxonomy">
     <GetAllSUNLevel1Result>
        <SUNLevel1>
           <SUNLevel1ID>1</SUNLevel1ID>
           <SUNLevel1Code>0</SUNLevel1Code>
           <Term>Saknar formell, grundläggande utbildning</Term>
        </SUNLevel1>
        <SUNLevel1>
           <SUNLevel1ID>2</SUNLevel1ID>
           <SUNLevel1Code>1</SUNLevel1Code>
           <Term>Förgymnasial utbildning kortare än 9 år</Term>
        </SUNLevel1>
        <SUNLevel1>
           <SUNLevel1ID>3</SUNLevel1ID>
           <SUNLevel1Code>2</SUNLevel1Code>
           <Term>Förgymnasial utbildning 9 (10) år</Term>
        </SUNLevel1>
        <SUNLevel1>
           <SUNLevel1ID>4</SUNLevel1ID>
           <SUNLevel1Code>3</SUNLevel1Code>
           <Term>Gymnasial utbildning</Term>
        </SUNLevel1>
        <SUNLevel1>
           <SUNLevel1ID>5</SUNLevel1ID>
           <SUNLevel1Code>4</SUNLevel1Code>
           <Term>Eftergymnasial utbildning kortare än två år</Term>
        </SUNLevel1>
        <SUNLevel1>
           <SUNLevel1ID>6</SUNLevel1ID>
           <SUNLevel1Code>5</SUNLevel1Code>
           <Term>Eftergymnasial utbildning två år eller längre</Term>
        </SUNLevel1>
        <SUNLevel1>
           <SUNLevel1ID>7</SUNLevel1ID>
           <SUNLevel1Code>6</SUNLevel1Code>
           <Term>Forskarutbildning</Term>
        </SUNLevel1>
     </GetAllSUNLevel1Result>
  </GetAllSUNLevel1Response>

Går vi mot samma tjänst? http://wstaxonomiservice.ams.se/TaxonomiService.asmx

Gamla SOAP, menar du då http://wstaxonomiservice.ams.se/TaxonomiService.asmx ?

Ah, skrev innan jag såg att du postad din URL till gamla Soap. Om jag kör mot http://wstaxonomiservice.ams.se/TaxonomiService.asmx så får jag nedanstående svar. Det svaret matchar från nya taxonomin som du klistrade in ovan.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetAllSUNLevel1Response xmlns="urn:ams.se:Taxonomy">
         <GetAllSUNLevel1Result>
            <SUNLevel1>
               <SUNLevel1ID>1</SUNLevel1ID>
               <SUNLevel1Code>0</SUNLevel1Code>
               <Term>Saknar formell, grundläggande utbildning</Term>
            </SUNLevel1>
            <SUNLevel1>
               <SUNLevel1ID>2</SUNLevel1ID>
               <SUNLevel1Code>1</SUNLevel1Code>
               <Term>Förgymnasial utbildning kortare än 9 år</Term>
            </SUNLevel1>
            <SUNLevel1>
               <SUNLevel1ID>3</SUNLevel1ID>
               <SUNLevel1Code>2</SUNLevel1Code>
               <Term>Förgymnasial utbildning 9 (10) år</Term>
            </SUNLevel1>
            <SUNLevel1>
               <SUNLevel1ID>4</SUNLevel1ID>
               <SUNLevel1Code>3</SUNLevel1Code>
               <Term>Gymnasial utbildning</Term>
            </SUNLevel1>
            <SUNLevel1>
               <SUNLevel1ID>5</SUNLevel1ID>
               <SUNLevel1Code>4</SUNLevel1Code>
               <Term>Eftergymnasial utbildning kortare än två år</Term>
            </SUNLevel1>
            <SUNLevel1>
               <SUNLevel1ID>6</SUNLevel1ID>
               <SUNLevel1Code>5</SUNLevel1Code>
               <Term>Eftergymnasial utbildning två år eller längre</Term>
            </SUNLevel1>
            <SUNLevel1>
               <SUNLevel1ID>7</SUNLevel1ID>
               <SUNLevel1Code>6</SUNLevel1Code>
               <Term>Forskarutbildning</Term>
            </SUNLevel1>
         </GetAllSUNLevel1Result>
      </GetAllSUNLevel1Response>
   </soap:Body>
</soap:Envelope>

Vi pratar om metoden getAllEducationLevels i den gamla Taxonomi. Det är den team Annonsera använt hittills.
Vad gäller utbildningsinriktningar så använde man GetAllEducationFields

Hm, skumt - jag ser inte GetAllOccupationLevels. När jag laddar in http://wstaxonomiservice.ams.se/TaxonomiService.asmx i SoapUI så får jag bara upp dessa tre endpoints som börjar på GetAllOccupation*. Använder vi verkligen samma endpoint?

Skärmklipp

Förlåt, jag skrev fel getAllEducationLevels :slight_smile:

Aha. Intressant, det finns alltså två olika värdeförråd för samma sak, men med olika idn. Det är lite olyckligt.

Det är SUNLevel1 som migrerats, varför legacy-idna pekar mot de som finns där. Det är även på SUNLevel1 som det anpassade “guide-trädet” mellan nivå och inriktning har byggts (som bland andra Inskrivningen använder). Den ska därför vara bättre att gå mot.

Hur låter detta för eran del, blir det problem?

Det verkar som att GetAllEducationLevels innehåller felaktig data i gamla taxonomin - den returnerar inte samma koder som GetAllSUNLevel1. Intressant upptäckt! Jag tror David håller på att skriva ihop ett mailutskick för att informera om detta.

OK, vi ska försöka lösa det på våran sida tills vi gått över helt till den nya tjänsten

Perfekt. Bra att detta upptäcktes.

Här kommer ett sammanställt svar på frågeställningen, baserat på diskussionen i denna tråd:

Angående Taxonomy och GetAllEducationLevels och SUNLevel1i gamla SOAP-tjänsten har det upptäckts att det i gamla Taxonomy finns två olika källor för SUN nivå 1:

  • SUNLevel1
  • GetAllEducationLevels

Endpointsen innehåller samma värden men olika IDn. Det är oklart varför det blivit så. Det värdeförråd som migrerats till version 1 i nya Taxonomy-databasen är SUNLevel1 med tillhörande legacy-idn. Det är också SUNLevel1 som strukturen mellan Level och Field (som bland andra Inskrivningen använder sig av) baserar sig på. Det är SUNLevel1 som man bör förhålla sig till som legacyvärden.

Såhär ser de två ut. Observera att IDna skiljer sig åt, plus att GetAllEducationLevels inte inkluderar någon SUN-kod.

GetAllEducationLevels

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Body>

  <GetAllEducationLevelsResponse xmlns="urn:ams.se:Taxonomy">

     <GetAllEducationLevelsResult>

        <EducationLevel>

           <EducationLevelID>5</EducationLevelID>

           <Term>Eftergymnasial utbildning kortare än två år</Term>

           <Description/>

        </EducationLevel>

        <EducationLevel>

           <EducationLevelID>3</EducationLevelID>

           <Term>Eftergymnasial utbildning två år eller längre</Term>

           <Description/>

        </EducationLevel>

        <EducationLevel>

           <EducationLevelID>4</EducationLevelID>

           <Term>Forskarutbildning</Term>

           <Description/>

        </EducationLevel>

        <EducationLevel>

           <EducationLevelID>1</EducationLevelID>

           <Term>Förgymnasial utbildning 9 (10 år)</Term>

           <Description>Grundskola eller motsvarande.</Description>

        </EducationLevel>

        <EducationLevel>

           <EducationLevelID>10</EducationLevelID>

           <Term>Förgymnasial utbildning kortare än 9 år</Term>

           <Description/>

        </EducationLevel>

        <EducationLevel>

           <EducationLevelID>2</EducationLevelID>

           <Term>Gymnasial utbildning</Term>

           <Description/>

        </EducationLevel>

        <EducationLevel>

           <EducationLevelID>9</EducationLevelID>

           <Term>Saknar formell grundläggande utbildning</Term>

           <Description>Saknar formell grundläggande utbildning</Description>

        </EducationLevel>

     </GetAllEducationLevelsResult>

  </GetAllEducationLevelsResponse>

   </soap:Body>

</soap:Envelope>

SunLevel1

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Body>

  <GetAllSUNLevel1Response xmlns="urn:ams.se:Taxonomy">

     <GetAllSUNLevel1Result>

        <SUNLevel1>

           <SUNLevel1ID>1</SUNLevel1ID>

           <SUNLevel1Code>0</SUNLevel1Code>

           <Term>Saknar formell, grundläggande utbildning</Term>

        </SUNLevel1>

        <SUNLevel1>

           <SUNLevel1ID>2</SUNLevel1ID>

           <SUNLevel1Code>1</SUNLevel1Code>

           <Term>Förgymnasial utbildning kortare än 9 år</Term>

        </SUNLevel1>

        <SUNLevel1>

           <SUNLevel1ID>3</SUNLevel1ID>

           <SUNLevel1Code>2</SUNLevel1Code>

           <Term>Förgymnasial utbildning 9 (10) år</Term>

        </SUNLevel1>

        <SUNLevel1>

           <SUNLevel1ID>4</SUNLevel1ID>

           <SUNLevel1Code>3</SUNLevel1Code>

           <Term>Gymnasial utbildning</Term>

        </SUNLevel1>

        <SUNLevel1>

           <SUNLevel1ID>5</SUNLevel1ID>

           <SUNLevel1Code>4</SUNLevel1Code>

           <Term>Eftergymnasial utbildning kortare än två år</Term>

        </SUNLevel1>

        <SUNLevel1>

           <SUNLevel1ID>6</SUNLevel1ID>

           <SUNLevel1Code>5</SUNLevel1Code>

           <Term>Eftergymnasial utbildning två år eller längre</Term>

        </SUNLevel1>

        <SUNLevel1>

           <SUNLevel1ID>7</SUNLevel1ID>

           <SUNLevel1Code>6</SUNLevel1Code>

           <Term>Forskarutbildning</Term>

        </SUNLevel1>

     </GetAllSUNLevel1Result>

  </GetAllSUNLevel1Response>

   </soap:Body>

</soap:Envelope>

Observera att det även finns två endpoints för SUN-field, SunField2 och GetAllEducationFields. Det är SunField2 som migrerats. Dock motsvarar EducationFieldID i GetAllEducationFields SUN-koden för objektet (SunField2Code).

SunField2

        </SUNField2>
        <SUNField2>
           <SUNField2ID>6</SUNField2ID>
           <SUNField2Code>22</SUNField2Code>
           <Term>Humaniora</Term>
           <SUNField1ID>3</SUNField1ID>
        </SUNField2>
        <SUNField2>

GetAllEducationFields

      <EducationField>
           <EducationFieldID>22</EducationFieldID>
           <Term>Humaniora</Term>
           <Description>Utbildningar inriktade mot humaniora, religion, främmande språk, tolkning och översättning, lingvistik, svenska och litteraturvetenskap, historia och arkeologi samt filosofi och etik.</Description>
        </EducationField>
        <EducationField>