Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A PUT to the patients/status endpoint is used to update a patient's search status with the Search & Match Service.  Allowable status values are SUS, PRE, ACT and STP.  A new patient is defaulted to the new (NEW) state.  Under the NEW state, searches must be requested explicitly.  When doing so, the patient is moved to the PRE state. Under the ACT state, searches will be kept up to date automatically.  SUS will stop automatic updates to searches, but results will remain for 42 days.  STP will terminate the search and delete all search results.

PlantUML Render Macro

@startuml
start
:API/GUI; 
note right: Patient registry

:Create patient; 
:Patient status = "NEW"; 
note right: Patient status cannot be changed
split 
  switch (Change status) 
  case (PRE, SUS or ACT) 
    :Not allowed;
    stop
  case (STP) 
    :Patient status = "STP";
    stop
  endswitch
split again 
:Start search;
:Patient status = "PRE" \n\
No nightly updates of search results; 
note right: Patient status changed happened automatically due to start search
repeat
  switch (Change status) 
    case (NEW, PRE) 
      if (current state) is (PRE) then 
      else (\n\nSTP, SUS or ACT\n)
        :Not allowed;
        stop
      endif
    case (SUS)  
      :Patient status = "SUS" \n\
No nightly updates of search results; 
    case (ACT)  
      :Patient status = "ACT" \n\
Nightly updates of search results; 
    case (STP) 
      :Patient status = "STP";
    endswitch
repeat while (change status again?) is (yes) 
->no;
stop
@enduml


Put
patients/status
Expand
titleRequest...
FieldDetails
wmdaId*integer
example: 123456

nullable: false
newStatus*

string
nullable: false

Enum:
Array [ 4 ]

changeReasonstring
nullable: true

Reason why the change was made. Mandatory when changing to "STP"

Enum:
Array [ 21 ]
Expand
titleResponse...
FieldDetails
wmdaId*integer
example: 123456

nullable: false
status*

string
maxLength: 3

nullable: false

Enum:
Array [ 4 ]

changeReasonstring
maxLength: 3

nullable: true

Reason why the change was made. Mandatory when changing to "STP"

Enum:
Array [ 21 ]

...