3.0.0 • Published 3 years ago

@inclouded/fhir-detectedissue v3.0.0

Weekly downloads
9
License
-
Repository
-
Last release
3 years ago

FHIR DetectedIssue Firestore SDK

npm install --save @inclouded/fhir-detectedissue

Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR DetectedIssue resource in an installable Angular folder form. The SDK can be installed for every Angular 2+ project. The SDK accomplishes the necessary CRUD operations.

Usage

  1. For using the SDK an Angular 2+ project is needed, in which we can establish a connection to a Firestore database instance. (configured in environments.ts)

  2. The SDK can be used in a Service in the following way:

import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { DetectedIssueApi } from '@inclouded/fhir-detectedissue';
import { IDetectedIssue } from '@ahryman40k/ts-fhir-types/lib/R4';
import { AngularFirestore } from '@angular/fire/firestore';

@Injectable()
export class DetectedIssueService {

  DetectedIssueApi: DetectedIssueApi;
    constructor(private afs: AngularFirestore) {
        this.DetectedIssueApi = new DetectedIssueApi(this.afs);
    }

  getDetectedIssues(): Observable<IDetectedIssue[]> {
    return this.DetectedIssueApi.getAll();
  }

  addDetectedIssue(detectedIssue: IDetectedIssue) {
    return this.DetectedIssueApi.add(detectedIssue);
  }


  deleteDetectedIssue(detectedIssueId: string) {
    return this.DetectedIssueApi.delete(detectedIssueId);
  }


  updateDetectedIssue(detectedIssue: IDetectedIssue) {
    return this.DetectedIssueApi.update(detectedIssue);
  }


  getDetectedIssuesbyPatient(patient: string): Observable<IDetectedIssue[]> {
    return this.DetectedIssueApi.getDetectedIssuesbyPatient(patient);
  }

  getDetectedIssuesByPatientAndDate(patient: string, time: Date): Observable<IDetectedIssue[]> {
    return this.DetectedIssueApi.getDetectedIssuesByPatientAndDate(patient, time);
  }

  getDetectedIssuesByPatientAndDateIntervals(patient: string, startDate: Date, endDate: Date): Observable<IDetectedIssue[]> {
    return this.DetectedIssueApi.getDetectedIssuesByPatientAndDateIntervals(patient, startDate, endDate);
  }

  getDetectedIssuesbyCode(code: string): Observable<IDetectedIssue[]> {
    return this.DetectedIssueApi.getDetectedIssuesbyCode(code);
  }

  getDetectedIssuesbyAuthor(author: string): Observable<IDetectedIssue[]> {
    return this.DetectedIssueApi.getDetectedIssuesbyAuthor(author);
  }

  getDetectedIssuesbyImplicated(implicated: string): Observable<IDetectedIssue[]> {
    return this.DetectedIssueApi.getDetectedIssuesbyImplicated(implicated);
  }
}

Usage with MongoDB

See in the description of FhirApi: a link

The DetectedIssue class must be equal with the form.value, this way there's no need for building the object locally. For the usage of the more complex objects there are more available interfaces, the properties of DetectedIssue that possess more complex objects build upon these.

Developer: Zoltán R. Jánki (jankiz@inf.u-szeged.hu), Gábor Simon (simonovszkij@gmail.com)

3.0.0

3 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago