Adding a diagnosis

<< Click to Display Table of Contents >>

Navigation:  Technical documentation > Importing data >

Adding a diagnosis

Previous pageReturn to chapter overviewNext page

Finding the ListId (coding system)

Adding a diagnosis is relativeliy straightforward, but requires a little bit preparation.  In FastTrak terminology, a diagnosis is a ClinProblem.  A ClinProblem is a coded value from a list.  To find the correct list you will need to look at the data in the table MetaNomList.  

 

Add a clinical problem

Armed with the PersonId, problem code (e.g. ICPC or ICD10 code) and the ListId, you may add a problem with the procedure AddClinProblem.

 

EXEC AddClinProblem 233,'E11',1,'2002-01-20','A',3444

 

This is the definition of the procedure, as extracted from the FastTrak database.

 

PROCEDURE AddClinProblem( @PersonId INT, @ProbCode VARCHAR(8), @ListId INT, 

 @ProbDebut DateTime = NULL, @ProbType CHAR(1) = 'A', @BatchId INT = NULL ) AS

 

Parameter

NULLABLE?

Comment

PersonId

NOT NULL

The Person this ClinProblem is for

ProbCode

NOT NULL

A valid problem code, which is an ItemCode from the MetaNomItem table.

ListId

NOT NULL

Refers to a valid vocabulary/coding system from MetaNomList.

ProbDebut

NULLABLE

The first occurrence of this problem.  If the procedure is called multiple times, the stored ProbDebut will be the earliest date used.  If no date is given, the function getdate() is used (current time).

ProbType

NULLABLE

A valid ProbType from MetaProblemType, enforced with foreign key constraint.

BatchId

NULLABLE

A valid BatchId, enforced with a foreign key constraint to the ImportBatch table.

 

Comments

It is not only necessary that ListId and ProbCode are valid by themselves, the combination must also be valid.  This means that an ICPC code can not be stored with an ICD 10 list, and unknown codes are not saved.  Problems are normally stored with the status "A" (see MetaProblemType).