Internal Service APIs

Internal Service APIs

Overview

Documents the internal service APIs.

Details

There is a collection of internal APIs that provide the core functionality. Applications could be developed to use a “within JVM” connection to these services and through JPA lazy initialization entire graphs of objects can be read from the database (in either their current state or any desired past state). 

Data model access services generally take either internal ids or terminology-specific assigned identifiers (e.g. SCTID) and return individual objects without any eagerly initialized connected data. TBD.. discuss this for each "type" of domain model object

Services that create, modify, or remove data objects ...

Dual independent review of map records is achieved by creating completely separate objects associated with each user and then comparing when both have indicated work on mapping the underlying concept is complete.

In general, methods that find data return search result objects with identifiers (with display labels) that can be used to perform subsequent lookups to retrieve the underlying model objects. These methods typically also take a paging/sorting/filtering parameter to allow for controlled access to the desired amount of data.

Root Service

All services implement root service which provides the following functionality

  • beginTransaction

    • Starts a transaction (if the transaction per operation setting is "false")

  • close

    • Closes the service and associated resources (e.g. a Hibernate session)

  • closeFactory

    • Closes the entity manager factor.

  • commit

    • Commits a transaction (if the transaction per operation setting is "false")

  • getTransactionPerOperation

    • Indicates whether or not the service is configured to autocommit on each call

  • openFactory

    • Opens the entity manager factory - timeouts periodically require this.

  • setTransactionPerOperation

    • Sets the flag indicating whether or not the service is configured to autocommit on each call

Security Service

The internal security service API supports the following functionality:

  • authenticate

    • Authenticates a user with a password and returns an authToken

  • getApplicationRoleForToken

    • Returns the application role for an authToken

  • getMapProjectRoleForToken

    • Returns the map project role for a map project id and authToken

  • getUsernameForToken

    • Returns the username for an authToken

Metadata Service

The internal metadata service API supports the following functionality:

  • getAllMetadata

    • Returns all metadata for a terminology/version

    • This is the key method of the class and supports a single call to get all metadata for a terminology

  • getAttributeValueRefSets

    • Returns all attribute value refsets for a terminology/version

  • getCaseSignificances

    • Returns all case significance values for a terminology/version

  • getComplexMapRefSets

    • Returns all complex map refsets for a terminology/version

  • getDefinitionStatuses

    • Returns all definition status values for a terminology/version

  • getDescriptionTypes

    • Returns all description types for a terminology/version

  • getHierarchicalRelationshipTypes

    • Returns the hierarchical relationship types for a terminology/version

  • getLanguageRefSets

    • Returns all language refsets for a terminology/version

  • getLatestVersion

    • Returns the latest version of a terminology

  • getMapRelations

    • Returns all map relation values for a terminology/version

  • getModules

    • Returns all modules for a terminology/version

  • getRelationshipCharacteristicTypes

    • Returns all relationship characteristic types for a terminology/version

  • getRelationshipModifiers

    • Returns all relationship modifier values for a terminology/version

  • getRelationshipTypes

    • Returns all relationship types for a terminology/version

  • getSimpleMapRefSets

    • Returns all simple map refsets for a terminology/version

  • getSimpleRefSets

    • Returns all simple refsets for a terminology/version

  • getTerminologies

    • Returns all terminologies

  • getTerminologyLatestVersions

    • Returns all terminologies with latest version info

  • getVersions

    • Returns all versions for a terminology

Content Service

The internal content service API supports the following functionality:

  • clearTreePositions

    • Remove all tree positions for a terminology

  • computeTreePositions

    • Compute tree positions for a terminology

  • findConceptsForQuery

    • Find concepts by a query

  • findDescendantConcepts

    • Find all descendant concept for a terminologyId/terminology/version

  • getAllConcepts

    • Return all concepts for a terminology/version

  • getAllDescriptionTerminologyIds

    • Return all description ids for a terminology/version

  • getAllLanguageRefSetMemberTerminologyIds

    • Return all language refset member ids for a terminology/version

  • getAllRelationshipTerminologyIds

    • Return all relationship ids for a terminology/version

  • getComplexMapRefSetMembersForRefSetId

    • Return all complex map refset members for a refset id

  • getConcept

    • Return a concept for a concept id

  • getConcept

    • Return a concept for a terminologyId/terminology/version

  • getConcepts

    • Return all concept

  • getConceptsModifiedSinceDate

    • Return concepts modified since a certain date for a terminology/version

  • getDescendantConceptsCount

    • Returns the count of descendants for a terminologyId/terminology/version

  • getRootTreePositions

    • Returns the root tree positions for a terminology/version

  • getTreePositionGraphForQuery

    • Returns a tree position graph for a query and terminologyId/terminology/version

  • getTreePositions

    • Returns all tree positions for a terminologyId/terminology/version

  • getTreePositionsWithChildren

    • Returns tree positions with children for a terminologyId/terminology/version

  • getTreePositionsWithDescendants

    • Returns all tree positions with descendants for a terminologyId/terminology/version

  • getTreePositionWithDescendants

    • Returns the first tree position with descendants for a terminologyId/terminology/version

  • updateComplexMapRefSetMember

    • Updates a complex map refset member - used by release processing

  • updateConcept

    • Updates a concept - used by drip feed

  • updateDescription

    • Updates a description - used by drip feed

  • updateLanguageRefSetMember

    • Updates a language refset member - used by drip feed

  • updateRelationship

    • Updates a relationship - used by drip feed

Mapping Service

The internal mapping service API supports the following functionality:

  • addMapAdvice(MapAdvice)

    • Adds a map advice for use by map entries

  • addMapAgeRange(MapAgeRange)

    • Adds a preset map age range for use by map entries

  • addMapPrinciple(MapPrinciple)

    • Adds a map principle for use by map records

  • addMapProject(MapProject)

    • Adds a map project

  • addMapRecord(MapRecord)

    • Adds a map record

  • addMapRelation(MapRelation)

    • Adds a map relation for use by map entries

  • addMapUser(MapUser)

    • Adds a map user

  • addMapUserPreferences(MapUserPreferences)

    • Adds a map user's preferences object

  • checkMapGroupsForMapProject(MapProject, boolean)

    • Validates (with option to correct) the group structure for all map records on a map project

  • createMapRecordsForMapProject(Long, MapUser, List<ComplexMapRefSetMember>, WorkflowStatus)

    • Creates map records with a given workflow status for a map project from a list of complex map ref set members

  • createMapRecordsForMapProject(Long, MapUser, List<ComplexMapRefSetMember>, WorkflowStatus, float)

    • Creates map records with a given workflow status for a map project from a sampled list of complex ref set members

  • createMapRecordsForMapProject(Long, WorkflowStatus)

    • Creates map records with a given workflow status for a map project from previously loaded complex map ref set members

  • findConceptsExcludedFromScope(Long, PfsParameter)

    • Calculates paged/filtered/sorted concepts excluded from scope given a map project id

  • findConceptsInScope(Long, PfsParameter)

    • Calculates paged/filtered/sorted concepts included in scope given a map project id

  • findMappedConceptsOutOfScopeBounds(Long, PfsParameter)

    • Calculates paged/filtered/sorted concepts that are out of scope but have existing mappings

  • findMapProjectsForQuery(String, PfsParameter)

    • Returns paged/filtered/sorted map projects for a string query

  • findMapRecordsForQuery(String, PfsParameter)

    • Returns paged/filtered/sorted map records for a string query

  • findUnmappedConceptsInScope(Long, PfsParameter)

    • Calculates paged/filtered/sorted in-scope concepts with no mappings for a map project

  • findUnmappedDescendantsForConcept(String, Long, PfsParameter)

    • Calculates paged/filtered/sorted descendants with no existing map records for a concept and project

  • getMapAdvices()

    • Gets all map advices

  • getMapAgeRanges()

    • Gets all preset map age ranges

  • getMapPrinciple(Long)

    • Gets a map principle by id

  • getMapPrinciples()

    • Gets all map principles

  • getMapProject(Long)

    • Gets a map project by id

  • getMapProjectForRefSetId(String)

    • Gets a map project by ref set id

  • getMapProjectMetadata()

    • Returns a key-value pair list of project metadata parameters

  • getMapProjects()

    • Gets all map projects

  • getMapProjectsForMapUser(MapUser)

    • Gets all map projects on which specified user has a role

  • getMapRecord(Long)

    • Gets a map record by id

  • getMapRecordRevisions(Long)

    • Gets all revisions of a map record from audit table by id

  • getMapRecordRevisionsForConcept(String, Long)

    • Gets all revisions of all map records from audit table by terminology Id and project

  • getMapRecords()

    • Gets all map records

  • getMapRecordsForConcept(String)

    • Gets all map records for a terminology id

  • getMapRecordsForMapProject(Long)

    • Gets all map records for a map project

  • getMapRecordsForProjectAndConcept(Long, String)

    • Gets all map records for a map project and terminology id

  • getMapRelations()

    • Gets all map relations

  • getMapUser(Long)

    • Gets a map user by id

  • getMapUser(String)

    • Gets a map user by user name

  • getMapUserPreferences()

    • Gets all map user preferences objects

  • getMapUserPreferences(String)

    • Gets a map user's preference object by user name

  • getMapUserRoleForMapProject(String, Long)

    • Gets a map user's role by map project id and user name

  • getMapUsers()

    • Gets all map users

  • getOriginMapRecordsForConflict(Long)

    • Gets origin map records leading to a conflict or review for a map record id

  • getProjectSpecificAlgorithmHandler(MapProject)

    • Gets the instantiated project specific algorithm handler for a map project

  • getPublishedAndReadyForPublicationMapRecordsForMapProject(Long, PfsParameter)

    • Gets paged/filtered/sorted published and publication-ready map records for a map project

  • getPublishedMapRecordsForMapProject(Long, PfsParameter)

    • Gets paged/filtered/sorted published map records for a map project

  • getRecentlyEditedMapRecords(Long, String, PfsParameter)

    • Gets newest-first paged/filtered/sorted map records edited by a user on a particular project

  • getScopeConceptsForMapProject(MapProject, PfsParameter)

    • Gets paged/sorted/filters enumerated scope concepts for a map project, without descendant calculation

  • getScopeExcludedConceptsForMapProject(MapProject, PfsParameter)

    • Gets paged/sorted/filtered enumerated scope excluded concepts for a map project, without descendant calculation

  • isConceptExcludedFromScope(String, Long)

    • Returns true if concept is explicitly excluded from map project's scope

  • isConceptInScope(String, Long)

    • Returns true if concept is in map project;s scope

  • isConceptOutOfScopeBounds(String, Long)

    • Returns true if concept is out of scope bounds

  • removeMapAdvice(Long)

    • Removes a map advice by id

  • removeMapAdviceFromEnvironment(MapAdvice)

    • Removes a map advice by id;  also removes attached map advice from all map entries, map projects

  • removeMapAgeRange(Long)

    • Removes a preset map age range by id

  • removeMapPrinciple(Long)

    • Removes a map principle by id

  • removeMapProject(Long)

    • Removes a map project by id

  • removeMapRecord(Long)

    • Removes a map record by id

  • removeMapRecordsForMapProject(Long)

    • Removes all map records for a map project id

  • removeMapRelation(Long)

    • Removes a map relation by id

  • removeMapUser(Long)

    • Removes a map user by id

  • removeMapUserPreferences(Long)

    • Removes a map user's preference object by id

  • setTreePositionTerminologyNotes(List<TreePosition>, Long)

    • Adds map project and terminology-specific notes to tree positions

  • setTreePositionValidCodes(List<TreePosition>, Long)

    • Sets whether concepts in tree positions are valid for assignment based on terminology and map project

  • updateMapAdvice(MapAdvice)

    • Updates a map advice

  • updateMapAgeRange(MapAgeRange)

    • Updates a preset map age range

  • updateMapPrinciple(MapPrinciple)

    • Updates a map principle

  • updateMapProject(MapProject)

    • Updates a map project

  • updateMapRecord(MapRecord)

    • Updates a map record

  • updateMapRelation(MapRelation)

    • Updates a map relation

  • updateMapUser(MapUser)

    • Updates a map user

  • updateMapUserPreferences(MapUserPreferences)

    • Updates a map user's preferences object

 

Workflow Service

The internal workflow service API supports the following functionality:

  • addFeedback(Feedback)

    • Adds a feedback

  • addFeedbackConversation(FeedbackConversation)

    • Adds a feedback conversation

  • addTrackingRecord(TrackingRecord)

    • Adds a tracking record

  • addWorkflowException(WorkflowException)

    • Adds a workflow exception

  • clearWorkflowForMapProject(MapProject)

    • Clears workflow for a map project

  • computeUntrackedMapRecords(MapProject)

    • Computes non-publication-ready map records that are not correctly tracked in workflow

  • computeWorkflow(MapProject)

    • Computes workflow for a map project based on scope and existing map records

  • computeWorkflowStatusErrors(MapProject)

    • Validates workflow for all tracking records and map records for a map project

  • createQAWork(Report)

Copyright © 2025, SNOMED International