DiagnosisService
The DiagnosisService is used to retrieve visit diagnosis data from Cerner.
Import
The DiagnosisService should be imported and initialized in the component source that is responsible for displaying data from the service. Alternatively, if you have your required payload information available, you can initialize the loading of your data in the app.component.ts source.
V4+ import { DiagnosisService } from '@clinicaloffice/clinical-office-mpage-core'; < V3 import { DiagnosisService } from '@clinicaloffice/clinical-office-mpage';
Initialization
Once you have imported the DiagnosisService, you need to inject it into your component and assign it to a variable. This is done through the constructor of your component (or the app.component.ts file).
export class myComponent implements OnInit { constructor(public diagnosisService: DiagnosisService) { } }
Initialization can be performed one of three ways.
-
In the ngOnInit() method of your app.component.ts or component file through a payload tag and direct
call to the mPageService executeCCL method.
ngOnInit() { this.mpage.executeCCL({ payload: { patientSource: [{personId: 0, encntrId: 0}], diagnosis: { } } }); }
-
Call the DiagnosisService load method from the ngOnInit() method of your app.component.ts or component file.
ngOnInit() { this.diagnosisService.load(); }
-
Executed dynamically from your HTML with the DiagnosisService get method.
<p>Patient Diagnosis:</p> <ol *ngFor="let diag of diagnosisService.get();" > <li>{{ diag.diagnosisDisplay }} (PRI: {{ diag.diagPriority }})</li> </ol>
Methods
clear(encntrId: number = this.mpage.encntrId): void
Clears allergies from memory for a specific encntrId. If 0 is passed as the encntrId, all diagnosis values are
removed from memory.
get(encntrId: number = this.mpage.encntrId,
payload: any = 'DIAGNOSIS_FINAL'): IDiagnosis[]
Returns an array of diagnosis values for the specified encntrId. If the diagnosis data has not been loaded
a request to CCL will be made to retrieve the diagnosis data.
*if autoLoadServices has not been disabled*.
load(payload: any = 'DIAGNOSIS_FINAL',
patientSource: any[] = [{personId: 0, encntrId:0}]): void
Loads diagnosis information for the provided patientSource. The payload can be
any valid payload string or default payload (see payload tab).
putLog(message: string): void
Outputs the content of the message parameter to the activity log component.
typeList Filtering
You can limit the amount of data collected in CCL by optionally adding a typeList object to your payload. For example, if you only wanted to load only "FINAL" diagnoses for visits and you never plan on using the other types, simply add a typeList entry for code set 17 to your payload. Simply include the codeSet value, type or typeCd where type represents a cdf_meaning or display_key value and typeCd represents the actual code value you want to filter by. Additionally you can also filter on code set 400 to limit the nomenclature to a specific source vocabulary.
{ payload: { patientSource: [{personId: 0, encntrId: 0}], diagnosis: { }, typeList: [ {codeSet: 17, type: 'FINAL', typeCd: 0}, {codeSet: 400, type: 'ICD10CDM', 'typeCd': 0} ] } }
Public Variables
The DiagnosisService exposes the following variable that can be useful in the development of your MPages.
- diagnoses: IDiagnosis[] - Array containing visit diagnosis values.
Payload
The following payload options represent all available payload values for the DiagnosisService.
{ payload: { patientSource: [ {personId: value, encntrId: value} ], diagnosis: { includeCodeValues: true }, typeList: [ {codeSet: 17, type: 'value', typeCd: value}, {codeSet: 400, type: 'value', typeCd': value} ] } }
Default Payload Tags
The following default payload tags have been defined for use in your MPages.
DIAGNOSIS_ALL
diagnosis: { includeCodeValues: true }
DIAGNOSIS_FINAL
diagnosis: { includeCodeValues: true }, typeList: [ {codeSet: 17, type: 'FINAL', typeCd: 0} ]
Interfaces
IDiagnosis
export interface IDiagnosis { personId: number; encntrId: number; diagnosisId: number; nomenclatureId: number; dxSourceString: string; dxSourceIdentifier: string; dxVocab: string; diagDtTm: Date; diagType: string; diagTypeMeaning: string; diagnosticCategory: string; diagPriority: number; diagPrsnlId: number; diagPrsnlName: string; diagClass: string; confidLevel: string; attestationDtTm: Date; diagFtDesc: string; modNomenclatureId: number; modSourceString: string; modSourceIdentifier: string; modVocab: string; diagNote: string; conditionalQual: string; clinicalService: string; confirmationStatus: string; classification: string; severityClass: string; certainty: string; probability: number; diagnosisDisplay: string; severityFtDesc: string; longBlobId: number; ranking: string; severity: string; diagnosisGroup: number; clinicalDiagPriority: number; presentOnAdmit: string; hacInd: number; laterality: string; originatingNomenclatureId: number; origDxSourceString: string; origDxSourceIdentifier: number; origDxSourceVocab: string; dxVocabCd: number; diagTypeCd: number; diagnosticCategoryCd: number; diagClassCd: number; confidLevelCd: number; modVocabCd: number; conditionalQualCd: number; clinicalServiceCd: number; confirmationStatusCd: number; classificationCd: number; severityClassCd: number; certaintyCd: number; rankingCd: number; severityCd: number; presentOnAdmitCd: number; lateralityCd: number; origDxSourceVocabCd: number; }