<commit_before>import JoiBase from 'joi';
import JoiNHSNumber from '../../../../shared/lib/joi-nhs-number-validator';
import {postHandlerFactory, getHandlerFactory} from './common';

const Joi = JoiBase.extend(JoiNHSNumber);

const schema = Joi.object().keys({
  'nhs-number-known': Joi.boolean().required()
    .meta({
      componentType: 'multiple-choice',
      children: [
        { label: 'Yes', value: 'true' },
        { label: 'No', value: 'false' },
      ],
      variant: 'radio',
    })
    .options({
      language: {
        any: { required: '!!Please tell us if you know your NHS number' },
      },
    }),
  'submit': Joi.any().optional().strip(),
});

const title = 'Do you know your NHS number?';
const key = 'nhsNumber';
const slug = 'nhs-number';
const extraInfo = 'An NHS number is a 10 digit number, for example: <strong>943 476 5919</strong><br>Providing your NHS number will help {{ CURRENT_PRACTICE.name | default("the GP practice") }} find your medical records quickly.';

const details = {
  summary: 'How to find your NHS number',
  content: 'You can find your NHS number:<ul><li>on a printed prescription</li><li>on a letter from your GP or a hospital</li><li>on your NHS medical card if you have one</li></ul>',
  position: 'below'
};

const handlers = {
  GET: (prevSteps) => getHandlerFactory(key, title, schema, prevSteps, details, null,  extraInfo),
  POST: (prevSteps, nextSteps) => postHandlerFactory(key, title, schema, prevSteps, nextSteps),
};

/**
 * @type Step
 */
export default {
  key,
  slug,
  title,
  schema,
  handlers
};<commit_msg>Update nhs-number.js<commit_after>import JoiBase from 'joi';
import JoiNHSNumber from '../../../../shared/lib/joi-nhs-number-validator';
import {postHandlerFactory, getHandlerFactory} from './common';

const Joi = JoiBase.extend(JoiNHSNumber);

const schema = Joi.object().keys({
  'nhs-number-known': Joi.boolean().required()
    .meta({
      componentType: 'multiple-choice',
      children: [
        { label: 'Yes', value: 'true' },
        { label: 'No', value: 'false' },
      ],
      variant: 'radio',
    })
    .options({
      language: {
        any: { required: '!!Please tell us if you know your NHS number' },
      },
    }),
  'submit': Joi.any().optional().strip(),
});

const title = 'Do you know your NHS number?';
const key = 'nhsNumber';
const slug = 'nhs-number';
const extraInfo = 'An NHS number is a 10 digit number, for example: <strong>943 476 5919</strong><br>Providing your NHS number will help {{ CURRENT_PRACTICE.name | default("the GP practice") }} find your medical records quickly.';

const details = {
  summary: 'How to find your NHS number',
  content: 'You can find your NHS number:<ul><li>on a printed prescription</li><li>on a GP or hospital letter</li><li>by asking your current GP</li></ul>',
  position: 'below'
};

const handlers = {
  GET: (prevSteps) => getHandlerFactory(key, title, schema, prevSteps, details, null,  extraInfo),
  POST: (prevSteps, nextSteps) => postHandlerFactory(key, title, schema, prevSteps, nextSteps),
};

/**
 * @type Step
 */
export default {
  key,
  slug,
  title,
  schema,
  handlers
};
{'fraction_non_alphanumeric': 0.15873015873015872, 'fraction_numerical': 0.007619047619047619, 'mean_word_length': 3.6134699853587118, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4622217', 'n_tokens_mistral': 1043, 'n_tokens_neox': 1009, 'n_words': 310}