3.1.5 • Published 3 days ago

@inclouded/fhir-patient v3.1.5

Weekly downloads
44
License
-
Repository
-
Last release
3 days ago

FHIR Patient Firestore SDK

npm install --save @inclouded/fhir-patient

Bevezető

A repository-ban az FHIR Patient erőforráshoz készült Firebase Cloud Firestore SDK található egy telepíthető Angular könyvtár formájában. Az SDK telepíthető minden Angular 2+ projekthez. Az SDK megvalósítja a szükséges CRUD műveleteket.

Használata

  1. Az SDK használatához szükséges egy Angular 2+ projekt, amelyben az angularfire2 modul segítségével van egy Firestore adatbázissal kapcsolatunk (environments.ts-ben konfigurálva).

  2. Egy Service-ben felhasználható az SDK, az alábbi módon:

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

@Injectable()
export class PatientService {

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

  addPatient(patient: IPatient) {
    return this.PatientApi.add(patient);
  }

  getAllPatients(): Observable<IPatient[]> {
    return this.PatientApi.getAll();
  }

  getAllPatientsInAscendingOrder(): Observable<IPatient[]> {
    return this.PatientApi.getAllPatientsInAscendingOrder();
  }

  getAllPatientsInDescendingOrder(): Observable<IPatient[]> {
    return this.PatientApi.getAllPatientsInDescendingOrder();
  }

  getActivePatients(): Observable<IPatient[]> {
    return this.PatientApi.getActivePatients();
  }

  getActivePatientsInAscendingOrder(): Observable<IPatient[]> {
    return this.PatientApi.getActivePatientsInAscendingOrder();
  }

  getActivePatientsInDescendingOrder(): Observable<IPatient[]> {
    return this.PatientApi.getActivePatientsInDescendingOrder();
  }

  getInactivePatients(): Observable<IPatient[]> {
    return this.PatientApi.getInactivePatients();
  }

  getInactivePatientsInAscendingOrder(): Observable<IPatient[]> {
    return this.PatientApi.getInactivePatientsInAscendingOrder() as Observable<IPatient[]>;
  }

  getInactivePatientsInDescendingOrder(): Observable<IPatient[]> {
    return this.PatientApi.getInactivePatientsInDescendingOrder();
  }

  getGivenPatient(taj: string): Observable<IPatient[]> {
    return this.PatientApi.getPatientByTAJ(taj);
  }

  getPatientsByPractitioner(practitionerId: string): Observable<IPatient[]> {
    return this.PatientApi.getPatientsByPractitioner(practitionerId) as Observable<IPatient[]>;
  }

  getPatientById(patientId: string): Observable<IPatient[]> {
    return this.PatientApi.getById(patientId);
  }

  getPatientByTaj(patientTaj: string): Observable<IPatient[]> {
    return this.PatientApi.getPatientByTAJ(patientTaj);
  }

  getPatientByName(name: string) {
    return this.PatientApi.getPatientByName(name);
  }

  getPatientByNameAndActiveInSortAscendingOrder(name: string, active: boolean) {
    return this.PatientApi.getPatientByNameAndActiveInSortAscendingOrder(name, active);
  }

  getPatientByNameAndActiveInSortDescendingOrder(name: string, active: boolean) {
    return this.PatientApi.getPatientByNameAndActiveInSortDescendingOrder(name, active);
  }

  deletePatient(patientId: string){
    return this.PatientApi.delete(patientId);
  }

  updatePatient(patient: IPatient) {
    return this.PatientApi.update(patient);
  }

  getPatientsByGender(gender: string): Observable<IPatient[]> {
    return this.PatientApi.getPatientsByGender(gender);
  }

  getPatientsByTelecom(telecom: string): Observable<IPatient[]> {
    return this.PatientApi.getPatientsByTelecom(telecom);
  }

  getPatientsByAddress(postalCode?: string, country?: string, city?: string, line?: string): Observable<IPatient[]> {
    return this.PatientApi.getPatientsByAddress(postalCode, country, city, line);
  }

  getPatientsByBirthDate(birthDate: Date): Observable<IPatient[]> {
    return this.PatientApi.getPatientsByBirthDate(birthDate);
  }

  getActivePatientsByTajAndNameSubStr(nameSubStr?: string, idTAJ?: string) {
    return this.PatientApi.getActivePatientsByTajAndNameSubStr(nameSubStr, idTAJ);
  }

  getPatientsByGroupExtension(groupExtension: string) {
    return this.PatientApi.getPatientsByGroupExtension(groupExtension);
  }
}

MongoDB -vel való használata

Lásd a FhirApi leírásában: a link

A Patient osztály meg kell, hogy egyezzen a az FHIR struktúrával. A komplexebb objektumok használatához rendelkezésre állnak további interfészek, erre építenek a Patient komplexebb objektumokkal bíró adattagjai.

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

3.1.5

3 days ago

3.1.4

3 months ago

4.0.0

3 years ago

3.2.1

4 years ago

3.2.0

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.0

4 years ago

2.0.10

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago