Skip to content

Commit

Permalink
ECL rename models directories
Browse files Browse the repository at this point in the history
  • Loading branch information
NerOcrO committed Aug 4, 2023
1 parent 88e9457 commit 0ad725b
Show file tree
Hide file tree
Showing 31 changed files with 54 additions and 57 deletions.
13 changes: 6 additions & 7 deletions src/etl/RiphCtisResearchStudyModelFactory.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { Extension, Identifier, Meta } from 'fhir/r4'

import { RiphCtisDto } from './dto/RiphCtisDto'
import { ModelUtils } from '../shared/models/custom/ModelUtils'
import { ReferenceContentsModel } from '../shared/models/custom/ReferenceContentsModel'
import { CodeableConceptModel } from '../shared/models/fhir/DataType/CodeableConceptModel'
import { IdentifierModel } from '../shared/models/fhir/DataType/IdentifierModel'
import { CodeableConceptModel } from '../shared/models/fhir/DataTypes/CodeableConceptModel'
import { IdentifierModel } from '../shared/models/fhir/DataTypes/IdentifierModel'
import { GroupModel } from '../shared/models/fhir/GroupModel'
import { LocationModel } from '../shared/models/fhir/LocationModel'
import { ContactDetailModel } from '../shared/models/fhir/MetadataType/ContactDetailModel'
import { ContactDetailModel } from '../shared/models/fhir/MetadataTypes/ContactDetailModel'
import { OrganizationModel } from '../shared/models/fhir/OrganizationModel'
import { RiphStatus, ResearchStudyModel } from '../shared/models/fhir/ResearchStudyModel'
import { ExtensionModel } from '../shared/models/fhir/SpecialPurposeDataType/ExtensionModel'
import { MetaModel } from '../shared/models/fhir/SpecialPurposeDataType/MetaModel'
import { ReferenceModel } from '../shared/models/fhir/SpecialPurposeDataType/ReferenceModel'
import { ExtensionModel } from '../shared/models/fhir/SpecialPurposeDataTypes/ExtensionModel'
import { MetaModel } from '../shared/models/fhir/SpecialPurposeDataTypes/MetaModel'
import { ReferenceModel } from '../shared/models/fhir/SpecialPurposeDataTypes/ReferenceModel'

export class RiphCtisResearchStudyModelFactory {
static create(riphCtisDto: RiphCtisDto): ResearchStudyModel {
Expand Down
17 changes: 8 additions & 9 deletions src/etl/RiphDmResearchStudyModelFactory.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { Extension, Identifier } from 'fhir/r4'

import { RiphDmDto } from './dto/RiphDmDto'
import { ModelUtils } from '../shared/models/custom/ModelUtils'
import { ReferenceContentsModel } from '../shared/models/custom/ReferenceContentsModel'
import { CodeableConceptModel } from '../shared/models/fhir/DataType/CodeableConceptModel'
import { IdentifierModel } from '../shared/models/fhir/DataType/IdentifierModel'
import { CodeableConceptModel } from '../shared/models/fhir/DataTypes/CodeableConceptModel'
import { IdentifierModel } from '../shared/models/fhir/DataTypes/IdentifierModel'
import { GroupModel } from '../shared/models/fhir/GroupModel'
import { ContactDetailModel } from '../shared/models/fhir/MetadataType/ContactDetailModel'
import { ContactDetailModel } from '../shared/models/fhir/MetadataTypes/ContactDetailModel'
import { OrganizationModel } from '../shared/models/fhir/OrganizationModel'
import { ResearchStudyModel, RiphStatus } from '../shared/models/fhir/ResearchStudyModel'
import { ExtensionModel } from '../shared/models/fhir/SpecialPurposeDataType/ExtensionModel'
import { MetaModel } from '../shared/models/fhir/SpecialPurposeDataType/MetaModel'
import { ReferenceModel } from '../shared/models/fhir/SpecialPurposeDataType/ReferenceModel'
import { ExtensionModel } from '../shared/models/fhir/SpecialPurposeDataTypes/ExtensionModel'
import { MetaModel } from '../shared/models/fhir/SpecialPurposeDataTypes/MetaModel'
import { ReferenceModel } from '../shared/models/fhir/SpecialPurposeDataTypes/ReferenceModel'

export class RiphDmResearchStudyModelFactory {
static create(riphDmDto: RiphDmDto): ResearchStudyModel {
Expand Down Expand Up @@ -75,13 +74,13 @@ export class RiphDmResearchStudyModelFactory {
IdentifierModel.createPrimarySlice(ModelUtils.UNAVAILABLE),
IdentifierModel.createSecondarySlice(riphDmDto.numero_national, assigner),
]
const location = undefined
const location: CodeableConceptModel[] = undefined
const meta: MetaModel = MetaModel.create(
riphDmDto.historique,
riphDmDto.dates_avis_favorable_ms_mns
)
const phase: CodeableConceptModel = CodeableConceptModel.createResearchStudyPhase(ModelUtils.UNAVAILABLE)
const site = undefined
const site: ReferenceModel[] = undefined
const sponsor: ReferenceModel = ReferenceModel.createPrimarySponsor(primarySponsorOrganizationId)
const status = riphDmDto.etat as RiphStatus
const title = ModelUtils.emptyIfNull(riphDmDto.titre_recherche)
Expand Down
17 changes: 8 additions & 9 deletions src/etl/RiphJardeResearchStudyModelFactory.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { Extension, Identifier, Organization } from 'fhir/r4'

import { RiphJardeDto } from './dto/RiphJardeDto'
import { ModelUtils } from '../shared/models/custom/ModelUtils'
import { ReferenceContentsModel } from '../shared/models/custom/ReferenceContentsModel'
import { CodeableConceptModel } from '../shared/models/fhir/DataType/CodeableConceptModel'
import { IdentifierModel } from '../shared/models/fhir/DataType/IdentifierModel'
import { CodeableConceptModel } from '../shared/models/fhir/DataTypes/CodeableConceptModel'
import { IdentifierModel } from '../shared/models/fhir/DataTypes/IdentifierModel'
import { GroupModel } from '../shared/models/fhir/GroupModel'
import { ContactDetailModel } from '../shared/models/fhir/MetadataType/ContactDetailModel'
import { ContactDetailModel } from '../shared/models/fhir/MetadataTypes/ContactDetailModel'
import { OrganizationModel } from '../shared/models/fhir/OrganizationModel'
import { ResearchStudyModel, RiphStatus } from '../shared/models/fhir/ResearchStudyModel'
import { ExtensionModel } from '../shared/models/fhir/SpecialPurposeDataType/ExtensionModel'
import { MetaModel } from '../shared/models/fhir/SpecialPurposeDataType/MetaModel'
import { ReferenceModel } from '../shared/models/fhir/SpecialPurposeDataType/ReferenceModel'
import { ExtensionModel } from '../shared/models/fhir/SpecialPurposeDataTypes/ExtensionModel'
import { MetaModel } from '../shared/models/fhir/SpecialPurposeDataTypes/MetaModel'
import { ReferenceModel } from '../shared/models/fhir/SpecialPurposeDataTypes/ReferenceModel'

export class RiphJardeResearchStudyModelFactory {
static create(riphJardeDto: RiphJardeDto): ResearchStudyModel {
Expand Down Expand Up @@ -75,13 +74,13 @@ export class RiphJardeResearchStudyModelFactory {
IdentifierModel.createPrimarySlice(ModelUtils.UNAVAILABLE),
IdentifierModel.createSecondarySlice(riphJardeDto.numero_national, assigner),
]
const location = undefined
const location: CodeableConceptModel[] = undefined
const meta: MetaModel = MetaModel.create(
riphJardeDto.historique,
riphJardeDto.dates_avis_favorable_ms_mns
)
const phase: CodeableConceptModel = CodeableConceptModel.createResearchStudyPhase(ModelUtils.UNAVAILABLE)
const site = undefined
const site: ReferenceModel[] = undefined
const sponsor: ReferenceModel = ReferenceModel.createPrimarySponsor(primarySponsorOrganizationId)
const status = riphJardeDto.etat as RiphStatus
const title = ModelUtils.emptyIfNull(riphJardeDto.titre_recherche)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/models/custom/ModelUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable sort-keys */
import { ModelUtils } from './ModelUtils'
import { AssignerForSecondaryIdentifier } from '../fhir/SpecialPurposeDataType/ReferenceModel'
import { AssignerForSecondaryIdentifier } from '../fhir/SpecialPurposeDataTypes/ReferenceModel'
import { riphCtisDto } from 'src/shared/test/helpers/elasticsearchHelper'

describe('shared | models | custom | ModelUtils', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/models/custom/ModelUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AssignerForSecondaryIdentifier } from '../fhir/SpecialPurposeDataType/ReferenceModel'
import { AssignerForSecondaryIdentifier } from '../fhir/SpecialPurposeDataTypes/ReferenceModel'

export class ModelUtils {
static UNAVAILABLE = 'INDISPONIBLE'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { CodeableConcept, Coding } from 'fhir/r4'

import { CodingModel } from './CodingModel'
import { ModelUtils } from '../../custom/ModelUtils'
import { ContactType } from '../MetadataType/ContactDetailModel'
import { LabelType } from '../SpecialPurposeDataType/ExtensionModel'
import { ContactType } from '../MetadataTypes/ContactDetailModel'
import { LabelType } from '../SpecialPurposeDataTypes/ExtensionModel'

export class CodeableConceptModel implements CodeableConcept {
constructor(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Coding } from 'fhir/r4'

import { administrativeGenderCodeSystem } from '../CodeSystem/administrativeGenderCodeSystem'
import { countryCodeSystem } from '../CodeSystem/countryCodeSystem'
import { eclaireTypeContactCodeSystem } from '../CodeSystem/eclaireTypeContactCodeSystem'
import { medDraCodeSystem } from '../CodeSystem/medDraCodeSystem'
import { researchStudyPhaseCodeSystem } from '../CodeSystem/researchStudyPhaseCodeSystem'
import { titleTypeCodeSystem } from '../CodeSystem/titleTypeCodeSystem'
import { ContactType } from '../MetadataType/ContactDetailModel'
import { LabelType } from '../SpecialPurposeDataType/ExtensionModel'
import { administrativeGenderCodeSystem } from '../CodeSystems/administrativeGenderCodeSystem'
import { countryCodeSystem } from '../CodeSystems/countryCodeSystem'
import { eclaireTypeContactCodeSystem } from '../CodeSystems/eclaireTypeContactCodeSystem'
import { medDraCodeSystem } from '../CodeSystems/medDraCodeSystem'
import { researchStudyPhaseCodeSystem } from '../CodeSystems/researchStudyPhaseCodeSystem'
import { titleTypeCodeSystem } from '../CodeSystems/titleTypeCodeSystem'
import { ContactType } from '../MetadataTypes/ContactDetailModel'
import { LabelType } from '../SpecialPurposeDataTypes/ExtensionModel'

export class CodingModel implements Coding {
constructor(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ContactPoint, Extension } from 'fhir/r4'

import { ExtensionModel } from '../SpecialPurposeDataType/ExtensionModel'
import { ExtensionModel } from '../SpecialPurposeDataTypes/ExtensionModel'

export class ContactPointModel implements ContactPoint {
constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Identifier, Reference } from 'fhir/r4'
import {
AssignerForSecondaryIdentifier,
ReferenceModel,
} from '../SpecialPurposeDataType/ReferenceModel'
} from '../SpecialPurposeDataTypes/ReferenceModel'

export class IdentifierModel implements Identifier {
constructor(
Expand Down
4 changes: 2 additions & 2 deletions src/shared/models/fhir/GroupCharacteristicModel.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CodeableConcept, GroupCharacteristic, Quantity, Range, Reference } from 'fhir/r4'

import { CodeableConceptModel } from './DataType/CodeableConceptModel'
import { RangeModel } from './DataType/RangeModel'
import { CodeableConceptModel } from './DataTypes/CodeableConceptModel'
import { RangeModel } from './DataTypes/RangeModel'
import { ModelUtils } from '../custom/ModelUtils'

export class GroupCharacteristicModel implements GroupCharacteristic {
Expand Down
6 changes: 3 additions & 3 deletions src/shared/models/fhir/LocationModel.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Address, ContactPoint, Identifier, Location } from 'fhir/r4'

import { AddressModel } from './DataType/AddressModel'
import { ContactPointModel } from './DataType/ContactPointModel'
import { IdentifierModel } from './DataType/IdentifierModel'
import { AddressModel } from './DataTypes/AddressModel'
import { ContactPointModel } from './DataTypes/ContactPointModel'
import { IdentifierModel } from './DataTypes/IdentifierModel'

export class LocationModel implements Location {
readonly resourceType: 'Location'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ContactDetail, ContactPoint, Extension } from 'fhir/r4'

import { ModelUtils } from '../../custom/ModelUtils'
import { ContactPointModel } from '../DataType/ContactPointModel'
import { ExtensionModel } from '../SpecialPurposeDataType/ExtensionModel'
import { ContactPointModel } from '../DataTypes/ContactPointModel'
import { ExtensionModel } from '../SpecialPurposeDataTypes/ExtensionModel'

export type ContactType = 'Public' | 'Scientific';

Expand Down
6 changes: 3 additions & 3 deletions src/shared/models/fhir/OrganizationContactModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
OrganizationContact,
} from 'fhir/r4'

import { CodeableConceptModel } from './DataType/CodeableConceptModel'
import { ContactPointModel } from './DataType/ContactPointModel'
import { HumanNameModel } from './DataType/HumanNameModel'
import { CodeableConceptModel } from './DataTypes/CodeableConceptModel'
import { ContactPointModel } from './DataTypes/ContactPointModel'
import { HumanNameModel } from './DataTypes/HumanNameModel'

export class OrganizationContactModel implements OrganizationContact {
constructor(
Expand Down
8 changes: 4 additions & 4 deletions src/shared/models/fhir/OrganizationModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
OrganizationContact,
} from 'fhir/r4'

import { AddressModel } from './DataType/AddressModel'
import { CodeableConceptModel } from './DataType/CodeableConceptModel'
import { ContactPointModel } from './DataType/ContactPointModel'
import { AddressModel } from './DataTypes/AddressModel'
import { CodeableConceptModel } from './DataTypes/CodeableConceptModel'
import { ContactPointModel } from './DataTypes/ContactPointModel'
import { OrganizationContactModel } from './OrganizationContactModel'
import { AssignerForSecondaryIdentifier } from './SpecialPurposeDataType/ReferenceModel'
import { AssignerForSecondaryIdentifier } from './SpecialPurposeDataTypes/ReferenceModel'
import { ModelUtils } from '../custom/ModelUtils'

export class OrganizationModel implements Organization {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { CodeableConcept, Extension, HumanName, Period, Reference } from 'fhir/r

import { ReferenceModel } from './ReferenceModel'
import { ModelUtils } from '../../custom/ModelUtils'
import { CodeableConceptModel } from '../DataType/CodeableConceptModel'
import { HumanNameModel } from '../DataType/HumanNameModel'
import { PeriodModel } from '../DataType/PeriodModel'
import { ContactType } from '../MetadataType/ContactDetailModel'
import { CodeableConceptModel } from '../DataTypes/CodeableConceptModel'
import { HumanNameModel } from '../DataTypes/HumanNameModel'
import { PeriodModel } from '../DataTypes/PeriodModel'
import { ContactType } from '../MetadataTypes/ContactDetailModel'

export class ExtensionModel implements Extension {
constructor(
Expand Down

0 comments on commit 0ad725b

Please sign in to comment.