open-index/open-npm huggingface dataset:
npm package: @inclouded/cog-shared
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.1.3.
Latest version: 0.0.3

# CogShared

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.1.3.

## Code scaffolding

Run `ng generate component component-name --project cog-shared` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project cog-shared`.
> Note: Don't forget to add `--project cog-shared` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build cog-shared` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build cog-shared`, go to the dist folder `cd dist/cog-shared` and run `npm publish`.

## Running unit tests

Run `ng test cog-shared` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
npm package: @inclouded/fhir-auditevent
Description: ``` npm install --save @inclouded/fhir-auditevent ```
Latest version: 2.0.0

# FHIR AuditEvent Firestore SDK

```
npm install --save @inclouded/fhir-auditevent
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR AuditEvent 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:

```javascript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { AuditEventApi } from '@inclouded/fhir-auditevent';
import { IAuditEvent } from '@ahryman40k/ts-fhir-types/lib/R4';
import { AngularFirestore } from '@angular/fire/firestore';

@Injectable()
export class AuditEventService {

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

  addAuditEvent(auditEvent: IAuditEvent) {
    return this.AuditEventApi.add(auditEvent);
  }

  getAllAuditEvents(): Observable<IAuditEvent[]> {
    return this.AuditEventApi.getAll();
  }

  deleteAuditEvent(auditEventId: string) {
    return this.AuditEventApi.delete(auditEventId);
  }

  updateAuditEvent(auditEvent: IAuditEvent) {
    return this.AuditEventApi.update(auditEvent);
  }

  getAuditEventById(id: string) {
    return this.AuditEventApi.getById(id);
  }

  getAuditEventsByAgent(agentReference?: string, agentName?: string) {
    return this.AuditEventApi.getAuditEventsByAgent(agentReference, agentName);
  }

  getAuditEventsByEntity(oldValue?: string, newValue?: string, description?: string) {
    return this.AuditEventApi.getAuditEventsByEntity(oldValue, newValue, description);
  }

  getAuditEventsByEntityReference(entityReference?: string) {
    return this.AuditEventApi.getAuditEventsByEntityReference(entityReference);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The AuditEvent 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 AuditEvent 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)
npm package: @inclouded/fhir-auth
Description: ``` npm install --save @inclouded/fhir-auth ```
Latest version: 2.0.0

# FHIR Auth Firestore SDK

```
npm install --save @inclouded/fhir-auth
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR Auth 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:

```typescript
import { Injectable } from '@angular/core';
import { FhirAuthApi } from '@inclouded/fhir-auth';
import { AngularFireAuth } from '@angular/fire/auth';

@Injectable()
export class FHIRAuthService {

  FhirAuthApi: FhirAuthApi;
  constructor(private afs: AngularFireAuth) {
    this.FhirAuthApi = new FhirAuthApi(this.afs);
  }

  createUserWithEmailAndPassword(email: string, password: string) {
    return this.FhirAuthApi.createUserWithEmailAndPassword(email, password);
  }

  signInWithEmailAndPassword(email: string, password: string) {
    return this.FhirAuthApi.signInWithEmailAndPassword(email, password);
  }

  signOut() {
    return this.FhirAuthApi.signOut();
  }
}

```

Developer: Zoltán R. Jánki (jankiz@inf.u-szeged.hu), Gábor Simon (simonovszkij@gmail.com)
npm package: @inclouded/fhir-careteam
Description: ``` npm install --save @inclouded/fhir-careteam ```
Latest version: 4.0.0

# FHIR CareTeam Firestore SDK

```
npm install --save @inclouded/fhir-careteam
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR CareTeam 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { CareTeamApi } from '@inclouded/fhir-careteam';
import { AngularFirestore } from '@angular/fire/firestore';
import { ICareTeam } from '@ahryman40k/ts-fhir-types/lib/R4';

@Injectable()
export class CareTeamService {

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

  getCareTeams(): Observable<ICareTeam[]> {
    return this.CareTeamApi.getAll();
  }

  addCareTeam(careteam: ICareTeam) {
    return this.CareTeamApi.add(careteam);
  }


  deleteCareTeam(careteamId: string) {
    return this.CareTeamApi.delete(careteamId);
  }


  updateCareTeam(careteam: ICareTeam) {
    return this.CareTeamApi.update(careteam);
  }


  getCareTeamsbyName(name: string): Observable<ICareTeam[]> {
    return this.CareTeamApi.getCareTeamsbyName(name);
  }

  getCareTeamsbyParticipant(participant: string): Observable<ICareTeam[]> {
    return this.CareTeamApi.getCareTeamsbyParticipant(participant);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The CareTeam 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 CareTeam 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)
npm package: @inclouded/fhir-condition
Description: ``` npm install --save @inclouded/fhir-condition ```
Latest version: 3.0.0

# FHIR Condition Firestore SDK

```
npm install --save @inclouded/fhir-condition
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR Condition 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ConditionApi } from '@inclouded/fhir-condition';
import { ICondition } from '@ahryman40k/ts-fhir-types/lib/R4';
import { AngularFirestore } from '@angular/fire/firestore';

@Injectable()
export class ConditionService {

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

  getConditions(): Observable<ICondition[]> {
    return this.ConditionApi.getAll();
  }

  addCondition(condition: ICondition) {
    console.log(condition);
    return this.ConditionApi.add(condition);
  }

  deleteCondition(conditionId: string) {
    return this.ConditionApi.delete(conditionId);
  }

  updateCondition(condition: ICondition) {
    return this.ConditionApi.update(condition);
  }

  getConditionByPatient(subject: string): Observable<ICondition[]> {
    return this.ConditionApi.getConditionsByPatient(subject, type, category);
  }

  getConditionsByCategory(category?: string, subject?: string, type?: string): Observable<ICondition[]> {
    return this.ConditionApi.getConditionsByCategory(category, subject, type);
  }

  getConditionsByCode(code: string): Observable<ICondition[]> {
    return this.ConditionApi.getConditionsByCode(code);
  }

  getConditionsByOnsetDateTime(onsetDateTime: Date): Observable<ICondition[]> {
    return this.ConditionApi.getConditionsByOnsetDateTime(onsetDateTime);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The Condition 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 Condition 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)
npm package: @inclouded/fhir-device
Description: ``` npm install --save @inclouded/fhir-device ```
Latest version: 3.0.3

# FHIR Device Firestore SDK

```
npm install --save @inclouded/fhir-device
```

## Bevezető

A repository-ban az FHIR Device 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { DeviceApi } from '@inclouded/fhir-device';
import { IDevice } from '@ahryman40k/ts-fhir-types/lib/R4';
import { AngularFirestore } from '@angular/fire/firestore';
import { Paging } from '@inclouded/fhirapi';

@Injectable()
export class DeviceService {

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

  addDevice(device: IDevice) {
    console.log(device);
    return this.DeviceApi.add(device);
  }

  getAllDevices(): Observable<IDevice[]> {
    return this.DeviceApi.getAll();
  }

  deleteDevice(deviceId: string) {
    return this.DeviceApi.delete(deviceId);
  }

  updateDevice(device: IDevice) {
    return this.DeviceApi.update(device);
  }

  getFreeDevices() {
    return this.DeviceApi.getFreeDevices();
  }

  getFreeDevicesbyIdentifier(identifier: string) {
    return this.DeviceApi.getFreeDevicesByIdentifier(identifier);
  }

  getDevicesWithParams(sort?: boolean, identifier?: string, type?: string, model?: string,
                       status?: string, orderBy?: string, orderDirection?: any, paging?: Paging) {
    return this.DeviceApi.getAllDevices(sort, identifier, type, model, status,
      orderBy, orderDirection, paging);
  }

  getDeviceByPatient(patient: string) {
    return this.DeviceApi.getDeviceByPatient(patient);
  }

  getDeviceByStatus(status: string) {
    return this.DeviceApi.getDeviceByStatus(status);
  }

  getDeviceByManufacturer(manufacturer: string) {
    return this.DeviceApi.getDeviceByManufacturer(manufacturer);
  }

  getDeviceByOwner(owner: string) {
    return this.DeviceApi.getDeviceByOwner(owner);
  }
}

```

## MongoDB -vel való használata

Lásd a FhirApi leírásában:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> A Device 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 Device komplexebb objektumokkal bíró adattagjai.

Felelős fejlesztő: Jánki Zoltán R. (jankiz@inf.u-szeged.hu), Simon Gábor (simonovszkij@gmail.com)
npm package: @inclouded/fhir-devicerequest
Description: ``` npm install --save @inclouded/fhir-devicerequest ```
Latest version: 2.0.0

# FHIR DeviceRequest Firestore SDK

```
npm install --save @inclouded/fhir-devicerequest
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR DeviceRequest 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { DeviceRequestApi } from '@inclouded/fhir-devicerequest';
import { AngularFirestore } from '@angular/fire/firestore';
import { IDeviceRequest } from '@ahryman40k/ts-fhir-types/lib/R4';

@Injectable()
export class DeviceRequestService {

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

    getDeviceRequests(): Observable<IDeviceRequest[]> {
        return this.DeviceRequestApi.getAll();
    }

    addDeviceRequest(devicerequest: IDeviceRequest) {
        return this.DeviceRequestApi.add(devicerequest);
    }

    deleteDeviceRequest(devicerequestId: string) {
        return this.DeviceRequestApi.delete(devicerequestId);
    }

    updateDeviceRequest(devicerequest: IDeviceRequest) {
        return this.DeviceRequestApi.update(devicerequest);
    }

    getDeviceRequestById(id: string): Observable<IDeviceRequest[]> {
        return this.DeviceRequestApi.getById(id);
    }

    getDeviceRequestBySubject(subject: string): Observable<IDeviceRequest[]> {
        return this.DeviceRequestApi.getDeviceRequestBySubject(subject);
    }

    getDeviceRequestByCodeReference(codeReference: string): Observable<IDeviceRequest[]> {
        return this.DeviceRequestApi.getDeviceRequestByCodeReference(codeReference);
    }

    getDeviceRequestByStatus(status: string): Observable<IDeviceRequest[]> {
        return this.DeviceRequestApi.getDeviceRequestByStatus(status);
    }

    getDeviceRequestByIntent(intent: string): Observable<IDeviceRequest[]> {
        return this.DeviceRequestApi.getDeviceRequestByIntent(intent);
    }

    getDeviceRequestByRequester(requester: string): Observable<IDeviceRequest[]> {
        return this.DeviceRequestApi.getDeviceRequestByRequester(requester);
    }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The DeviceRequest 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 DeviceRequest 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)
npm package: @inclouded/fhir-diagnosticreport
Description: ``` npm install --save @inclouded/fhir-diagnosticreport ```
Latest version: 2.0.0

# FHIR DiagnosticReport Firestore SDK

```
npm install --save @inclouded/fhir-diagnosticreport
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR DiagnosticReport 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { DiagnosticReportApi } from '@inclouded/fhir-diagnosticreport';
import { AngularFirestore } from '@angular/fire/firestore';
import { IDiagnosticReport } from '@ahryman40k/ts-fhir-types/lib/R4';

@Injectable()
export class DiagnosticReportService {

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

  getDiagnosticReports(): Observable<IDiagnosticReport[]> {
    return this.DiagnosticReportApi.getAll();
  }

  getDiagnosticReportById(id: string): Observable<IDiagnosticReport[]> {
    return this.DiagnosticReportApi.getById(id);
  }

  addDiagnosticReport(diagnosticReport: IDiagnosticReport) {
    return this.DiagnosticReportApi.add(diagnosticReport);
  }

  deleteDiagnosticReport(diagnosticReportId: string) {
    return this.DiagnosticReportApi.delete(diagnosticReportId);
  }

  updateDiagnosticReport(diagnosticReport: IDiagnosticReport) {
    return this.DiagnosticReportApi.update(diagnosticReport);
  }

  getDiagnosticReportsBySubject(subject: string) {
    return this.DiagnosticReportApi.getAllDiagnosticReportsBySubject(subject);
  }

  getDiagnosticReportsByBasedOn(basedOn: string) {
    return this.DiagnosticReportApi.getAllDiagnosticReportsByBasedOn(basedOn);
  }

  getDiagnosticReportsByStatus(status: string) {
    return this.DiagnosticReportApi.getAllDiagnosticReportsByStatus(status);
  }

  getAllDiagnosticReportsByCode(code: string) {
    return this.DiagnosticReportApi.getAllDiagnosticReportsByCode(code);
  }

  getAllDiagnosticReportsByPerformer(performer: string) {
    return this.DiagnosticReportApi.getAllDiagnosticReportsByPerformer(performer);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The DiagnosticReport 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 DiagnosticReport 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)
npm package: @inclouded/fhir-goal
Description: ``` npm install --save @inclouded/fhir-goal ```
Latest version: 3.0.0

# FHIR Goal Firestore SDK

```
npm install --save @inclouded/fhir-goal
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR Goal 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { GoalApi } from '@inclouded/fhir-goal';
import { AngularFirestore } from '@angular/fire/firestore';
import { IGoal } from '@ahryman40k/ts-fhir-types/lib/R4';

@Injectable()
export class GoalService {

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

  getGoals(): Observable<IGoal[]> {
    return this.GoalApi.getAll();
  }

  getGoalById(id: string): Observable<IGoal[]> {
    return this.GoalApi.getById(id);
  }

  addGoal(goal: IGoal) {
    return this.GoalApi.add(goal);
  }

  deleteGoal(goalId: string) {
    return this.GoalApi.delete(goalId);
  }

  updateGoal(goal: IGoal) {
    return this.GoalApi.update(goal);
  }

  getGoalByLifecycleStatus(status: string) {
    return this.GoalApi.getGoalByLifecycleStatus(status);
  }

  getGoalBySubject(subject: string) {
    return this.GoalApi.getGoalBySubject(subject);
  }

  getGoalByTargetDueDate(dueDate: Date) {
    return this.GoalApi.getGoalByTargetDueDate(dueDate);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The Goal 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 Goal that possess more complex objects build upon these. 

Developer: Bence Lakos (bencelakos@gmail.com), Zoltán R. Jánki (jankiz@inf.u-szeged.hu), Gábor Simon (simonovszkij@gmail.com)
npm package: @inclouded/fhir-group
Description: ``` npm install --save @inclouded/fhir-group ```
Latest version: 2.0.0

# FHIR Group Firestore SDK

```
npm install --save @inclouded/fhir-group
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR Group 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { GroupApi } from '@inclouded/fhir-group';
import { AngularFirestore } from '@angular/fire/firestore';
import { IGroup } from '@ahryman40k/ts-fhir-types/lib/R4';

@Injectable()
export class GroupService {

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

    getGroups(): Observable<IGroup[]> {
        return this.GroupApi.getAll();
    }

    addGroup(group: IGroup) {
        return this.GroupApi.add(group);
    }

    deleteGroup(groupId: string) {
        return this.GroupApi.delete(groupId);
    }

    updateGroup(group: IGroup) {
        return this.GroupApi.update(group);
    }

    getGroupsByStatus(status: boolean) {
        return this.GroupApi.getGroupsByStatus(status);
    }

    getGroupsByMember(member: string): Observable<IGroup[]> {
        return this.GroupApi.getGroupsByMember(member);
    }

    getGroupsByType(type: string): Observable<IGroup[]> {
        return this.GroupApi.getGroupsByType(type);
    }

    getGroupsByName(name: string): Observable<IGroup[]> {
        return this.GroupApi.getGroupsByName(name);
    }

    getGroupsByManagingEntity(managingEntity: string): Observable<IGroup[]> {
        return this.GroupApi.getGroupsByManagingEntity(managingEntity);
    }

    getGroupsByNameSubStr(nameSubStr: string) {
        return this.GroupApi.getGroupsByNameSubStr(nameSubStr);
    }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The Group 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 Group 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)
npm package: @inclouded/fhir-healthcareservice
Description: ``` npm install --save @inclouded/fhir-healthcareservice ```
Latest version: 2.0.4

# FHIR HealthcareService Firestore SDK

```
npm install --save @inclouded/fhir-healthcareservice
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR HealthcareService 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:

```javascript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { HealthcareServiceApi } from '@inclouded/fhir-healthcareservice';
import { IHealthcareService } from '@ahryman40k/ts-fhir-types/lib/R4';
import { AngularFirestore } from '@angular/fire/firestore';

@Injectable()
export class HealthcareServiceService {

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

  addHealthcareService(healthcareService: IHealthcareService) {
    return this.HealthcareServiceApi.add(healthcareService);
  }

  getAllHealthcareServices(): Observable<IHealthcareService[]> {
    return this.HealthcareServiceApi.getAll();
  }

  getHealthcareServiceById(healthcareServiceId: string): Observable<IHealthcareService[]> {
    return this.HealthcareServiceApi.getById(healthcareServiceId);
  }

  deleteHealthcareService(healthcareServiceId: string){
    return this.HealthcareServiceApi.delete(healthcareServiceId);
  }

  updateHealthcareService(healthcareService: IHealthcareService) {
    return this.HealthcareServiceApi.update(healthcareService);
  }

  getHealthcareServicesByReferralMethod(referralMethod: string) {
    return this.HealthcareServiceApi.getHealthcareServicesByReferralMethod(referralMethod);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The HealthcareService 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 HealthcareService 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)
npm package: @inclouded/fhir-location
Description: ``` npm install --save @inclouded/fhir-location ```
Latest version: 2.0.0

# FHIR Location Firestore SDK

```
npm install --save @inclouded/fhir-location
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR Location 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:

```javascript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { LocationApi } from '@inclouded/fhir-location';
import { ILocation } from '@ahryman40k/ts-fhir-types/lib/R4';
import { AngularFirestore } from '@angular/fire/firestore';

@Injectable()
export class LocationService {

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

  addLocation(location: ILocation) {
    return this.LocationApi.add(location);
  }

  getAllLocations(): Observable<ILocation[]> {
    return this.LocationApi.getAll();
  }

  getLocationById(locationId: string): Observable<ILocation[]> {
    return this.LocationApi.getById(locationId);
  }

  deleteLocation(locationId: string){
    return this.LocationApi.delete(locationId);
  }

  updateLocation(location: ILocation) {
    return this.LocationApi.update(location);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The Location 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 Location 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)
npm package: @inclouded/fhir-medication
Description: ``` npm install --save @inclouded/fhir-medication ```
Latest version: 3.0.0

# FHIR Medication Firestore SDK

```
npm install --save @inclouded/fhir-medication
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR Medication 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { MedicationApi } from '@inclouded/fhir-medication';
import { AngularFirestore } from '@angular/fire/firestore';
import { IMedication } from '@ahryman40k/ts-fhir-types/lib/R4';

@Injectable()
export class MedicationService {

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

  getMedications(): Observable<IMedication[]> {
    return this.MedicationApi.getAll();
  }

  addMedication(medication: IMedication) {
    return this.MedicationApi.add(medication);
  }

  deleteMedication(medicationId: string) {
    return this.MedicationApi.delete(medicationId);
  }

  updateMedication(medication: IMedication) {
    return this.MedicationApi.update(medication);
  }

  getMedicationbyId(id: string): Observable<IMedication[]> {
    return this.MedicationApi.getById(id);
  }

  getMedicationByCode(code: string): Observable<IMedication[]> {
    return this.MedicationApi.getMedicationByCode(code);
  }

  getMedicationByStatus(status: string): Observable<IMedication[]> {
    return this.MedicationApi.getMedicationByStatus(status);
  }

  getMedicationByForm(form: string): Observable<IMedication[]> {
    return this.MedicationApi.getMedicationByForm(form);
  }

  getMedicationByBatch(batch: string): Observable<IMedication[]> {
    return this.MedicationApi.getMedicationByBatch(batch);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The Medication 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 Medication 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)
npm package: @inclouded/fhir-medicationrequest
Description: ``` npm install --save @inclouded/fhir-medicationrequest ```
Latest version: 3.0.0

# FHIR MedicationRequest Firestore SDK

```
npm install --save @inclouded/fhir-medicationrequest
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR MedicationRequest 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { MedicationRequestApi } from '@inclouded/fhir-medicationrequest';
import { AngularFirestore } from '@angular/fire/firestore';
import { IMedicationRequest } from '@ahryman40k/ts-fhir-types/lib/R4';

@Injectable()
export class MedicationRequestService {

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

  getMedicationRequests(): Observable<IMedicationRequest[]> {
    return this.MedicationRequestApi.getAll();
  }

  addMedicationRequest(medicationrequest: IMedicationRequest) {
    console.log(medicationrequest);
    return this.MedicationRequestApi.add(medicationrequest);
  }


  deleteMedicationRequest(medicationrequestId: string) {
    return this.MedicationRequestApi.delete(medicationrequestId);
  }


  updateMedicationRequest(medicationrequest: IMedicationRequest) {
    return this.MedicationRequestApi.update(medicationrequest);
  }


  getMedicationRequestsbySubject(subject: string): Observable<IMedicationRequest[]> {
    return this.MedicationRequestApi.getMedicationRequestsbySubject(subject);
  }

  getMedicationRequestbyId(id: string): Observable<IMedicationRequest[]> {
    return this.MedicationRequestApi.getById(id);
  }

  getMedicationRequestsbyMedicationReference(reference: string): Observable<IMedicationRequest[]> {
    return this.MedicationRequestApi.getMedicationRequestsbyMedicationReference(reference);
  }

  getMedicationRequestsbyRequester(requester: string): Observable<IMedicationRequest[]> {
    return this.MedicationRequestApi.getMedicationRequestsbyRequester(requester);
  }

  getMedicationRequestsbyAuthoredOn(authoredOn: string): Observable<IMedicationRequest[]> {
    return this.MedicationRequestApi.getMedicationRequestsbyAuthoredOn(authoredOn);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The MedicationRequest 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 MedicationRequest 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)
npm package: @inclouded/fhir-medicationstatement
Description: ``` npm install --save @inclouded/fhir-medicationstatement ```
Latest version: 3.0.0

# FHIR MedicationStatement Firestore SDK

```
npm install --save @inclouded/fhir-medicationstatement
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR MedicationStatement 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { MedicationStatementApi } from '@inclouded/fhir-medicationstatement';
import { AngularFirestore } from '@angular/fire/firestore';
import { IMedicationStatement } from '@ahryman40k/ts-fhir-types/lib/R4';

@Injectable()
export class MedicationStatementService {

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

  getMedicationStatements(): Observable<IMedicationStatement[]> {
    return this.MedicationStatementApi.getAll();
  }

  addMedicationStatement(medicationstatement: IMedicationStatement) {
    return this.MedicationStatementApi.add(medicationstatement);
  }


  deleteMedicationStatement(medicationstatementId: string) {
    return this.MedicationStatementApi.delete(medicationstatementId);
  }


  updateMedicationStatement(medicationstatement: IMedicationStatement) {
    return this.MedicationStatementApi.update(medicationstatement);
  }


  getMedicationStatementsbyPatient(subject: string): Observable<IMedicationStatement[]> {
    return this.MedicationStatementApi.getMedicationStatementbyPatient(subject);
  }

  getMedicationStatementbyId(id: string): Observable<IMedicationStatement[]> {
    return this.MedicationStatementApi.getById(id);
  }

  getMedicationStatementsByPatientAndDateIntervals(patient: string, startDate: Date, endDate: Date): Observable<IMedicationStatement[]> {
    return this.MedicationStatementApi.getMedicationStatementsByPatientAndDateIntervals(patient, startDate, endDate);
  }

  getMedicationStatementbyStatus(status: string): Observable<IMedicationStatement[]> {
    return this.MedicationStatementApi.getMedicationStatementbyStatus(status);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The MedicationStatement 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 MedicationStatement 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)
npm package: @inclouded/fhir-observationdefinition
Description: ``` npm install --save @inclouded/fhir-observationdefinition ```
Latest version: 3.0.0

# FHIR ObservationDefinition Firestore SDK

```
npm install --save @inclouded/fhir-observationdefinition
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR ObservationDefinition 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ObservationDefinitionApi } from '@inclouded/fhir-observationdefinition';
import { AngularFirestore } from '@angular/fire/firestore';
import { IObservationDefinition } from '@ahryman40k/ts-fhir-types/lib/R4';

@Injectable()
export class ObservationDefinitionService {

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

  getObservationDefinitions(): Observable<IObservationDefinition[]> {
    return this.ObservationDefinitionApi.getAll();
  }

  addObservationDefinition(observationDefinition: IObservationDefinition) {
    return this.ObservationDefinitionApi.add(observationDefinition);
  }


  deleteObservationDefinition(observationDefinitionId: string) {
    return this.ObservationDefinitionApi.delete(observationDefinitionId);
  }


  updateObservationDefinition(observationDefinition: IObservationDefinition) {
    return this.ObservationDefinitionApi.update(observationDefinition);
  }


  getObservationDefinitionsById(name: string): Observable<IObservationDefinition[]> {
    return this.ObservationDefinitionApi.getById(name);
  }

  getObservationDefinitionsBySecurityCodeAndCodeAndMethod(securityCode?: string, code?: string, method?: string): Observable<IObservationDefinition[]> {
      return this.ObservationDefinitionApi.getObservationDefinitionsBySecurityCodeAndCodeAndMethod(securityCode, code, method);
    }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The ObservationDefinition 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 ObservationDefinition 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)
npm package: @inclouded/fhir-organization
Description: ``` npm install --save @inclouded/fhir-organization ```
Latest version: 4.0.3

# FHIR Organization Firestore SDK

```
npm install --save @inclouded/fhir-organization
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR Organization 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:

```typescript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { OrganizationApi } from '@inclouded/fhir-organization';
import { AngularFirestore } from '@angular/fire/firestore';
import { IOrganization } from '@ahryman40k/ts-fhir-types/lib/R4';

@Injectable()
export class OrganizationService {

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

  getOrganizations(): Observable<IOrganization[]> {
    return this.OrganizationApi.getAll();
  }

  addOrganization(organization: IOrganization) {
    return this.OrganizationApi.add(organization);
  }

  deleteOrganization(organizationId: string) {
    return this.OrganizationApi.delete(organizationId);
  }

  updateOrganization(organization: IOrganization) {
    return this.OrganizationApi.update(organization);
  }

  getOrganizationstsbyIdentifier(identifier: string): Observable<IOrganization[]> {
    return this.OrganizationApi.getOrganizationsbyIdentifier(identifier);
  }

  getOrganizationById(id: string) {
    return this.OrganizationApi.getById(id);
  }

  getOrganizationsbyName(name: string): Observable<IOrganization[]> {
    return this.OrganizationApi.getOrganizationsbyName(name);
  }

  getOrganizationsbyAddress(addressPostalCode?: string, addressCountry?: string, addressCity?: string,
    addressLine?: string): Observable<IOrganization[]> {
    return this.OrganizationApi.getOrganizationsbyAddress(addressPostalCode, addressCountry, addressCity, addressLine);
  }

  getOrganizationsByStatus(status: boolean): Observable<IOrganization[]> {
    return this.OrganizationApi.getOrganizationsByStatus(status);
  }

  getPractitionerByNameSubStr(nameSubStr: string) {
    return this.OrganizationApi.getPractitionerByNameSubStr(nameSubStr);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The Organization 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 Organization 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)
npm package: @inclouded/fhir-organizationaffiliation
Description: ``` npm install --save @inclouded/fhir-organizationaffilation ```
Latest version: 2.0.0

# FHIR OrganizationAffiliation Firestore SDK

```
npm install --save @inclouded/fhir-organizationaffilation
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR OrganizationAffiliation 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:

```javascript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { OrganizationAffiliationApi } from '@inclouded/fhir-organizationaffiliation';
import { IOrganizationAffiliation } from '@ahryman40k/ts-fhir-types/lib/R4';
import { AngularFirestore } from '@angular/fire/firestore';

@Injectable()
export class OrganizationAffiliationService {

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

  addOrganizationAffiliation(organizationaffiliation: IOrganizationAffiliation) {
    return this.OrganizationAffiliationApi.add(organizationaffiliation);
  }

  getAllOrganizationAffiliations(): Observable<IOrganizationAffiliation[]> {
    return this.OrganizationAffiliationApi.getAll();
  }

  getOrganizationAffiliationsByActiveAndCode(active?: boolean, code?: string): Observable<IOrganizationAffiliation[]> {
    return this.OrganizationAffiliationApi.getOrganizationAffiliationsByActiveAndCode(active, code);
  }

  deleteOrganizationAffiliation(organizationaffiliationId: string) {
    return this.OrganizationAffiliationApi.delete(organizationaffiliationId);
  }

  updateOrganizationAffiliation(organizationaffiliation: IOrganizationAffiliation) {
    return this.OrganizationAffiliationApi.update(organizationaffiliation);
  }
}

```

## Usage with MongoDB

See in the description of FhirApi:
[a link](https://www.npmjs.com/package/@inclouded/fhirapi)

> The OrganizationAffiliation 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 OrganizationAffiliation 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)