Skip to content

Commit

Permalink
Use correct class type for FROM clause on criteria page
Browse files Browse the repository at this point in the history
  • Loading branch information
askask committed Jun 17, 2024
1 parent e54a3d7 commit fc28278
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/shared/models/aqb/aqb-contains-item-ui.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { IAqbContainmentNode } from 'src/app/shared/models/archetype-query-build
import { AqbNodeType } from 'src/app/shared/models/archetype-query-builder/builder-request/aqb-node-type.enum'
import { ConnectorNodeType } from 'src/app/shared/models/connector-node-type.enum'

const archetypeToClassType = /openEHR-EHR-([A-Z]*)\..*/

export class AqbContainsItemUiModel {
readonly type = ConnectorNodeType.Aqb_Item
compositionId: string
Expand All @@ -21,9 +23,10 @@ export class AqbContainsItemUiModel {
}

convertToApi(): IAqbContainmentNode {
const match = this.archetypeId.match(archetypeToClassType)
return {
_type: AqbNodeType.Containment,
type: 'OBSERVATION',
type: match[1],
identifier: `o${this.archetypeReferenceId}`,
predicates: `[${this.archetypeId}]`,
}
Expand Down

0 comments on commit fc28278

Please sign in to comment.