Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Overview

Requisition numberA shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier. All services requests that were created as a part of a single encounter of care will have the same requisition number.

Requirements

  1. Must be the same for all entities (service requests) related to the single

...

  1. encounter

  2. Must be unique among all encounters

  3. Not a sequence - so no-one can generate new Requisition based on knowledge of the existing one

  4. Must be easy to read and pass a number to other person via any channel: orally, phone, sms

  5. Must contain only numbers and some letters that looks the same in Cyrillic and Latin alphabet and can be entered via the phone keypad: A, B, C, E, H, I, K, M, O, P, T, X

Solution

Requisition number has the following structure

0123-4567-89AB-CEIK - 4 blocks that contains 4 characters with total length 16 characters

Implement a hashing function with episode of careencounter ID and salt as an argument

  1. Salt is empty by default

  2. Get a digest (hex) of hashing on episode encounter ID (it is proposed to use 8 bytes digest size)

  3. Convert digest into required character set

  4. Format result

This example shows how to get requisition 

...

Code Block
languagetext
01EM-TC40-CAXX-E2HE
00EB-EB34-BMX7-9COA
00HE-KKM9-BT16-0T8T
0223-T16C-PKX1-P6TA
01KO-2O85-K2T7-C8HP
01I8-K828-8440-0T8E
02I0-8BCM-H383-T825
02CX-K1AM-8E84-9TTO
01BM-78KH-TTMP-MHK2
00C1-T2A2-X8AK-XBKA
02X1-A744-IOOE-ET2B
007C-H1C4-BEAP-3C45
02M9-9XT7-KA79-5600
0112-B2M1-H58H-66A2
011E-MX7H-M027-X60A
01B4-HC53-062X-P2KM
00E8-3C96-T18A-2P6O

The proposed solution means that after new requisition number was generated we should check that it is unique in the DB.

If it is not unique - generate salt and and generate new requisition number with episode of care ID + salt

Repeat this until we get unique requisition number. Save salt to DB in order to generate the same requisition number for the same episode of careencounter.

Data model

Proposed storage structure

Attribute

Type

Nullable

Description

entity_id

uuid

N


requisition

string

N


entity_type

string

N

Enum:

  • episode _ of _ care encounter

Open questions

  1. Read existing requisition from DB or generate anyway based on episode and salt