API

Concepts:

  1. List/Search concepts

  2. Lists the published concepts.

    get /api/v1/public/concepts/

    User can search with criteria using a combinations of querystring parameters:

    • ?search=Alcohol
      search by part of concept name (do not put wild characters here)
    • ?collection_ids=20,23
      You can specify collection ids
      (get collections from /api/v1/public/collections/)
    • ?tag_ids=1,3
      You can specify tag ids
      (get tags from /api/v1/public/tags/)
    • ?coding_ids=4
      Specify the coding system of the phenotype
    • ?data_source_ids=1
      Specify the data source of the phenotype
    • ?start_date=2018-01-01&end_date=2022-08-25
      Specify the date range of your query
    • ?show_only_validated_concepts=1
      will show only validated concepts
    • ?brand=HDRUK
      will show only concepts with brand=HDRUK
    • ?author=Kuan
      search by part of the author name
    • ?do_not_show_versions=1
      do not show concepts versions (by default, all concept's version ids are shown)
    (Example: /api/v1/public/concepts/?author=m&brand=adp&tag_collection_ids=11)

  3. List concept by id

  4. Lists a published concepts by id.

    get /api/v1/public/concepts/{id}/
  5. List concept detail

  6. Lists the pubished concept detail of the latest published version.

    get /api/v1/public/concepts/{id}/detail/

    Lists the published concept detail of the specified published version.

    get /api/v1/public/concepts/{id}/version/{version_id}/detail/
  7. Export the code list of a concept

  8. Exports the code list of the latest version of a published concept.

    get /api/v1/public/concepts/{id}/export/codes/

    Exports the code list of a specific version of a published concept.

    get /api/v1/public/concepts/{id}/version/{version_id}/export/codes/
  9. List the versions of a concept

  10. Lists the published versions of the published concept .

    get /api/v1/public/concepts/{id}/get-versions/

Authenticated APIs:

  1. List/Search concepts

  2. Lists all available concepts for the user.

    get /api/v1/concepts/

    User can search with criteria using a combinations of querystring parameters:

    • ?search=Alcohol
      search by part of concept name (do not put wild characters here)
    • ?collection_ids=20,23
      You can specify collection ids
      (get collections from /api/v1/public/collections/)
    • ?tag_ids=1,3
      You can specify tag ids
      (get tags from /api/v1/public/tags/)
    • ?coding_ids=4
      Specify the coding system of the phenotype
    • ?data_source_ids=1
      Specify the data source of the phenotype
    • ?start_date=2018-01-01&end_date=2022-08-25
      Specify the date range of your query
    • ?show_only_my_concepts=1
      Only show concepts owned by me
    • ?show_deleted_concepts=1
      will show also deleted concepts (by default, deleted objects are not shown)
    • ?show_only_validated_concepts=1
      will show only validated concepts
    • ?brand=HDRUK
      will show only concepts with brand=HDRUK
    • ?author=Kuan
      search by part of the author name
    • ?owner_username=a.john
      search by full username of the owner
    • ?do_not_show_versions=1
      do not show concepts versions (by default, all concept's version ids are shown)
    • ?must_have_published_versions=1
      show only concepts which have a published version(by default, all concepts are shown)
    (Example: /api/v1/concepts/?author=m&brand=adp&tag_collection_ids=11)

  3. List concept by id

  4. Lists a concept by id for the user.

    get /api/v1/concepts/{id}/
  5. List concept detail

  6. Lists the concept detail of the latest version.

    get /api/v1/concepts/{id}/detail/

    Lists the concept detail of the specified version.

    get /api/v1/concepts/{id}/version/{version_id}/detail/
  7. Export the code list of a concept

  8. Exports the code list of the latest version of a concept for the user.

    get /api/v1/concepts/{id}/export/codes/

    Exports the code list of a specific version of a concept for the user.

    get /api/v1/concepts/{id}/version/{version_id}/export/codes/
  9. List the versions of a concept

  10. Lists all the versions of the concept for the user.

    get /api/v1/concepts/{id}/get-versions/

Phenotypes:

  1. List/Search phenotypes

  2. Lists the published phenotypes and the data sources associated with each.

    get /api/v1/public/phenotypes/

    User can search with criteria using a combinations of querystring parameters:

    • ?search=Alcohol
      search by part of phenotype name (do not put wild characters here)
    • ?collection_ids=20,23
      You can specify collection ids
      (get collections from /api/v1/public/collections/)
    • ?tag_ids=1,3
      You can specify tag ids
      (get tags from /api/v1/public/tags/)
    • ?selected_phenotype_types=drug,lifestyle risk factor
      Specify types of the phenotypes
      You can get all available types from the reference data page
    • ?coding_ids=4
      Specify the coding system of the phenotype
    • ?data_source_ids=1
      Specify the data source of the phenotype
    • ?start_date=2018-01-01&end_date=2022-08-25
      Specify the date range of your query
    • ?show_only_validated_phenotypes=1
      will show only validated phenotypes
    • ?brand=HDRUK
      will show only phenotypes with brand=HDRUK (this overwrites the site default brand)
    • ?author=Kuan
      search by part of the author name
    • ?do_not_show_versions=1
      do not show phenotypes versions (by default, all phenotype's version ids are shown)
    (Example: /api/v1/public/phenotypes/?author=m&brand=adp&tag_collection_ids=11)

  3. List phenotype by id

  4. Lists a published phenotypes by id and the data sources associated with it.

    get /api/v1/public/phenotypes/{id}/
  5. List phenotype detail

  6. Lists the pubished phenotype detail of the latest published version.

    get /api/v1/public/phenotypes/{id}/detail/

    Lists the published phenotype detail of the specified published version.

    get /api/v1/public/phenotypes/{id}/version/{version_id}/detail/
  7. Export the code list of a phenotype

  8. Exports the code list of the latest version of a published phenotype.

    get /api/v1/public/phenotypes/{id}/export/codes/

    Exports the code list of a specific version of a published phenotype.

    get /api/v1/public/phenotypes/{id}/version/{version_id}/export/codes/
  9. List the versions of a phenotype

  10. Lists the published versions of the published phenotype .

    get /api/v1/public/phenotypes/{id}/get-versions/

Authenticated APIs:

  1. List/Search phenotypes

  2. Lists all available phenotypes for the user and the data sources associated with each.

    get /api/v1/phenotypes/

    User can search with criteria using a combinations of querystring parameters:

    • ?search=Alcohol
      search by part of phenotype name (do not put wild characters here)
    • ?collection_ids=20,23
      You can specify collection ids
      (get collections from /api/v1/public/collections/)
    • ?tag_ids=1,3
      You can specify tag ids
      (get tags from /api/v1/public/tags/)
    • ?coding_ids=4
      Specify the coding system of the phenotype
    • ?data_source_ids=1
      Specify the data source of the phenotype
    • ?start_date=2018-01-01&end_date=2022-08-25
      Specify the date range of your query
    • ?selected_phenotype_types=drug,lifestyle risk factor
      Specify types of the phenotypes
      You can get all available types from the reference data page
    • ?show_only_my_phenotypes=1
      Only show phenotypes owned by me
    • ?show_deleted_phenotypes=1
      will show also deleted phenotypes (by default, deleted objects are not shown)
    • ?show_only_validated_phenotypes=1
      will show only validated phenotypes
    • ?brand=HDRUK
      will show only phenotypes with brand=HDRUK (this overwrites the site default brand)
    • ?author=Kuan
      search by part of the author name
    • ?owner_username=a.john
      search by full username of the owner
    • ?do_not_show_versions=1
      do not show phenotypes versions (by default, all phenotype's version ids are shown)
    • ?must_have_published_versions=1
      show only phenotypes which have a published version(by default, all phenotypes are shown)
    (Example: /api/v1/phenotypes/?author=m&brand=adp&tag_collection_ids=11)

  3. List phenotype by id

  4. Lists a phenotype by id for the user and the data sources associated with it.

    get /api/v1/phenotypes/{id}/
  5. List phenotype detail

  6. Lists the phenotype detail of the latest version.

    get /api/v1/phenotypes/{id}/detail/

    Lists the phenotype detail of the specified version.

    get /api/v1/phenotypes/{id}/version/{version_id}/detail/
  7. Export the code list of a phenotype

  8. Exports the code list of the latest version of a phenotype for the user.

    get /api/v1/phenotypes/{id}/export/codes/

    Exports the code list of a specific version of a phenotype for the user.

    get /api/v1/phenotypes/{id}/version/{version_id}/export/codes/
  9. List the versions of a phenotype

  10. Lists all the versions of the phenotype for the user.

    get /api/v1/phenotypes/{id}/get-versions/

Data Sources:

  1. List data sources

  2. Lists all data sources available. User can search by part of the data source name (e.g. ?search=hospital)

    get /api/v1/public/data-sources-list/

    Lists a data source by id.

    get /api/v1/public/data-sources-list/{id}
  3. List data sources (with published phenotypes)

  4. Only the published associated phenotypes wil be shown.

    Lists all data sources and the published phenotypes associated with each. User can search by part of the data source name (e.g. ?search=hospital)

    get /api/v1/public/data-sources/

    Lists a data source by id and the associated published phenotypes.

    get /api/v1/public/data-sources/{id}

Authenticated APIs:

  1. List data sources

  2. Lists all data sources and the phenotypes associated with each. User can search by part of the data source name (e.g. ?search=hospital)

    get /api/v1/data-sources/

    Lists a data source by id and the associated phenotypes.

    get /api/v1/data-sources/{id}

coding systems:

  1. List coding systems

  2. Lists all coding systems available. User can search by part of the coding system name (e.g. ?search=read)

    get /api/v1/public/coding-systems/

    Lists a coding system by id.

    get /api/v1/public/coding-systems/{id}

Tags:

  1. List tags

  2. Lists all available tags.

    get /api/v1/public/tags/

    User can search with part of the tag name using querystring parameter:

    • ?search=TECC
      search by part of tag name (do not put wild characters here)
    (Example: /api/v1/public/tags/?search=breathe)

    Lists tag by id.

    get /api/v1/public/tags/{id}

Collections:

  1. List collections

  2. Lists all available collections.

    get /api/v1/public/collections/

    User can search with part of the collection name using querystring parameter:

    • ?search=breathe
      search by part of collection name (do not put wild characters here)
    (Example: /api/v1/public/collections/?search=breathe)

    Lists collection by id.

    get /api/v1/public/collections/{id}