Construct a single chart code from user input

create_chartcode(
  chartgrp = c("nl2010", "preterm", "who", "gsed1", "gsed1pt"),
  etn = c("nl", "tu", "ma", "hs", "ds"),
  sex = c("male", "female"),
  agegrp = c("0-15m", "0-4y", "1-21y", "0-21y", "0-4ya"),
  side = c("front", "back", "-hdc", "both", "hgt", "wgt", "hdc", "bmi", "wfh", "dsc"),
  week = 40,
  language = c("dutch", "english"),
  version = ""
)

Arguments

chartgrp

The chart group: 'nl2010', 'preterm', 'who', 'gsed1' or 'gsed1pt'.

etn

Either 'nl', 'tu', 'ma', 'hs' or 'ds'. May also be abbreviates to a single letter.

sex

Either 'male' or 'female'

agegrp

Either '0-15m', '0-4y', '1-21y', '0-21y' or '0-4ya'. Age group '0-4ya' provides the 0-4 chart with weight for age (design E).

side

Either 'front', 'back', '-hdc', 'both', 'hgt', 'wgt', 'hdc', 'bmi', 'wfh' or 'dsc'.

week

A number between 25 and 36 gestational age (preterm) or 40 for term (default).

language

Language: 'dutch' or 'english'

version

Version number. Default is to have no version number.