OHI Value-Based Payments
 PreviousHomeNext 
3.2 Dynamic Free Fields, Codes and RecordsBook Index3.2.3 Dynamic Records Values

3.2.2 Code Values

Update requests for code dynamic fields are handled similar to those for free fields, with the exception of multi-valued code fields. The reason is that a code always has key field; in other words, it is possible to pinpoint the exact code that you want to update, allowing a more subtle update feature.

Sending in a new value for a single-value non-time-valid code field results in the replacement of the old value with the new. Sending in a new value for a single-value time-valid code field will delete any values with a later start date, will cut off any overlapping value with an earlier start date, but will not touch any existing value that is end-dated before the start date of the new value.

Sending in (a) value(s) for a multi-valued non-time-valid code field can only ever result in the addition of a new code value to the field. This happens when the update includes a code value that is not among the existing values. Existing values (regardless of whether they are included in the update) are left untouched.

Sending in (a) value(s) for multi-valued time-valid will add new code values if the value is not among the existing code values for that field. In case the same code is among the existing values, then the values (for the same code) with a later start date are deleted, the values for the same code with an overlap and an earlier start date are cut off. Code values that are not in the update request are left untouched.

The following pseudo XML reflects the structure of a single-value time-valid code field:

<dynamicField
  name="primaryDiagnosis"
>
  <value
    startDate="2010-05-23"
    flexCodeDefinitionCode="ICD09_V_DIAGNOSES"
  >V51
  </value>
</dynamicField>

The flexCodeDefinitionCode attribute is used to disambiguate between code definitions. This is a fairly exceptional situation, since it is unusual for different code systems (used in the same context) to have overlapping codes. For example, suppose the field refers to a diagnosis code and the value is V51. Since both the ICD09 and the ICD10 code systems know a diagnosis code V51, the <value> element needs to specify which of the two systems is the intended one.

The following XML shows an example update for a single-value time-valid code field with consecutive values in time:

<dynamicField 
  name="occupation"
  >
  <value 
    startDate="2005-01-01"
    endDate="2007-12-31"
  >NURSE</value>
  <value 
    startDate="2008-01-01"
  >GP</value>
</dynamicField>
 PreviousHomeNext 
3.2 Dynamic Free Fields, Codes and Records3.2.3 Dynamic Records Values