Skip to content

Instantly share code, notes, and snippets.

@jacksmith15
Last active June 11, 2019 09:46
Show Gist options
  • Save jacksmith15/605fa2033b4b75ee6621f282ec06a9de to your computer and use it in GitHub Desktop.
Save jacksmith15/605fa2033b4b75ee6621f282ec06a9de to your computer and use it in GitHub Desktop.

Clinician change summary

Summary of changes to DDF payload triggered by data model change

Before

  • Clinicians are found as an array of referral_clinicians, under an attribute with the same name.
  • Each referral_clinician contains:
    • a clinician (see below)
    • an organisation_uid reference
    • a referral_clinician_role_uid reference (always null)
    • a referral_uid reference (always the same as the outer referral)
    • a uid primary key (transient)
  • Each clinician contains:
    • uid primary key (transient)
    • name and contact details
    • role, which indicates whether the clinician is the responsible clinician on the referral, or an additional clinician.

Issues with this structure

Note that there are two role fields, one outer, unused role, and one inner role.

  • The outer role is unused by any writing service, and so is redundant and should not be integrated with.
  • The inner role is used to indicate whether a clinician is responsible or additional in the context of the referral. This is invalid, as we are required by NR-42 to be able to use the same clinician in different roles on different referrals.

Further, the referral_clinician with organisation and clinician are created with a one-to-one relationship, and so it is unnecessary to use two objects for this resource.

{
   "referral_clinicians": [
     {
       "clinician": {
         "departmental_address": "Someplace",
         "email_address": "[email protected]",
         "forename": "Carla",
         "phone_number": "(130)817-6963",
         "profession_registration_number": null,
         "role": null,
         "role_cid": null,
         "surname": "Camacho",
         "uid": "0483231c-527b-46fc-8137-9ca7d3b4746f"
       },
       "clinician_uid": "0483231c-527b-46fc-8137-9ca7d3b4746f",
       "organisation_uid": "e2b7a612-da36-1b4d-b253-5bf1c1a53d62",
       "referral_clinician_role_cid": "01672188-28e1-4218-b069-07b8d5a66132",
       "referral_uid": "54994829-3fdd-4d34-bb53-263ae5064624",
       "uid": "49a5446a-9898-43b6-9fa5-23cf5118cbef"
     },
     {
       "clinician": {
         "departmental_address": "Someplace",
         "email_address": "[email protected]",
         "forename": "Timothy",
         "phone_number": "1-909-778-7723x39917",
         "profession_registration_number": null,
         "role": {
           "code": "responsibleClinician",
           "codesystem_uri": "referral_clinician_role",
           "display": "Responsible Clinician",
           "uid": "960fb392-a258-4626-a476-a50a89845169"
         },
         "role_cid": "960fb392-a258-4626-a476-a50a89845169",
         "surname": "Jones",
         "uid": "ccd93039-59e6-4ab4-a07f-975e95a1a42c"
       },
       "clinician_uid": "ccd93039-59e6-4ab4-a07f-975e95a1a42c",
       "organisation_uid": "ee0f9ba1-1ac4-41a7-b76c-e8b74e143bf0",
       "referral_clinician_role_cid": null,
       "referral_uid": "54994829-3fdd-4d34-bb53-263ae5064624",
       "uid": "66752705-0258-497b-a6ee-c204ef7a172a"
     }
   ]
}

After

  • role is removed, and instead replaced with two separate atributes which describe the clinician's role

    • responsible_clinician - a single clinician object (following FHIR)
    • additional_clinicians - an array of new clinician objects
      • this allows clinician objects to exist independently of a referral, making NR-42 (controlled clinician list) possible.
  • organisation_uid is moved to the clinician object (this brings the NGIS clinician in line with a FHIR Practitioner Role resource.)

{
   "additional_clinicians": [
     {
       "clinician": {
         "departmental_address": "Someplace",
         "email_address": "[email protected]",
         "forename": "Carla",
         "organisation_uid": "ee0f9ba1-1ac4-41a7-b76c-e8b74e143bf0",
         "phone_number": "(130)817-6963",
         "profession_registration_number": null,
         "surname": "Camacho",
         "uid": "0483231c-527b-46fc-8137-9ca7d3b4746f"
       },
       "clinician_uid": "0483231c-527b-46fc-8137-9ca7d3b4746f",
       "referral_uid": "54994829-3fdd-4d34-bb53-263ae5064624",
       "uid": "49a5446a-9898-43b6-9fa5-23cf5118cbef"
     }
   ],
   "responsible_clinician": {
     "departmental_address": "Someplace",
     "email_address": "[email protected]",
     "forename": "Timothy",
     "organisation_uid": "ee0f9ba1-1ac4-41a7-b76c-e8b74e143bf0",
     "phone_number": "1-909-778-7723x39917",
     "profession_registration_number": null,
     "surname": "Jones",
     "uid": "ccd93039-59e6-4ab4-a07f-975e95a1a42c"
   },
   "responsible_clinician_uid": "ccd93039-59e6-4ab4-a07f-975e95a1a42c"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment