Overview

JAMES is a web service for creating and interpreting charts of child growth and development. The current version

  1. provides access to high-quality growth charts used by the Dutch youth health care;
  2. interchanges data coded according to the Basisdataset JGZ 4.0.1;
  3. screens for abnormal height, weight and head circumference;
  4. converts developmental data into the D-score;
  5. predicts future growth and development.

JAMES is a RESTful API that runs on a remote host. The following sections illustrate how a client can make requests to JAMES using various client languages. In principle, any HTTP client will work with JAMES. The document highlights some applications of the service and provides pointers to relevant background information.

The service aids in monitoring and evaluating childhood growth. JAMES is created and maintained by the Netherlands Organisation for Applied Scientific Research TNO. Please contact Stef van Buuren <stef.vanbuuren at tno.nl> for further information.

Primary JAMES user functionality

Verb API end point Description Maps to james function
POST /data/upload/{dfm} Upload child data upload_data()
POST /charts/draw/{ffm} Draw child data on growth chart draw_chart()
POST /charts/list/{dfm} List available growth charts list_charts()
POST /charts/validate/{dfm} Validate a chart code validate_chartcode()
POST /screeners/list/{dfm} List available growth screeners list_screeners()
POST /screeners/apply/{dfm} Apply growth screeners to child data apply_screeners()
GET /site Request empty site request_site()
POST /site/request/{dfm} Request personalised site request_site()
POST /blend/request/{sfm} Obtain a blend from multiple end points request_blend()
POST /version/{dfm} Obtain version information version()
GET /{session}/{info} Extract session details
GET /{2}/{1}/man Consult R help help({1}_{2})

The table lists the defined API end points and the mapping to each end point to the corresponding R function.

The current OpenAPI definition of JAMES is at https://app.swaggerhub.com/apis/stefvanbuuren/james/1.5.4. Note that this definition may evolve over time.

Output formats

JAMES is built on top of the OpenCPU API, a powerful and flexible way for online deployment of R functionality. Although it is possible to use JAMES without knowledge of OpenCPU, it is useful to browse the OpenCPU features.

OpenCPU offers multiple output formats out of the box. JAMES supports a subset of these through the /{session}/{info} end point. Here session is a special session code generated by OpenCPU that identifies the server location containing the results of a request. The output format info is one of the following:

{info} Description
json Function result as JSON
print Function result as formatted as print
csv Function result as comma-separated format
tab Function result as tab-delimited format
md Function result as markdown format
svglite Function result as SVG graph
warnings Warnings from the R execution
messages Messages, especially data validation info
console Console print out, useful for locating errors
stdout Standard output
info Overview of JAMES deployment
parent Parent directory of all OpenCPU session output

In addition, the user can request the function result in a particular form. JAMES distinguishes the following groups of formats.

Format group Description
dfm Data format: json, csv, tab, md, print, parent
ffm Figure format: svglite, print, parent
sfm System format: json, print, parent

In general, the user can specify the desired format by appending the format name to the URL. See https://www.opencpu.org/api.html#api-formats for examples.

Objective

This document provides a quick introduction into the main JAMES features, and how these can be assessed from R and from the command line.

Features

/version: Obtain version information

Let us first check whether JAMES is running. The following code makes a simple request to JAMES to see whether it is alive and to return the version number of the underlying james R package. We illustrate both requests in R and in bash.

R

We first need to install and load packages.

install.packages(c("remotes", "httr", "jsonlite"))
remotes::install_github("growthcharts/jamesclient")
remotes::install_github("growthcharts/jamesdemodata")
remotes::install_github("growthcharts/bdsreader")
library(jamesclient)
library(httr)
library(jsonlite)

Let’s find out the JAMES version number. In this document, we define the server that hosts JAMES as follows.

# host <- "http://localhost"
host <- "https://james.groeidiagrammen.nl"
system(paste0("echo ", host, " > .host"))

We first illustrate a method that makes two requests to the server. The following commands call the /version/json end point in the JAMES API.

r <- james_post(host = host, path = "version/json")

We added the /json to the pathname to extract the JSON representation of the result of the R function james::version(). The function result is an object of class james_post and consists of various components.

names(r)
##  [1] "url"          "status_code"  "headers"      "all_headers"  "cookies"      "content"      "date"         "times"       
##  [9] "request"      "handle"       "request_path" "parsed"       "warnings"     "messages"     "session"
r$url
## [1] "https://james.groeidiagrammen.nl/version/json"

Most of the element are documented in the response object in the httr package. For example, we could use the call httr::status_code(r) to obtain the status code. The function james_post() adds the last five elements:

  • r$request_path echoes the endpoint, here /version/json;
  • r$parsed is a parsed version of the element r$content. Here it is a list of elements like names of the package, its date, and so on. In case of an error of the server function, we find the error message here;
  • r$warnings contain any warnings thrown during execution;
  • r$messages contain any messages, e.g. data reading errors;
  • r$session (like x05f96740c321f7) is a unique session code.

The jamesclient::james_post() function wraps the basis workhorse httr::POST() that does the actual server request. For illustration, we may obtain equivalent content by the POST function directly.

path <- "version/json"
url <- parse_url(host)
url <- modify_url(url, path = file.path(url$path, path), query = "auto_unbox=true")
r <- POST(url)
fromJSON(content(r, type = "text", encoding = "UTF-8"))
## $package
## [1] "james"
## 
## $packageVersion
## [1] "1.7.0"
## 
## $packageDate
## [1] "2024-11-19"
## 
## $Rversion
## [1] "4.4.1"
bash

We use the curl Linux command. If needed, on Ubuntu install curl as

sudo apt update
sudo apt -y install curl

Let’s find out the JAMES version number. We first illustrate a method that makes two requests to the server.

The following bash commands call the /version API end point

curl -sX 'GET' \
  'http://localhost:8080/version' \
  -H 'accept: text/json'
  
curl -sX POST $(cat .host)/version > resp

The response to the request consists of a set of URLs created on the server, each of which contains details on the response.

cat resp
## /ocpu/tmp/x0127e762c7c0fc/R/.val
## /ocpu/tmp/x0127e762c7c0fc/R/version
## /ocpu/tmp/x0127e762c7c0fc/stdout
## /ocpu/tmp/x0127e762c7c0fc/source
## /ocpu/tmp/x0127e762c7c0fc/console
## /ocpu/tmp/x0127e762c7c0fc/info
## /ocpu/tmp/x0127e762c7c0fc/files/DESCRIPTION

The path element following tmp/ is a unique session key. See https://www.opencpu.org/api.html for the interpretation of the OpenCPU API.

The next snippet constructs the URL of a JSON representation of the result and downloads the contents of the URL as a file value1.

curl -s $(cat .host)$(head -1 resp)/json?auto_unbox=true > value1
cat value1
## {
##   "package": "james",
##   "packageVersion": "1.7.0",
##   "packageDate": "2024-11-19",
##   "Rversion": "4.4.1"
## }

The above sequence makes two requests to the server. The following code compacts both steps into one.

curl -sX POST $(cat .host)/version/json?auto_unbox=true > value2
cat value2
## {
##   "package": "james",
##   "packageVersion": "1.7.0",
##   "packageDate": "2024-11-19",
##   "Rversion": "4.4.1"
## }

/data/upload: Upload child data

JAMES understands data that conform to the Basisdataset JGZ 4.0.1 coded as JSON according to a JSON schema. This section explains how we create, validate and upload child data to JAMES.

R

Let us assume that we have already have child data in R stored as a data.frame or tibble. Here we copy the longitudinal demo data maria.json from the bdsreader package into the working directory.

success <- file.copy(system.file("examples/maria.json", package = "bdsreader"), 
                     "maria.json", overwrite = TRUE)

The contents of the file is json format, ready for upload:

{
  "OrganisatieCode": 1234,
  "Referentie": "fa308134-069e-49ce-9847-ccdae380ed6f",
  "ClientGegevens": {
    "Elementen": [
      {
        "Bdsnummer": 19,
        "Waarde": "2"
      },
      {
        "Bdsnummer": 20,
        "Waarde": "20181011"
      },
      {
        "Bdsnummer": 82,
        "Waarde": "189"
      },
      {
        "Bdsnummer": 91,
        "Waarde": "2"
      },
      {
        "Bdsnummer": 110,
        "Waarde": "990"
      },
      {
        "Bdsnummer": 238,
        "Waarde": "1670"
      },
      {
        "Bdsnummer": 240,
        "Waarde": "1900"
      }
    ],
    "Groepen": [
      {
        "Elementen": [
          {
            "Bdsnummer": 63,
            "Waarde": "19950704"
          },
          {
            "Bdsnummer": 71
          },
          {
            "Bdsnummer": 62,
            "Waarde": "01"
          }
        ]
      },
      {
        "Elementen": [
          {
            "Bdsnummer": 63,
            "Waarde": "19901202"
          },
          {
            "Bdsnummer": 71
          },
          {
            "Bdsnummer": 62,
            "Waarde": "02"
          }
        ]
      }
    ]
  },
  "Contactmomenten": [
    {
      "Tijdstip": "20181011",
      "Elementen": [
        {
          "Bdsnummer": 245,
          "Waarde": "990"
        }
      ]
    },
    {
      "Tijdstip": "20181111",
      "Elementen": [
        {
          "Bdsnummer": 235,
          "Waarde": "380"
        },
        {
          "Bdsnummer": 245,
          "Waarde": "1250"
        },
        {
          "Bdsnummer": 252,
          "Waarde": "270"
        }
      ]
    },
    {
      "Tijdstip": "20181211",
      "Elementen": [
        {
          "Bdsnummer": 235,
          "Waarde": "435"
        },
        {
          "Bdsnummer": 245,
          "Waarde": "2100"
        },
        {
          "Bdsnummer": 252,
          "Waarde": "305"
        }
      ]
    }
  ]
}

There are four ways to upload the data to JAMES:

  1. Upload the file "maria.json";
  2. Convert to a string and upload;
  3. Convert to a JSON object and upload;
  4. Read the JSON file from a URL.

The /data/upload API end point handles these cases as follows:

# upload as file
fn <- "maria.json"
r1 <- james_post(host = host, path = "data/upload/json", txt = fn)
status_code(r1)
## [1] 201
# upload as string
js <- read_json_js(fn)
r2 <- james_post(host = host, path = "data/upload/json", txt = js)
status_code(r2)
## [1] 201
# upload as JSON object
jo <- read_json_jo(fn)
r3 <- james_post(host = host, path = "data/upload/json", txt = jo)
status_code(r3)
## [1] 201
# upload as URL
url <- file.path(host, "ocpu/library/bdsreader/examples/maria.json")
r4 <- james_post(host = host, path = "data/upload/json", txt = url)
status_code(r4)
## [1] 201

If the status is 201, the data are uploaded to JAMES and processed. For example, the processed data after file upload is available as an R data frame under element r1$parsed.

r1$parsed
## $psn
##   id  name        dob       dobm       dobf  src    sex gad ga smo  bw hgtm hgtf
## 1 -1 Maria 2018-10-11 1990-12-02 1995-07-04 1234 female 189 27   1 990  167  190
## 
## $xyz
##       age xname yname zname                  zref       x     y      z
## 1  0.0849   age   hgt hgt_z nl_2012_hgt_female_27  0.0849 38.00 -0.158
## 2  0.1670   age   hgt hgt_z nl_2012_hgt_female_27  0.1670 43.50  0.047
## 3  0.0000   age   wgt wgt_z nl_2012_wgt_female_27  0.0000  0.99  0.190
## 4  0.0849   age   wgt wgt_z nl_2012_wgt_female_27  0.0849  1.25 -0.203
## 5  0.1670   age   wgt wgt_z nl_2012_wgt_female_27  0.1670  2.10  0.015
## 6  0.0849   age   hdc hdc_z nl_2012_hdc_female_27  0.0849 27.00 -0.709
## 7  0.1670   age   hdc hdc_z nl_2012_hdc_female_27  0.1670 30.50 -0.913
## 8  0.0000   age   bmi bmi_z nl_1997_bmi_female_nl  0.0000    NA     NA
## 9  0.0849   age   bmi bmi_z nl_1997_bmi_female_nl  0.0849  8.66 -5.719
## 10 0.1670   age   bmi bmi_z nl_1997_bmi_female_nl  0.1670 11.10 -3.767
## 11 0.0000   hgt   wfh wfh_z   nl_2012_wfh_female_      NA  0.99     NA
## 12 0.0849   hgt   wfh wfh_z   nl_2012_wfh_female_ 38.0000  1.25 -0.001
## 13 0.1670   hgt   wfh wfh_z   nl_2012_wfh_female_ 43.5000  2.10  0.326

The session details, including the uploaded data, will remain available for a limited time. After 30 minutes the session is wiped. The session key is your entrance to the resource within the 30-minute window. The key can be retrieved as r1$session. For example, to see the result of the file upload session in markdown use

(session <- r1$session)
## [1] "x0db9cae51dcf68"
resp <- james_get(host = host, path = file.path(session, "md"))
cat(resp$parsed)
## 
## 
##   * **psn**:
## 
##     -------------------------------------------------------------------------------
##      id   name       dob          dobm         dobf      src    dnr    sex     gad
##     ---- ------- ------------ ------------ ------------ ------ ----- -------- -----
##      -1   Maria   2018-10-11   1990-12-02   1995-07-04   1234   NA    female   189
##     -------------------------------------------------------------------------------
## 
##     Table: Table continues below
## 
## 
##     -----------------------------------------------------------------------------------
##      ga   smo   bw    hgtm   hgtf   agem   etn   pc4   blbf   blbm   eduf   edum   par
##     ---- ----- ----- ------ ------ ------ ----- ----- ------ ------ ------ ------ -----
##      27    1    990   167    190     NA    NA    NA     NA     NA     NA     NA    NA
##     -----------------------------------------------------------------------------------
## 
##   * **xyz**:
## 
##     ----------------------------------------------------------------------------------
##       age     xname   yname   zname           zref              x        y       z
##     -------- ------- ------- ------- ----------------------- -------- ------- --------
##      0.0849    age     hgt    hgt_z   nl_2012_hgt_female_27   0.0849    38     -0.158
## 
##      0.167     age     hgt    hgt_z   nl_2012_hgt_female_27   0.167    43.5    0.047
## 
##        0       age     wgt    wgt_z   nl_2012_wgt_female_27     0      0.99     0.19
## 
##      0.0849    age     wgt    wgt_z   nl_2012_wgt_female_27   0.0849   1.25    -0.203
## 
##      0.167     age     wgt    wgt_z   nl_2012_wgt_female_27   0.167     2.1    0.015
## 
##      0.0849    age     hdc    hdc_z   nl_2012_hdc_female_27   0.0849    27     -0.709
## 
##      0.167     age     hdc    hdc_z   nl_2012_hdc_female_27   0.167    30.5    -0.913
## 
##        0       age     bmi    bmi_z   nl_1997_bmi_female_nl     0       NA       NA
## 
##      0.0849    age     bmi    bmi_z   nl_1997_bmi_female_nl   0.0849   8.657   -5.719
## 
##      0.167     age     bmi    bmi_z   nl_1997_bmi_female_nl   0.167    11.1    -3.767
## 
##        0       hgt     wfh    wfh_z    nl_2012_wfh_female_      NA     0.99      NA
## 
##      0.0849    hgt     wfh    wfh_z    nl_2012_wfh_female_      38     1.25    -0.001
## 
##      0.167     hgt     wfh    wfh_z    nl_2012_wfh_female_     43.5     2.1    0.326
##     ----------------------------------------------------------------------------------
## 
## 
## <!-- end of list -->

Troubleshooting data upload: JAMES executes checks on the conversion and ranges of the data. To gain efficiency, it does not automatically validate the input data against the specified JSON schema. JAMES writes diagnostic, sometimes cryptic, messages to the directory {session}/messages if it finds a problem. The user can rerun the data upload with two additional flags that request extra diagnostic output.

Example: Suppose we compromise the data by removing the required "clientDetails" and the optional "nestedDetails" sections. The mangled input data look like:

{"Format":"3.0","organisationCode":12345,"reference":"Maria's mangled data","clientMeasurements":[{"bdsNumber":235,"values":[{"date":"20181111","value":380},{"date":"20181211","value":435}]}]}

Everything appears normal if we read this data by the default:

fn <- "maria-mangled.json"
r5 <- james_post(host = host, path = "data/upload/json", txt = fn)
r5$parsed
## $psn
##   id                 name   src
## 1 -1 Maria's mangled data 12345
## 
## $xyz
##   xname yname zname            zref  y
## 1   age   hgt hgt_z nl_1997_hgt__nl 38

If we upload with the additional validate = TRUE flag, JAMES runs the validation of the uploaded JSON against the JSON schema:

r6 <- james_post(host = host, path = "data/upload/json", txt = fn, validate = TRUE)
mess <- james_get(host = host, path = file.path(r6$session, "messages"))
cat(mess$parsed)
## must have required property 'clientDetails'

which now indicates that the required JSON element "clientDetails" is missing.

We may drill down further by setting the intermediate = TRUE flag. This writes five JSON files that document the data flow into {session}/files/{*}.json.

For example, we can ask for the input data as read by JAMES by

r7 <- james_post(host = host, path = "data/upload/json", txt = fn, validate = TRUE, intermediate = TRUE)
url <- file.path(host, r7$session, "files/input.json")
url
## [1] "https://james.groeidiagrammen.nl/x02009ec0088adb/files/input.json"

With browseURL(url) we may view the file contents in the browser. The files directory contains five JSON files:

  1. files/input.json: the JSON input data;
  2. files/bds.json: a data frame with info per BDS number;
  3. files/ddi.json: result of recoding BDS into GSED item names;
  4. files/psn.json: known fixed child covariates;
  5. files/xy.json: time-varying variables.

Inspection of these files may uncover any problems with JAMES’s understanding of the data. If needed, study the underlying R source code at https://raw.githubusercontent.com/growthcharts/bdsreader/master/R/read_bds.R.

The validate and intermediate flag are useful for development and debugging. In production, we recommend leaving them at their default value (FALSE) and monitor any messages written to {session}/messages.

bash

We start from child data in the file maria.json that we wish to process with JAMES. For testing purposes, you may change the values, but keep the general structure intact. The following curl commands uploads the file and processes the data.

curl -sF '[email protected]' -D headers $(cat .host)/data/upload/json > content
head content
## {
##   "psn": [
##     {
##       "id": -1,
##       "name": "Maria",
##       "dob": "2018-10-11",
##       "dobm": "1990-12-02",
##       "dobf": "1995-07-04",
##       "src": "1234",
##       "sex": "female",

Alternatively, we may read the file into a JSON string, and upload as follows:

JS=$(jq '.' maria.json | jq -sR '.')
curl -s $(cat .host)/data/upload/json -d "txt=$JS" > content

Finally, if the data are located at a URL, use

URL=$(cat .host)/ocpu/library/bdsreader/examples/maria.json
curl -s $(cat .host)/data/upload/json -d "txt='$URL'" > content

/charts/draw: Draw child data on growth chart

R

Maria is a preterm born at 27 weeks of gestational age. We already uploaded her data. We may now plot her growth data on the A4 chart for preterms as follows:

r5 <- james_post(host = host, 
                 path = "/charts/draw/svglite", 
                 session = r1$session,
                 chartcode = "PMAAN27", selector = "chartcode",
                 query = list(height = 29.7/2.54, width = 21/2.54))
writeLines(r5$parsed, con = filename_chart1)
© 2017 TNO/UMCG Kaartcode: PMAAN27-3 16Aug22 15:48:57 www.tno.nl/groei TNODIAGRAM Datum Gewicht Lengte Hoofd GROEIDIAGRAM 0-15 MAANDEN MEISJES PREMATUUR WK 27 Naam Geboortedatum Reg. nr. Vader (a/g) cm Moeder (a/g) cm TH cm , , , 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 5 6 7 8 9 10 11 12 13 14 15 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 -2 -2 -1 0 +1 +2 +2 ,5 ,5 HOOFDOMTREK - LEEFTIJD BOCCA-TJEERTES 2012 P 0,6 2 16 50 84 98 99,4 LEEFTIJD IN MAANDEN CM CM 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 -3 -2 -2 -1 0 +1 +2 +2 ,5 ,5 LENGTE - LEEFTIJD BOCCA-TJEERTES 2012 P 0,1 0,6 2 16 50 84 98 99,4 CM CM 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 4 5 6 7 8 9 10 11 12 13 14 -2 -2 -1 0 +1 +2 +2 ,5 ,5 GEWICHT - LEEFTIJD BOCCA-TJEERTES 2012 P 0,6 2 16 50 84 98 99,4 LEEFTIJD IN MAANDEN KG KG Stef van Buuren

Maria’s growth plotted on preterm chart, 0-15 months

Alternatively, we may upload data for a new child Laura and plot the data in one step:

fn <- system.file("extdata/bds_v3.0/smocc/Laura_S.json", package = "jamesdemodata")
r6 <- james_post(host = host,
                 path = "/charts/draw/svglite", txt = fn, 
                 chartcode = "NMBA", selector = "chartcode",
                 query = list(height = 29.7/2.54, width = 21/2.54))
writeLines(r6$parsed, con = filename_chart2)

For A4 sized charts, we recommend to generate the plot with query arguments list(height = 29.7/2.54, width = 21/2.54), as illustrated above. If you want to change the chart’s size in your HTML, use the out.width knitr chunk option, e.g. set out.width="500px". This gives the following output.

© 2017 TNO Kaartcode: NMBA-3 30Mar23 15:09:36 www.tno.nl/groei TNODIAGRAM Datum Gewicht Lengte GROEIDIAGRAM 0-4 JAAR MEISJES NL 2010 Naam Geboortedatum Reg. nr. Vader (a/g) cm Moeder (a/g) cm TH cm , , , 50 60 70 80 90 100 110 120 2,5 3 3,5 4 4,5 5 5,5 6 6,5 7 7,5 8 8,5 9 9,5 10 11 12 13 14 15 16 50 60 70 80 90 100 110 120 11 12 13 14 15 16 17 18 19 20 22 24 26 28 30 32 34 36 GEWICHT - LENGTE ROEDE 1985 -2 -1 0 +1 +2 P 2 16 50 84 98 LENGTE IN CM LENGTE IN CM KG KG 0 3 6 9 1 3 6 9 2 3 6 9 3 3 6 9 4 50 55 60 65 70 75 80 3 6 9 1 3 6 9 2 3 6 9 3 3 6 9 4 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 LENGTE - LEEFTIJD SCHONBECK 2010 -3 -2 -2 -1 0 +1 +2 +2 ,5 ,5 P 0,1 0,6 2 16 50 84 98 99,4 LEEFTIJD IN JAREN/MAANDEN LEEFTIJD IN JAREN/MAANDEN CM CM Stef van Buuren

Laura’s growth plotted on chart for Dutch girls, 0-4 years

JAMES features a built-in prediction module based on curve matching. Suppose we want to predict Laura’s height at the 3y9m when Laura is 2 years old. The following chart plots 25 matches to Laura as grey curves. The variation between the grey curves at age 3y9m indicates the likely variation in the prediction. The blue line indicates Laura’s predicted height at age 3y9m.

r7 <- james_post(host = host, 
                 path = "/charts/draw/svglite", txt = fn, 
                 chartcode = "NMBH", dnr = "2-4",
                 lo = 2.0, hi = 3.75, nmatch = 25,
                 show_future = TRUE, show_realized = TRUE,
                 query = list(height = 18/2.54, width = 18/2.54))
writeLines(r7$parsed, con = filename_chart3)

For square charts, use query arguments list(height = 18/2.54, width = 18/2.54) to generate the plot. In order to get the same age units as the previous chart, calculate out.width as 500/21*18 = "429px".

0 3 6 9 1 3 6 9 2 3 6 9 3 3 6 9 4 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 0 3 6 9 1 3 6 9 2 3 6 9 3 3 6 9 4 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 LENGTE - LEEFTIJD SCHONBECK 2010 -3 -2 -2 -1 0 +1 +2 +2 ,5 ,5 P 0,1 0,6 2 16 50 84 98 99,4 LEEFTIJD IN JAREN/MAANDEN LEEFTIJD IN JAREN/MAANDEN CM CM Stef van Buuren

Predict Laura’s future height at the age of 3y9m.

bash

Upload maria.json and draw the height data on the default chart to produce an SVG file. Specify the proper width and height query parameters.

curl -sX 'POST' $(cat .host)'/charts/draw/svglite?width=7.09&height=7.09' \
-H 'accept: image/*' \
-F '[email protected];type=application/json' > maria1.svg

We need to set chartcode and selector parameters to choose a different chart.

curl -sX 'POST' $(cat .host)'/charts/draw/svglite?width=8.27&height=11.69' \
-H 'accept: image/*' \
-F "chartcode='PMAAN27'" \
-F "selector='chartcode'" \
-F '[email protected];type=application/json' > maria2.svg

An alternative is to read the data from a URL, and use the application/json protocol to specify parameters.

curl -sX 'POST' \
$(cat .host)'/charts/draw/svglite?width=8.27&height=11.69' \
-H 'accept: image/*' \
-H 'Content-Type: application/json' \
-d '{
"txt": "'$(cat .host)'/ocpu/library/jamesdemodata/extdata/bds_v3.0/smocc/Laura_S.json",
"chartcode" : "NMBA", 
"selector" : "chartcode"}' > laura.svg

/charts/list: List available growth charts

R

JAMES contains a wide variety of built-in growth charts. Each chart has a unique chartcode. A typical chart code looks like NJAA. We obtain the full list of chart codes as

r <- james_post(host = host, path = "charts/list/json")
charts <- r$parsed

The charts object is a data frame with 478 rows (charts) and the following variables:

names(charts)
## [1] "chartgrp"   "chartcode"  "population" "sex"        "design"     "side"       "language"   "week"

JAMES contains charts for various child populations. There are charts for Down syndrome (DS), Hindustan (HS), Moroccan (MA), Dutch (NL)), preterm (PT) and Turkish (TU) children living in the Netherlands and the WHO Growth Standards (WHOblue, WHOpink). These charts contain references for height (hgt), weight (wgt), head circumference (hdc), weight-for-height (wfh), body mass index (bmi) and D-score (dsc), as well as combined charts with multiple references on A4 format (front, back, -hdc).

The most important index variables are population and side:

with(charts, table(population, side))
##           side
## population -hdc back bmi dsc front hdc hgt wfh wgt
##    DS         0    6   2   0     6   6   6   4   2
##    HS         4    2   2   0     6   2   6   4   2
##    MA         0    6   2   0     6   6   6   4   2
##    NL         2    8   2   4     8   8   8   4   4
##    PT         0   24   0  48    48  24  48   0  48
##    TU         0    6   2   0     6   6   6   4   2
##    WHOblue    0    0   0  26     2   1   2   1   1
##    WHOpink    0    0   0  26     2   1   2   1   1

The URL {host}/site (see below) displays the currently active chart code as a field in the left sidebar.

bash

Restrict the listing to the WHO references:

curl -sX 'POST' \
$(cat .host)'/charts/list/json' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"chartgrp": "who"
}'

/charts/validate: Validate chart codes

R

The /charts/validate end point attempt to find one or more user-specified chart codes. For example, the following cocde checkc five chart codes:

r <- james_post(host = host, 
                path = "charts/validate/json", 
                chartcode = c("NMAW", "NJAb", "PJAAN23", "PJAAN25", "dummy"))
r$parsed
## [1]  TRUE FALSE FALSE  TRUE FALSE
bash

Check five chart codes:

curl -sX 'POST' \
$(cat .host)'/charts/validate/json' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"chartcode": [
"NMAW",
"NJAB",
"PJAAN23",
"PJAAN25", 
"dummy"
]
}'
## [true, true, false, true, false]

/screeners/list: List available growth screeners

R

JAMES implements several screening algorithms. The /screeners/list end point provides detailed information on each of these.

r <- james_post(host = host, path = "/screeners/list/json", 
                session = r1$session)
names(r$parsed)
## [1] "Versie"                "yname"                 "Categorie"             "CategorieOmschrijving" "JGZRichtlijn"         
## [6] "Code"                  "CodeOmschrijving"
with(r$parsed, table(yname, Categorie))
##      Categorie
## yname 1000 2000 3000
##   hdc    0    0   17
##   hgt   45    0    0
##   wgt    0   26    0

There are currently 88 different codes. Codes ending in 31, e.g., 1031 or 2031 indicate normal growth, whereas code ending in 41, 42 and so on, signal that - according to the guidelines - the child should be referred for further investigation.

bash

We get the details for the guidelines for head circumference as

curl -sX 'POST' \
$(cat .host)'/screeners/list/json' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"ynames": "hdc"}'

/screeners/apply: Apply growth screeners to child data

R

The /screeners/apply end point applies standard screeners to the child data. Invoke the screeners by

r <- james_post(host = host, path = "/screeners/apply/json", 
                session = r1$session)
r$parsed
##   Categorie CategorieOmschrijving Code
## 1      1000                Lengte 1031
## 2      2000               Gewicht 2031
## 3      3000           Hoofdomtrek 3031
##                                                                                                                CodeOmschrijving
## 1 Het advies volgens de JGZ-richtlijn lengtegroei is als volgt: In principe geen verwijzing nodig, naar eigen inzicht handelen.
## 2 Het advies volgens de JGZ-richtlijn overgewicht is als volgt: In principe geen verwijzing nodig, naar eigen inzicht handelen.
## 3                                                               In principe geen verwijzing nodig, naar eigen inzicht handelen.
##   Versie Leeftijd
## 1 1.23.0    0.167
## 2 1.23.0    0.167
## 3 1.23.0    0.167

The procedure

  1. calculates, per outcome, the intervals between the most recent measurement and all earlier measurements;
  2. tests whether any of those intervals produces a signal according the screening algorithm;
  3. reports the most recent non-standard signal that indicate abnormal growth.

In the example, all returned codes (1031, 2031, 3031) end in “31”, which signals normal growth. The full table of return codes and messages can be obtained by the /screeners/list end point (see above).

There are several possibilities to visualise and integrate multiple evaluations per curve performed in step 2 into one advice. Before May 2023, JAMES returned an advice for each combination of time point and outcome, but that table presented a lot of output that was difficult to act one. Since May 2023, JAMES reports only one signal per curve.

bash
curl -sX 'POST' \
$(cat .host)'/screeners/apply/json' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F '[email protected];type=application/json'
## [
##   {
##     "Categorie": 1000,
##     "CategorieOmschrijving": "Lengte",
##     "Code": 1031,
##     "CodeOmschrijving": "Het advies volgens de JGZ-richtlijn lengtegroei is als volgt: In principe geen verwijzing nodig, naar eigen inzicht handelen.",
##     "Versie": "1.23.0",
##     "Leeftijd": 0.167
##   },
##   {
##     "Categorie": 2000,
##     "CategorieOmschrijving": "Gewicht",
##     "Code": 2031,
##     "CodeOmschrijving": "Het advies volgens de JGZ-richtlijn overgewicht is als volgt: In principe geen verwijzing nodig, naar eigen inzicht handelen.",
##     "Versie": "1.23.0",
##     "Leeftijd": 0.167
##   },
##   {
##     "Categorie": 3000,
##     "CategorieOmschrijving": "Hoofdomtrek",
##     "Code": 3031,
##     "CodeOmschrijving": "In principe geen verwijzing nodig, naar eigen inzicht handelen.",
##     "Versie": "1.23.0",
##     "Leeftijd": 0.167
##   }
## ]

/site: Request an empty site

R

The /site end point provides interactive site containing all charts, but without child data. This end point is primarily useful to obtain a quick overview of the available charts.

browseURL(file.path(host, "site"))
bash

/site/request: Request personalised site

R

The /site/request end point creates an URL to a personalised, interactive site containing all charts.

r <- james_post(host = host, path = "/site/request/json", 
                sitehost = host, txt = js)
r$parsed
## [1] "https://james.groeidiagrammen.nl/site?session=x0b5a28d527dba1"

Run the command and paste the generated URL in the address field of your browser. The starting chart is chosen by JAMES and depends on the age of the child.

Alteratively, we may start from the session created by /data/upload:

r <- james_post(host = host, path = "/site/request/json", 
                sitehost = host, session = r1$session)
r$parsed
## [1] "https://james.groeidiagrammen.nl/site?session=x0db9cae51dcf68"

Run the command and paste the generated URL in the address field of your browser. The starting chart is chosen by JAMES and depends on the age of the child.

-d ‘{“sitehost”: “‘$(cat .host)’”}’

bash
curl -sX 'POST' \
$(cat .host)'/site/request/json' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F "sitehost='$(cat .host)'" \
-F '[email protected];type=application/json'
## ["https://james.groeidiagrammen.nl/site?session=x0cf01cd59db5c2"]

/blend/request: Obtain a blend from multiple end points

R

The /blend/request end point returns the results of multiple end points, and thus functions as a one-stop shop. However, currently it does not support graphics output, so use /{session}/{info}/svglite or /charts/draw/svglite for the charts.

fn <- system.file("extdata", "bds_v3.0", "smocc", "Laura_S.json",
                 package = "jamesdemodata", mustWork = TRUE)
r <- james_post(host = host, path = "/blend/request/json", 
                sitehost = host, txt = fn)
r$parsed
## $txt
## [1] "{\"Format\": \"3.0\",\"organisationCode\": 0,\"reference\": \"Laura S\",\"clientDetails\": [{\"bdsNumber\": 19,\"value\": \"2\"},{\"bdsNumber\": 20,\"value\": \"19890121\"},{\"bdsNumber\": 82,\"value\": 276},{\"bdsNumber\": 91,\"value\": \"2\"},{\"bdsNumber\": 110,\"value\": 2950},{\"bdsNumber\": 238,\"value\": 1640},{\"bdsNumber\": 240,\"value\": 1790}],\"clientMeasurements\": [{\"bdsNumber\": 235,\"values\": [{\"date\": \"19890121\",\"value\": 480},{\"date\": \"19890227\",\"value\": 535},{\"date\": \"19890320\",\"value\": 560},{\"date\": \"19890417\",\"value\": 595},{\"date\": \"19890717\",\"value\": 655},{\"date\": \"19891023\",\"value\": 715},{\"date\": \"19900129\",\"value\": 750},{\"date\": \"19900423\",\"value\": 800},{\"date\": \"19900806\",\"value\": 840},{\"date\": \"19910205\",\"value\": 900}]},{\"bdsNumber\": 245,\"values\": [{\"date\": \"19890121\",\"value\": 2950},{\"date\": \"19890227\",\"value\": 4180},{\"date\": \"19890320\",\"value\": 5000},{\"date\": \"19890417\",\"value\": 5900},{\"date\": \"19890717\",\"value\": 8240},{\"date\": \"19891023\",\"value\": 9650},{\"date\": \"19900129\",\"value\": 10950},{\"date\": \"19900423\",\"value\": 11900},{\"date\": \"19900806\",\"value\": 12800},{\"date\": \"19910205\",\"value\": 13900}]},{\"bdsNumber\": 252,\"values\": [{\"date\": \"19890227\",\"value\": 376},{\"date\": \"19890320\",\"value\": 390},{\"date\": \"19890417\",\"value\": 405},{\"date\": \"19890717\",\"value\": 441},{\"date\": \"19891023\",\"value\": 466},{\"date\": \"19900129\",\"value\": 478},{\"date\": \"19900423\",\"value\": 487},{\"date\": \"19900806\",\"value\": 492},{\"date\": \"19910205\",\"value\": 500}]},{\"bdsNumber\": 879,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"}]},{\"bdsNumber\": 881,\"values\": [{\"date\": \"19890227\",\"value\": \"2\"},{\"date\": \"19890320\",\"value\": \"1\"}]},{\"bdsNumber\": 883,\"values\": [{\"date\": \"19890227\",\"value\": \"2\"},{\"date\": \"19890320\",\"value\": \"1\"}]},{\"bdsNumber\": 884,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"},{\"date\": \"19890417\",\"value\": \"1\"}]},{\"bdsNumber\": 885,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"},{\"date\": \"19890417\",\"value\": \"1\"}]},{\"bdsNumber\": 886,\"values\": [{\"date\": \"19890320\",\"value\": \"2\"},{\"date\": \"19890417\",\"value\": \"2\"},{\"date\": \"19890717\",\"value\": \"3\"}]},{\"bdsNumber\": 887,\"values\": [{\"date\": \"19890417\",\"value\": \"2\"},{\"date\": \"19890717\",\"value\": \"1\"}]},{\"bdsNumber\": 888,\"values\": [{\"date\": \"19890417\",\"value\": \"2\"},{\"date\": \"19890717\",\"value\": \"1\"}]},{\"bdsNumber\": 889,\"values\": [{\"date\": \"19890417\",\"value\": \"2\"},{\"date\": \"19890717\",\"value\": \"1\"}]},{\"bdsNumber\": 890,\"values\": [{\"date\": \"19890717\",\"value\": \"2\"},{\"date\": \"19891023\",\"value\": \"1\"}]},{\"bdsNumber\": 891,\"values\": [{\"date\": \"19890717\",\"value\": \"2\"},{\"date\": \"19891023\",\"value\": \"1\"}]},{\"bdsNumber\": 892,\"values\": [{\"date\": \"19890717\",\"value\": \"2\"},{\"date\": \"19891023\",\"value\": \"3\"}]},{\"bdsNumber\": 893,\"values\": [{\"date\": \"19890717\",\"value\": \"2\"},{\"date\": \"19891023\",\"value\": \"3\"}]},{\"bdsNumber\": 894,\"values\": [{\"date\": \"19891023\",\"value\": \"1\"},{\"date\": \"19900129\",\"value\": \"1\"}]},{\"bdsNumber\": 896,\"values\": [{\"date\": \"19891023\",\"value\": \"1\"},{\"date\": \"19900129\",\"value\": \"1\"}]},{\"bdsNumber\": 897,\"values\": [{\"date\": \"19900129\",\"value\": \"1\"},{\"date\": \"19900423\",\"value\": \"1\"}]},{\"bdsNumber\": 898,\"values\": [{\"date\": \"19900129\",\"value\": \"1\"},{\"date\": \"19900423\",\"value\": \"1\"}]},{\"bdsNumber\": 900,\"values\": [{\"date\": \"19900129\",\"value\": \"3\"},{\"date\": \"19900423\",\"value\": \"3\"}]},{\"bdsNumber\": 902,\"values\": [{\"date\": \"19900423\",\"value\": \"2\"},{\"date\": \"19900806\",\"value\": \"1\"},{\"date\": \"19910205\",\"value\": \"1\"}]},{\"bdsNumber\": 903,\"values\": [{\"date\": \"19900423\",\"value\": \"2\"},{\"date\": \"19900806\",\"value\": \"2\"},{\"date\": \"19910205\",\"value\": \"1\"}]},{\"bdsNumber\": 905,\"values\": [{\"date\": \"19900423\",\"value\": \"1\"},{\"date\": \"19900806\",\"value\": \"1\"}]},{\"bdsNumber\": 906,\"values\": [{\"date\": \"19900806\",\"value\": \"2\"},{\"date\": \"19910205\",\"value\": \"1\"}]},{\"bdsNumber\": 907,\"values\": [{\"date\": \"19900806\",\"value\": \"2\"},{\"date\": \"19910205\",\"value\": \"1\"}]},{\"bdsNumber\": 909,\"values\": [{\"date\": \"19900806\",\"value\": \"3\"},{\"date\": \"19910205\",\"value\": \"3\"}]},{\"bdsNumber\": 910,\"values\": [{\"date\": \"19910205\",\"value\": \"1\"}]},{\"bdsNumber\": 912,\"values\": [{\"date\": \"19910205\",\"value\": \"1\"}]},{\"bdsNumber\": 921,\"values\": [{\"date\": \"19910205\",\"value\": \"3\"}]},{\"bdsNumber\": 927,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"}]},{\"bdsNumber\": 928,\"values\": [{\"date\": \"19890227\",\"value\": \"2\"}]},{\"bdsNumber\": 930,\"values\": [{\"date\": \"19890320\",\"value\": \"3\"},{\"date\": \"19890417\",\"value\": \"3\"}]},{\"bdsNumber\": 932,\"values\": [{\"date\": \"19890717\",\"value\": \"2\"},{\"date\": \"19891023\",\"value\": \"3\"}]},{\"bdsNumber\": 933,\"values\": [{\"date\": \"19891023\",\"value\": \"3\"},{\"date\": \"19900129\",\"value\": \"3\"}]},{\"bdsNumber\": 935,\"values\": [{\"date\": \"19891023\",\"value\": \"2\"},{\"date\": \"19900129\",\"value\": \"3\"}]},{\"bdsNumber\": 936,\"values\": [{\"date\": \"19900129\",\"value\": \"2\"},{\"date\": \"19900423\",\"value\": \"3\"}]},{\"bdsNumber\": 937,\"values\": [{\"date\": \"19900129\",\"value\": \"2\"},{\"date\": \"19900423\",\"value\": \"3\"}]},{\"bdsNumber\": 938,\"values\": [{\"date\": \"19900423\",\"value\": \"3\"},{\"date\": \"19900806\",\"value\": \"3\"}]},{\"bdsNumber\": 940,\"values\": [{\"date\": \"19900806\",\"value\": \"3\"},{\"date\": \"19910205\",\"value\": \"3\"}]},{\"bdsNumber\": 943,\"values\": [{\"date\": \"19910205\",\"value\": \"3\"}]},{\"bdsNumber\": 945,\"values\": [{\"date\": \"19910205\",\"value\": \"1\"}]},{\"bdsNumber\": 955,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"}]},{\"bdsNumber\": 956,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"}]},{\"bdsNumber\": 958,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"}]},{\"bdsNumber\": 959,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"}]},{\"bdsNumber\": 961,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"},{\"date\": \"19890417\",\"value\": \"1\"}]},{\"bdsNumber\": 962,\"values\": [{\"date\": \"19890417\",\"value\": \"2\"},{\"date\": \"19890717\",\"value\": \"1\"}]},{\"bdsNumber\": 964,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"}]},{\"bdsNumber\": 966,\"values\": [{\"date\": \"19890227\",\"value\": \"1\"},{\"date\": \"19890417\",\"value\": \"1\"}]},{\"bdsNumber\": 968,\"values\": [{\"date\": \"19890417\",\"value\": \"1\"},{\"date\": \"19890717\",\"value\": \"1\"}]},{\"bdsNumber\": 969,\"values\": [{\"date\": \"19890417\",\"value\": \"1\"},{\"date\": \"19890717\",\"value\": \"1\"}]},{\"bdsNumber\": 970,\"values\": [{\"date\": \"19890417\",\"value\": \"1\"},{\"date\": \"19890717\",\"value\": \"1\"}]},{\"bdsNumber\": 973,\"values\": [{\"date\": \"19890717\",\"value\": \"2\"},{\"date\": \"19891023\",\"value\": \"3\"}]},{\"bdsNumber\": 975,\"values\": [{\"date\": \"19890717\",\"value\": \"1\"},{\"date\": \"19891023\",\"value\": \"1\"}]},{\"bdsNumber\": 976,\"values\": [{\"date\": \"19890717\",\"value\": \"2\"},{\"date\": \"19891023\",\"value\": \"1\"}]},{\"bdsNumber\": 978,\"values\": [{\"date\": \"19891023\",\"value\": \"1\"},{\"date\": \"19900129\",\"value\": \"1\"}]},{\"bdsNumber\": 980,\"values\": [{\"date\": \"19891023\",\"value\": \"3\"},{\"date\": \"19900129\",\"value\": \"3\"}]},{\"bdsNumber\": 982,\"values\": [{\"date\": \"19900129\",\"value\": \"1\"},{\"date\": \"19900423\",\"value\": \"1\"}]},{\"bdsNumber\": 984,\"values\": [{\"date\": \"19900129\",\"value\": \"1\"},{\"date\": \"19900423\",\"value\": \"1\"}]},{\"bdsNumber\": 986,\"values\": [{\"date\": \"19900423\",\"value\": \"1\"},{\"date\": \"19900806\",\"value\": \"1\"}]},{\"bdsNumber\": 989,\"values\": [{\"date\": \"19900423\",\"value\": \"2\"},{\"date\": \"19900806\",\"value\": \"2\"},{\"date\": \"19910205\",\"value\": \"1\"}]},{\"bdsNumber\": 991,\"values\": [{\"date\": \"19900806\",\"value\": \"1\"},{\"date\": \"19910205\",\"value\": \"1\"}]},{\"bdsNumber\": 993,\"values\": [{\"date\": \"19910205\",\"value\": \"1\"}]},{\"bdsNumber\": 1278,\"values\": [{\"date\": \"19891023\",\"value\": \"3\"},{\"date\": \"19900129\",\"value\": \"3\"}]}],\"nestedDetails\": [{\"nestingBdsNumber\": 62,\"nestingCode\": \"02\",\"clientDetails\": [{\"bdsNumber\": 63,\"value\": \"19610722\"}]}]}"
## 
## $session
## [1] "x032bfead3d55c8"
## 
## $site
## [1] "https://james.groeidiagrammen.nl/site?session=x032bfead3d55c8"
## 
## $child
##   id    name        dob       dobm src    sex gad ga smo   bw hgtm hgtf
## 1 -1 Laura S 1989-01-21 1961-07-22   0 female 276 39   0 2950  164  179
## 
## $time
##      age xname yname zname                   zref      x     y      z
## 1  0.000   age   hgt hgt_z  nl_1997_hgt_female_nl  0.000 48.00 -1.515
## 2  0.101   age   hgt hgt_z  nl_1997_hgt_female_nl  0.101 53.50 -0.499
## 3  0.159   age   hgt hgt_z  nl_1997_hgt_female_nl  0.159 56.00 -0.261
## 4  0.235   age   hgt hgt_z  nl_1997_hgt_female_nl  0.235 59.50  0.163
## 5  0.485   age   hgt hgt_z  nl_1997_hgt_female_nl  0.485 65.50 -0.259
## 6  0.753   age   hgt hgt_z  nl_1997_hgt_female_nl  0.753 71.50  0.131
## 7  1.021   age   hgt hgt_z  nl_1997_hgt_female_nl  1.021 75.00 -0.180
## 8  1.251   age   hgt hgt_z  nl_1997_hgt_female_nl  1.251 80.00  0.421
## 9  1.539   age   hgt hgt_z  nl_1997_hgt_female_nl  1.539 84.00  0.527
## 10 2.040   age   hgt hgt_z  nl_1997_hgt_female_nl  2.040 90.00  0.670
## 11 0.000   age   wgt wgt_z  nl_1997_wgt_female_nl  0.000  2.95 -1.055
## 12 0.101   age   wgt wgt_z  nl_1997_wgt_female_nl  0.101  4.18 -0.162
## 13 0.159   age   wgt wgt_z  nl_1997_wgt_female_nl  0.159  5.00  0.401
## 14 0.235   age   wgt wgt_z  nl_1997_wgt_female_nl  0.235  5.90  0.717
## 15 0.485   age   wgt wgt_z  nl_1997_wgt_female_nl  0.485  8.24  1.173
## 16 0.753   age   wgt wgt_z  nl_1997_wgt_female_nl  0.753  9.65  1.052
## 17 1.021   age   wgt wgt_z  nl_1997_wgt_female_nl  1.021 10.95  1.164
## 18 1.251   age   wgt wgt_z  nl_1997_wgt_female_nl  1.251 11.90  1.247
## 19 1.539   age   wgt wgt_z  nl_1997_wgt_female_nl  1.539 12.80  1.228
## 20 2.040   age   wgt wgt_z  nl_1997_wgt_female_nl  2.040 13.90  0.989
## 21 0.101   age   hdc hdc_z  nl_1997_hdc_female_nl  0.101 37.60  0.418
## 22 0.159   age   hdc hdc_z  nl_1997_hdc_female_nl  0.159 39.00  0.605
## 23 0.235   age   hdc hdc_z  nl_1997_hdc_female_nl  0.235 40.50  0.696
## 24 0.485   age   hdc hdc_z  nl_1997_hdc_female_nl  0.485 44.10  1.021
## 25 0.753   age   hdc hdc_z  nl_1997_hdc_female_nl  0.753 46.60  1.418
## 26 1.021   age   hdc hdc_z  nl_1997_hdc_female_nl  1.021 47.80  1.307
## 27 1.251   age   hdc hdc_z  nl_1997_hdc_female_nl  1.251 48.70  1.373
## 28 1.539   age   hdc hdc_z  nl_1997_hdc_female_nl  1.539 49.20  1.246
## 29 2.040   age   hdc hdc_z  nl_1997_hdc_female_nl  2.040 50.00  1.224
## 30 0.000   age   bmi bmi_z  nl_1997_bmi_female_nl  0.000 12.80  0.259
## 31 0.101   age   bmi bmi_z  nl_1997_bmi_female_nl  0.101 14.60  0.231
## 32 0.159   age   bmi bmi_z  nl_1997_bmi_female_nl  0.159 15.94  0.701
## 33 0.235   age   bmi bmi_z  nl_1997_bmi_female_nl  0.235 16.67  0.734
## 34 0.485   age   bmi bmi_z  nl_1997_bmi_female_nl  0.485 19.21  1.688
## 35 0.753   age   bmi bmi_z  nl_1997_bmi_female_nl  0.753 18.88  1.325
## 36 1.021   age   bmi bmi_z  nl_1997_bmi_female_nl  1.021 19.47  1.780
## 37 1.251   age   bmi bmi_z  nl_1997_bmi_female_nl  1.251 18.59  1.394
## 38 1.539   age   bmi bmi_z  nl_1997_bmi_female_nl  1.539 18.14  1.277
## 39 2.040   age   bmi bmi_z  nl_1997_bmi_female_nl  2.040 17.16  0.825
## 40 0.101   age   dsc dsc_z  ph_2023_dsc_female_40  0.101 15.56 -0.094
## 41 0.159   age   dsc dsc_z  ph_2023_dsc_female_40  0.159 17.69 -0.075
## 42 0.235   age   dsc dsc_z  ph_2023_dsc_female_40  0.235 20.57 -0.125
## 43 0.485   age   dsc dsc_z  ph_2023_dsc_female_40  0.485 25.55 -1.553
## 44 0.753   age   dsc dsc_z  ph_2023_dsc_female_40  0.753 43.75  0.672
## 45 1.021   age   dsc dsc_z  ph_2023_dsc_female_40  1.021 50.92  0.708
## 46 1.251   age   dsc dsc_z  ph_2023_dsc_female_40  1.251 54.34  0.319
## 47 1.539   age   dsc dsc_z  ph_2023_dsc_female_40  1.539 56.65 -0.385
## 48 2.040   age   dsc dsc_z  ph_2023_dsc_female_40  2.040 70.05  1.536
## 49 0.000   hgt   wfh wfh_z nl_1997_wfh_female_nla 48.000  2.95     NA
## 50 0.101   hgt   wfh wfh_z nl_1997_wfh_female_nla 53.500  4.18  0.215
## 51 0.159   hgt   wfh wfh_z nl_1997_wfh_female_nla 56.000  5.00  0.764
## 52 0.235   hgt   wfh wfh_z nl_1997_wfh_female_nla 59.500  5.90  0.744
## 53 0.485   hgt   wfh wfh_z nl_1997_wfh_female_nla 65.500  8.24  1.728
## 54 0.753   hgt   wfh wfh_z nl_1997_wfh_female_nla 71.500  9.65  1.342
## 55 1.021   hgt   wfh wfh_z nl_1997_wfh_female_nla 75.000 10.95  1.726
## 56 1.251   hgt   wfh wfh_z nl_1997_wfh_female_nla 80.000 11.90  1.379
## 57 1.539   hgt   wfh wfh_z nl_1997_wfh_female_nla 84.000 12.80  1.242
## 58 2.040   hgt   wfh wfh_z nl_1997_wfh_female_nla 90.000 13.90  0.820
## 
## $screeners
##   Categorie CategorieOmschrijving Code
## 1      1000                Lengte 1031
## 2      2000               Gewicht 2075
## 3      3000           Hoofdomtrek 3021
##                                                                                                                                                                                                                                                                                                                                                         CodeOmschrijving
## 1                                                                                                                                                                                                                                          Het advies volgens de JGZ-richtlijn lengtegroei is als volgt: In principe geen verwijzing nodig, naar eigen inzicht handelen.
## 2 Het advies volgens de JGZ-richtlijn ondergewicht is als volgt: Sterke gewichtsafname (-1 SD), advies: Is er sprake van een afwijkende voedingstoestand en/of klachten of symptomen die kunnen wijzen op onderliggende ziekte of problemen? Indien ja, Verwijzen naar kinderarts. Indien nee, dan is er in principe geen verwijzing nodig. Naar eigen inzicht handelen.
## 3                                                                                                                                                                                                                                                                                                          De richtlijn hoofdomtrek is bedoeld voor kinderen tot 1 jaar.
##   Versie Leeftijd
## 1 1.23.0     2.04
## 2 1.23.0     2.04
## 3 1.23.0     2.04
bash
curl -sX 'POST' \
$(cat .host)'/blend/request/json' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"txt": "'$(cat .host)'/ocpu/library/bdsreader/examples/Laura_S.json",
"sitehost": "'$(cat .host)'",
"blend": "standard"
}'
## {
##   "txt": "https://james.groeidiagrammen.nl/ocpu/library/bdsreader/examples/Laura_S.json",
##   "session": "x0ee26a233c750f",
##   "site": "https://james.groeidiagrammen.nl/site?session=x0ee26a233c750f",
##   "child": [
##     {
##       "id": -1,
##       "name": "Laura S",
##       "dob": "1989-01-21",
##       "dobm": "1961-07-22",
##       "src": "0",
##       "sex": "female",
##       "gad": 276,
##       "ga": 39,
##       "smo": 0,
##       "bw": 2950,
##       "hgtm": 164,
##       "hgtf": 179
##     }
##   ],
##   "time": [
##     {
##       "age": 0,
##       "xname": "age",
##       "yname": "hgt",
##       "zname": "hgt_z",
##       "zref": "nl_1997_hgt_female_nl",
##       "x": 0,
##       "y": 48,
##       "z": -1.515
##     },
##     {
##       "age": 0.1013,
##       "xname": "age",
##       "yname": "hgt",
##       "zname": "hgt_z",
##       "zref": "nl_1997_hgt_female_nl",
##       "x": 0.1013,
##       "y": 53.5,
##       "z": -0.499
##     },
##     {
##       "age": 0.1588,
##       "xname": "age",
##       "yname": "hgt",
##       "zname": "hgt_z",
##       "zref": "nl_1997_hgt_female_nl",
##       "x": 0.1588,
##       "y": 56,
##       "z": -0.261
##     },
##     {
##       "age": 0.2355,
##       "xname": "age",
##       "yname": "hgt",
##       "zname": "hgt_z",
##       "zref": "nl_1997_hgt_female_nl",
##       "x": 0.2355,
##       "y": 59.5,
##       "z": 0.163
##     },
##     {
##       "age": 0.4846,
##       "xname": "age",
##       "yname": "hgt",
##       "zname": "hgt_z",
##       "zref": "nl_1997_hgt_female_nl",
##       "x": 0.4846,
##       "y": 65.5,
##       "z": -0.259
##     },
##     {
##       "age": 0.7529,
##       "xname": "age",
##       "yname": "hgt",
##       "zname": "hgt_z",
##       "zref": "nl_1997_hgt_female_nl",
##       "x": 0.7529,
##       "y": 71.5,
##       "z": 0.131
##     },
##     {
##       "age": 1.0212,
##       "xname": "age",
##       "yname": "hgt",
##       "zname": "hgt_z",
##       "zref": "nl_1997_hgt_female_nl",
##       "x": 1.0212,
##       "y": 75,
##       "z": -0.18
##     },
##     {
##       "age": 1.2512,
##       "xname": "age",
##       "yname": "hgt",
##       "zname": "hgt_z",
##       "zref": "nl_1997_hgt_female_nl",
##       "x": 1.2512,
##       "y": 80,
##       "z": 0.421
##     },
##     {
##       "age": 1.5387,
##       "xname": "age",
##       "yname": "hgt",
##       "zname": "hgt_z",
##       "zref": "nl_1997_hgt_female_nl",
##       "x": 1.5387,
##       "y": 84,
##       "z": 0.527
##     },
##     {
##       "age": 2.0397,
##       "xname": "age",
##       "yname": "hgt",
##       "zname": "hgt_z",
##       "zref": "nl_1997_hgt_female_nl",
##       "x": 2.0397,
##       "y": 90,
##       "z": 0.67
##     },
##     {
##       "age": 0,
##       "xname": "age",
##       "yname": "wgt",
##       "zname": "wgt_z",
##       "zref": "nl_1997_wgt_female_nl",
##       "x": 0,
##       "y": 2.95,
##       "z": -1.055
##     },
##     {
##       "age": 0.1013,
##       "xname": "age",
##       "yname": "wgt",
##       "zname": "wgt_z",
##       "zref": "nl_1997_wgt_female_nl",
##       "x": 0.1013,
##       "y": 4.18,
##       "z": -0.162
##     },
##     {
##       "age": 0.1588,
##       "xname": "age",
##       "yname": "wgt",
##       "zname": "wgt_z",
##       "zref": "nl_1997_wgt_female_nl",
##       "x": 0.1588,
##       "y": 5,
##       "z": 0.401
##     },
##     {
##       "age": 0.2355,
##       "xname": "age",
##       "yname": "wgt",
##       "zname": "wgt_z",
##       "zref": "nl_1997_wgt_female_nl",
##       "x": 0.2355,
##       "y": 5.9,
##       "z": 0.717
##     },
##     {
##       "age": 0.4846,
##       "xname": "age",
##       "yname": "wgt",
##       "zname": "wgt_z",
##       "zref": "nl_1997_wgt_female_nl",
##       "x": 0.4846,
##       "y": 8.24,
##       "z": 1.173
##     },
##     {
##       "age": 0.7529,
##       "xname": "age",
##       "yname": "wgt",
##       "zname": "wgt_z",
##       "zref": "nl_1997_wgt_female_nl",
##       "x": 0.7529,
##       "y": 9.65,
##       "z": 1.052
##     },
##     {
##       "age": 1.0212,
##       "xname": "age",
##       "yname": "wgt",
##       "zname": "wgt_z",
##       "zref": "nl_1997_wgt_female_nl",
##       "x": 1.0212,
##       "y": 10.95,
##       "z": 1.164
##     },
##     {
##       "age": 1.2512,
##       "xname": "age",
##       "yname": "wgt",
##       "zname": "wgt_z",
##       "zref": "nl_1997_wgt_female_nl",
##       "x": 1.2512,
##       "y": 11.9,
##       "z": 1.247
##     },
##     {
##       "age": 1.5387,
##       "xname": "age",
##       "yname": "wgt",
##       "zname": "wgt_z",
##       "zref": "nl_1997_wgt_female_nl",
##       "x": 1.5387,
##       "y": 12.8,
##       "z": 1.228
##     },
##     {
##       "age": 2.0397,
##       "xname": "age",
##       "yname": "wgt",
##       "zname": "wgt_z",
##       "zref": "nl_1997_wgt_female_nl",
##       "x": 2.0397,
##       "y": 13.9,
##       "z": 0.989
##     },
##     {
##       "age": 0.1013,
##       "xname": "age",
##       "yname": "hdc",
##       "zname": "hdc_z",
##       "zref": "nl_1997_hdc_female_nl",
##       "x": 0.1013,
##       "y": 37.6,
##       "z": 0.418
##     },
##     {
##       "age": 0.1588,
##       "xname": "age",
##       "yname": "hdc",
##       "zname": "hdc_z",
##       "zref": "nl_1997_hdc_female_nl",
##       "x": 0.1588,
##       "y": 39,
##       "z": 0.605
##     },
##     {
##       "age": 0.2355,
##       "xname": "age",
##       "yname": "hdc",
##       "zname": "hdc_z",
##       "zref": "nl_1997_hdc_female_nl",
##       "x": 0.2355,
##       "y": 40.5,
##       "z": 0.696
##     },
##     {
##       "age": 0.4846,
##       "xname": "age",
##       "yname": "hdc",
##       "zname": "hdc_z",
##       "zref": "nl_1997_hdc_female_nl",
##       "x": 0.4846,
##       "y": 44.1,
##       "z": 1.021
##     },
##     {
##       "age": 0.7529,
##       "xname": "age",
##       "yname": "hdc",
##       "zname": "hdc_z",
##       "zref": "nl_1997_hdc_female_nl",
##       "x": 0.7529,
##       "y": 46.6,
##       "z": 1.418
##     },
##     {
##       "age": 1.0212,
##       "xname": "age",
##       "yname": "hdc",
##       "zname": "hdc_z",
##       "zref": "nl_1997_hdc_female_nl",
##       "x": 1.0212,
##       "y": 47.8,
##       "z": 1.307
##     },
##     {
##       "age": 1.2512,
##       "xname": "age",
##       "yname": "hdc",
##       "zname": "hdc_z",
##       "zref": "nl_1997_hdc_female_nl",
##       "x": 1.2512,
##       "y": 48.7,
##       "z": 1.373
##     },
##     {
##       "age": 1.5387,
##       "xname": "age",
##       "yname": "hdc",
##       "zname": "hdc_z",
##       "zref": "nl_1997_hdc_female_nl",
##       "x": 1.5387,
##       "y": 49.2,
##       "z": 1.246
##     },
##     {
##       "age": 2.0397,
##       "xname": "age",
##       "yname": "hdc",
##       "zname": "hdc_z",
##       "zref": "nl_1997_hdc_female_nl",
##       "x": 2.0397,
##       "y": 50,
##       "z": 1.224
##     },
##     {
##       "age": 0,
##       "xname": "age",
##       "yname": "bmi",
##       "zname": "bmi_z",
##       "zref": "nl_1997_bmi_female_nl",
##       "x": 0,
##       "y": 12.8038,
##       "z": 0.259
##     },
##     {
##       "age": 0.1013,
##       "xname": "age",
##       "yname": "bmi",
##       "zname": "bmi_z",
##       "zref": "nl_1997_bmi_female_nl",
##       "x": 0.1013,
##       "y": 14.6039,
##       "z": 0.231
##     },
##     {
##       "age": 0.1588,
##       "xname": "age",
##       "yname": "bmi",
##       "zname": "bmi_z",
##       "zref": "nl_1997_bmi_female_nl",
##       "x": 0.1588,
##       "y": 15.9439,
##       "z": 0.701
##     },
##     {
##       "age": 0.2355,
##       "xname": "age",
##       "yname": "bmi",
##       "zname": "bmi_z",
##       "zref": "nl_1997_bmi_female_nl",
##       "x": 0.2355,
##       "y": 16.6655,
##       "z": 0.734
##     },
##     {
##       "age": 0.4846,
##       "xname": "age",
##       "yname": "bmi",
##       "zname": "bmi_z",
##       "zref": "nl_1997_bmi_female_nl",
##       "x": 0.4846,
##       "y": 19.2063,
##       "z": 1.688
##     },
##     {
##       "age": 0.7529,
##       "xname": "age",
##       "yname": "bmi",
##       "zname": "bmi_z",
##       "zref": "nl_1997_bmi_female_nl",
##       "x": 0.7529,
##       "y": 18.8762,
##       "z": 1.325
##     },
##     {
##       "age": 1.0212,
##       "xname": "age",
##       "yname": "bmi",
##       "zname": "bmi_z",
##       "zref": "nl_1997_bmi_female_nl",
##       "x": 1.0212,
##       "y": 19.4667,
##       "z": 1.78
##     },
##     {
##       "age": 1.2512,
##       "xname": "age",
##       "yname": "bmi",
##       "zname": "bmi_z",
##       "zref": "nl_1997_bmi_female_nl",
##       "x": 1.2512,
##       "y": 18.5937,
##       "z": 1.394
##     },
##     {
##       "age": 1.5387,
##       "xname": "age",
##       "yname": "bmi",
##       "zname": "bmi_z",
##       "zref": "nl_1997_bmi_female_nl",
##       "x": 1.5387,
##       "y": 18.1406,
##       "z": 1.277
##     },
##     {
##       "age": 2.0397,
##       "xname": "age",
##       "yname": "bmi",
##       "zname": "bmi_z",
##       "zref": "nl_1997_bmi_female_nl",
##       "x": 2.0397,
##       "y": 17.1605,
##       "z": 0.825
##     },
##     {
##       "age": 0.1013,
##       "xname": "age",
##       "yname": "dsc",
##       "zname": "dsc_z",
##       "zref": "ph_2023_dsc_female_40",
##       "x": 0.1013,
##       "y": 15.56,
##       "z": -0.094
##     },
##     {
##       "age": 0.1588,
##       "xname": "age",
##       "yname": "dsc",
##       "zname": "dsc_z",
##       "zref": "ph_2023_dsc_female_40",
##       "x": 0.1588,
##       "y": 17.69,
##       "z": -0.075
##     },
##     {
##       "age": 0.2355,
##       "xname": "age",
##       "yname": "dsc",
##       "zname": "dsc_z",
##       "zref": "ph_2023_dsc_female_40",
##       "x": 0.2355,
##       "y": 20.57,
##       "z": -0.125
##     },
##     {
##       "age": 0.4846,
##       "xname": "age",
##       "yname": "dsc",
##       "zname": "dsc_z",
##       "zref": "ph_2023_dsc_female_40",
##       "x": 0.4846,
##       "y": 25.55,
##       "z": -1.553
##     },
##     {
##       "age": 0.7529,
##       "xname": "age",
##       "yname": "dsc",
##       "zname": "dsc_z",
##       "zref": "ph_2023_dsc_female_40",
##       "x": 0.7529,
##       "y": 43.75,
##       "z": 0.672
##     },
##     {
##       "age": 1.0212,
##       "xname": "age",
##       "yname": "dsc",
##       "zname": "dsc_z",
##       "zref": "ph_2023_dsc_female_40",
##       "x": 1.0212,
##       "y": 50.92,
##       "z": 0.708
##     },
##     {
##       "age": 1.2512,
##       "xname": "age",
##       "yname": "dsc",
##       "zname": "dsc_z",
##       "zref": "ph_2023_dsc_female_40",
##       "x": 1.2512,
##       "y": 54.34,
##       "z": 0.319
##     },
##     {
##       "age": 1.5387,
##       "xname": "age",
##       "yname": "dsc",
##       "zname": "dsc_z",
##       "zref": "ph_2023_dsc_female_40",
##       "x": 1.5387,
##       "y": 56.65,
##       "z": -0.385
##     },
##     {
##       "age": 2.0397,
##       "xname": "age",
##       "yname": "dsc",
##       "zname": "dsc_z",
##       "zref": "ph_2023_dsc_female_40",
##       "x": 2.0397,
##       "y": 70.05,
##       "z": 1.536
##     },
##     {
##       "age": 0,
##       "xname": "hgt",
##       "yname": "wfh",
##       "zname": "wfh_z",
##       "zref": "nl_1997_wfh_female_nla",
##       "x": 48,
##       "y": 2.95
##     },
##     {
##       "age": 0.1013,
##       "xname": "hgt",
##       "yname": "wfh",
##       "zname": "wfh_z",
##       "zref": "nl_1997_wfh_female_nla",
##       "x": 53.5,
##       "y": 4.18,
##       "z": 0.215
##     },
##     {
##       "age": 0.1588,
##       "xname": "hgt",
##       "yname": "wfh",
##       "zname": "wfh_z",
##       "zref": "nl_1997_wfh_female_nla",
##       "x": 56,
##       "y": 5,
##       "z": 0.764
##     },
##     {
##       "age": 0.2355,
##       "xname": "hgt",
##       "yname": "wfh",
##       "zname": "wfh_z",
##       "zref": "nl_1997_wfh_female_nla",
##       "x": 59.5,
##       "y": 5.9,
##       "z": 0.744
##     },
##     {
##       "age": 0.4846,
##       "xname": "hgt",
##       "yname": "wfh",
##       "zname": "wfh_z",
##       "zref": "nl_1997_wfh_female_nla",
##       "x": 65.5,
##       "y": 8.24,
##       "z": 1.728
##     },
##     {
##       "age": 0.7529,
##       "xname": "hgt",
##       "yname": "wfh",
##       "zname": "wfh_z",
##       "zref": "nl_1997_wfh_female_nla",
##       "x": 71.5,
##       "y": 9.65,
##       "z": 1.342
##     },
##     {
##       "age": 1.0212,
##       "xname": "hgt",
##       "yname": "wfh",
##       "zname": "wfh_z",
##       "zref": "nl_1997_wfh_female_nla",
##       "x": 75,
##       "y": 10.95,
##       "z": 1.726
##     },
##     {
##       "age": 1.2512,
##       "xname": "hgt",
##       "yname": "wfh",
##       "zname": "wfh_z",
##       "zref": "nl_1997_wfh_female_nla",
##       "x": 80,
##       "y": 11.9,
##       "z": 1.379
##     },
##     {
##       "age": 1.5387,
##       "xname": "hgt",
##       "yname": "wfh",
##       "zname": "wfh_z",
##       "zref": "nl_1997_wfh_female_nla",
##       "x": 84,
##       "y": 12.8,
##       "z": 1.242
##     },
##     {
##       "age": 2.0397,
##       "xname": "hgt",
##       "yname": "wfh",
##       "zname": "wfh_z",
##       "zref": "nl_1997_wfh_female_nla",
##       "x": 90,
##       "y": 13.9,
##       "z": 0.82
##     }
##   ],
##   "screeners": [
##     {
##       "Categorie": 1000,
##       "CategorieOmschrijving": "Lengte",
##       "Code": 1031,
##       "CodeOmschrijving": "Het advies volgens de JGZ-richtlijn lengtegroei is als volgt: In principe geen verwijzing nodig, naar eigen inzicht handelen.",
##       "Versie": "1.23.0",
##       "Leeftijd": 2.0397
##     },
##     {
##       "Categorie": 2000,
##       "CategorieOmschrijving": "Gewicht",
##       "Code": 2075,
##       "CodeOmschrijving": "Het advies volgens de JGZ-richtlijn ondergewicht is als volgt: Sterke gewichtsafname (-1 SD), advies: Is er sprake van een afwijkende voedingstoestand en/of klachten of symptomen die kunnen wijzen op onderliggende ziekte of problemen? Indien ja, Verwijzen naar kinderarts. Indien nee, dan is er in principe geen verwijzing nodig. Naar eigen inzicht handelen.",
##       "Versie": "1.23.0",
##       "Leeftijd": 2.0397
##     },
##     {
##       "Categorie": 3000,
##       "CategorieOmschrijving": "Hoofdomtrek",
##       "Code": 3021,
##       "CodeOmschrijving": "De richtlijn hoofdomtrek is bedoeld voor kinderen tot 1 jaar.",
##       "Versie": "1.23.0",
##       "Leeftijd": 2.0397
##     }
##   ]
## }

Resources

Internal

Description Status
Changelog open
OpenAPI specification open
Source files open
JSON data schema 3.0 open
JAMES issue tracker open

External

Description Status
JAMES demo current
Basisdataset JGZ current
OpenCPU API current