Q: The dGC API Server is open source, so should I be self-hosting it?
A: No. In general, people should not be self hosting the API server. Only the version deployed and managed by the RCPCH team is warranted to be correct. If you are running the code on your own server then you must be prepared to have the appropriate clinical and technical assurance performed. You would require MHRA registration for your medical device. By using the RCPCH-provided API you avoid all that requirement and use our commodity server.
Q: Where is all your dGC code?
A: All the code for all our Digital Growth Chart work is publicly available on GitHub.
- RCPCH GitHub Organisation
- Centiles and Growth Charts API Server (Python/Flask)
- Demo/Reference client (React) which powers https://growth.rcpch.ac.uk/
- React Component which renders the Chart in the React client - this is also available via NPM
Q: Why did you build the API in Python?
A: It’s a well-used, stable language, which has a good scientific and research user-base. It’s also accessible to relatively new coders (eg clinicians) who might want to help contribute to the project.
Q: Is entering a gestation age mandatory? from a DPCHR implementer perspective, if a birth notification has not flowed into the DPCHR, suppliers will need to require parents to enter it.
A: Gestational age is not mandatory. If it is not supplied then the child will be assumed to be born at term (ie between 37 and 42 weeks) and for the UK-WHO charts, the standard term references will be used for calculations and charts.
Q: Is corrected gestational age passed back by the API, or do implementers have to calculate it?
A: Yes, corrected age is passed back by the API, if a gestational age is included in the request.
The API can only correct for gestational age if a gestational age has been supplied.
This correction is applied up to the corrected age of 1 year for preterm children born above 32 weeks, and to the corrected age of 2 years for preterm children born below 32 weeks, which is accepted standard practice among paediatricians.
Q: Does my application need to validate inputs?
A: The API has validation and error handling for out-of-range requests, but it is good practice for the front-end software to also reject input values that are out of range since this feedback can be shown to the user, by the application.
Q: Is there a source from where we can get a list of extreme input values to use for our validation?
A: Yes, we have included one in our source code: Validation Constants . This is what is used internally to validate API inputs and also used by the internal
rcpchgrowth Python module to validate inputs to the
Q: If we have a calculated centile or SDS from the API then why do we need the traditional ‘curved-lines’ growth charts at all?
A: Good question. Maybe, in time, this style of chart will no longer be needed.
The traditional growth charts were actually a form of paper calculator for the centile values. You plotted the age and the height/weight data and you then looked for which centile lines it was between, and this was the read-off data.
The Growth Charts API obviates the need for this step since we calculate the centiles for you. However, another important function of the chart was to visualise trends in the growth. Our API does not do this, so there will be a need for some form of chart to visualise the trend.
Initially we expect that clinical users will want to see the traditional growth chart, out of simple familiarity. But in time we think that researchers may develop better visualisations of the trend in centiles/SDS that don’t have to come on such confusing curvy charts. The future of displaying growth trends is entirely open to new ideas and innovation.
Q: Would it be good enough to plot the returned centile values on a pre-prepared image of a growth chart?
A: Maybe. It would depend on the implementation.
Images of charts are definitely not good enough for calculating a centile from, although many GP software packages do it this way, it’s poor practice and it’s why the API needed to exist in the first place. BUT, since we are calculating the centiles for you, then the chart is only for displaying the trend. An image could be used, but we would advise against it generally.
The problem with images is that it is very easy to accidentally have an offset or scaling error that means that some plotted points are in the right place, and some are not. Best practice is always to use the same vector graphic tooling to both construct the lines and plot the points, to avoid offsets/scaling inaccuracy. If you are using an image (please don’t) then you must ensure you’re selecting the correct one for the data you’re presenting, and that the scaling and offset is not just programmed to be correct, but clinically tested to be correct!