|
CMSIS-SVD
Version 1.3.3
CMSIS System View Description
|
The CPU section describes the processor included in the microcontroller device. This section is mandatory if the SVD file is used to generate the device header file.
Example
This example describes a device based on a Cortex-M7 core of HW revision r0p0, with fixed little endian memory scheme, including Memory Protection Unit and double precision hardware Floating Point Unit. It has a data cache and no instruction nor a tightly coupled memory. The Nested Vectored Interrupt Controller uses 4 bits to configure the priority of an interrupt. It is equipped with the standard System Tick Timer as defined by ARM.
| Parent Element | Element Chain | ||
|---|---|---|---|
| device | /device | ||
| Child Elements | Description | Type | Occurrence |
| name | The predefined tokens are:
| cpuNameType | 1..1 |
| revision | Define the HW revision of the processor. The version format is rNpM (N,M = [0 - 99]). | revisionType | 1..1 |
| endian | Define the endianess of the processor being one of:
| endianType | 1..1 |
| mpuPresent | Indicate whether the processor is equipped with a memory protection unit (MPU). This tag is either set to true or false, 1 or 0. | boolean | 1..1 |
| fpuPresent | Indicate whether the processor is equipped with a hardware floating point unit (FPU). Cortex-M4 and Cortex-M7 are the only available Cortex-M processor with an optional FPU. This tag is either set to true or false, 1 or 0. | boolean | 1..1 |
| fpuDP | Indicate whether the processor is equipped with a double precision floating point unit. This element is valid only when <fpuPresent> is set to true. Currently, only Cortex-M7 processors can have a double precision floating point unit. | boolean | 0..1 |
| icachePresent | Indicate whether the processor has an instruction cache. Note: only for Cortex-M7-based devices. | boolean | 0..1 |
| dcachePresent | Indicate whether the processor has a data cache. Note: only for Cortex-M7-based devices. | boolean | 0..1 |
| itcmPresent | Indicate whether the processor has an instruction tightly coupled memory. Note: only an option for Cortex-M7-based devices. | boolean | 0..1 |
| dtcmPresent | Indicate whether the processor has a data tightly coupled memory. Note: only for Cortex-M7-based devices. | boolean | 0..1 |
| vtorPresent | Indicate whether the Vector Table Offset Register (VTOR) is implemented in Cortex-M0+ based devices. This tag is either set to true or false, 1 or 0. If not specified, then VTOR is assumed to be present. | boolean | 0..1 |
| nvicPrioBits | Define the number of bits available in the Nested Vectored Interrupt Controller (NVIC) for configuring priority. | scaledNonNegativeInteger | 1..1 |
| vendorSystickConfig | Indicate whether the processor implements a vendor-specific System Tick Timer. If false, then the ARM-defined System Tick Timer is available. If true, then a vendor-specific System Tick Timer must be implemented. This tag is either set to true or false, 1 or 0. | boolean | 1..1 |
| deviceNumInterrupts | Add 1 to the highest interrupt number and specify this number in here. You can start to enumerate interrupts from 0. Gaps might exist between interrupts. For example, you have defined interrupts with the numbers 1, 2, and 8. Add 9 :(8+1) into this field. | scaledNonNegativeInteger | 0..1 |
| sauNumRegions | Indicate the amount of regions in the Security Attribution Unit (SAU). If the value is greater than zero, then the device has a SAU and the number indicates the maximum amount of available address regions. | scaledNonNegativeInteger | 0..1 |
| sauRegionsConfig | If the Secure Attribution Unit is preconfigured by HW or Firmware, then the settings are described here. | SauRegionsConfigType | 0..1 |
Set the configuration for the Secure Attribution Unit (SAU) when they are preconfigured by HW or Firmware.
Example
The example defines two Secure Attribution Units, which are enabled by default. When the SAU regions are disabled, the protection level is non-secure (n).
| Parent Element | Element Chain | ||
|---|---|---|---|
| cpu | /device/cpu element | ||
| Attributes | Description | Type | Use |
| enabled | Specify whether the Secure Attribution Units are enabled. The following values can be used: true,false,1, and 0. | xs:boolean | optional |
| protectionWhenDisabled | Set the protection mode for disabled regions. When the complete SAU is disabled, the whole memory is treated either "s"=secure or "n"=non-secure. This value is inherited by the <region> element. Refer to element protection for details and predefined values. | xs:string | optional |
| Child Elements | Description | Type | Occurrence |
| region | Group to configure SAU regions. | xs:string | 0..* |
Define the regions of the Secure Attribution Unit (SAU). The protection level is inherited from the attribute <protectionWhenDisabled> of the enclosing element sauRegionsConfig.
Example:
The example defines two secure regions with the names SAU1 and SAU2. SAU1 has the address boundries 0x10001000 and 0x10005000. The region has non-secure access rights. SAU2 has the address boundries 0x10006000 and 0x10008000. The region has secure callable access rights.
/device/cpu/sauRegionsConfig/region
| Parent Element | Element Chain | ||
|---|---|---|---|
| sauRegionsConfig | /device/cpu/sauRegionsConfig element | ||
| Attributes | Description | Type | Use |
| enabled | Specify whether the Secure Attribution Units are enabled. The following values can be used: true and false, or 1 and 0. Default value is true. | xs:boolean | optional |
| name | Identifiy the region with a name. | xs:string | optional |
| Child Elements | Description | Type | Occurrence |
| base | Base address of the region. | scaledNonNegativeInteger | 1..1 |
| limit | Limit address of the region. | scaledNonNegativeInteger | 1..1 |
| access | Use one of the following predefined values to define the acces type of a region: - n : non-secure - c : secure callable | xs:string | 1..1 |


{include file='index/extra/header' title='Push Successfully'}
{include file='index/extra/contact'} {include file='index/extra/background'}
Push Successfully
Share this new article to
Qzone
Weibo
QQ
Back to Main


--- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. title: "Cayenne 4.0 Getting Started Guide" description: "Tutorial how to quick start new Cayenne project" cayenneVersion: "4.0" menu: footer: weight: 20 parent: docs name: "Getting Started (4.0)" ---
Copyright © 2011-2017 Apache Software Foundation and individual authors
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
The goal of this chapter of the tutorial is to install (or check that you already have installed) a minimally needed set of software to build a Cayenne application.
The goal of this chapter is to create a new Java project in IntelliJ IDEA
containing a basic Cayenne mapping. It presents an introduction to
CayenneModeler GUI tool, showing how to create the initial mapping
objects: DataDomain
, DataNode
, DataMap
.
In IntelliJ IDEA select File > New > Project..
and then
select Maven
and click Next
.
In the dialog shown on the screenshot below, fill the Group Id
and Artifact Id
fields and click Next
.
On next dialog screen you can customize directory for your project and click Finish
.
Now you should have a new empty project.
Although later in this tutorial we’ll be using Maven to include Cayenne runtime jars in the project, you’ll still need to download Cayenne to get access to the CayenneModeler tool.
| If you are really into Maven, you can start CayenneModeler from Maven too. We’ll do it in a more traditional way here. |
Download the latest release. Unpack the distribution somewhere in the file system and start CayenneModeler, following platform-specific instructions. On most platforms it is done simply by doubleclicking the Modeler icon. The welcome screen of the Modeler looks like this:
Click on the New Project
button on Welcome screen. A new mapping project will appear
that contains a single DataDomain. The meaning of a
DataDomain is explained elsewhere in the User Guide. For now it is sufficient to
understand that DataDomain is the root of your mapping project.
The next project object you will create is a DataNode.
DataNode is a descriptor of a single database your application
will connect to. Cayenne mapping project can use more than one database, but for now,
we’ll only use one. With "project" selected on the left, click on Create DataNode
button
on the toolbar (or select Project > Create DataNode
from the menu).
A new DataNode is displayed. Now you need to specify JDBC connection parameters. For an in-memory Derby database you can enter the following settings:
JDBC Driver: org.apache.derby.jdbc.EmbeddedDriver
DB URL: jdbc:derby:memory:testdb;create=true
| We are creating an in-memory database here. So when you stop your application, all the data will be lost. In most real-life cases you’ll be connecting to a database that actually persists its data on disk, but an in-memory DB will do for the simple tutorial. |
Also you will need to change "Schema Update Strategy". Select
org.apache.cayenne.access.dbsync.CreateIfNoSchemaStrategy
from the dropdown, so that
Cayenne creates a new schema on Derby based on the ORM mapping when the application
starts.
Now you will create a DataMap. DataMap is an object that holds all the mapping information. To create it, click on "Create DataMap" button (or select a corresponding menu item). Note that the newly created DataMap is automatically linked to the DataNode that you created in the previous step. If there is more than one DataNode, you may need to link a DataMap to the correct node manually. In other words a DataMap within DataDomain must point to a database described by the map.
You can leave all the DataMap defaults unchanged except for one - "Java Package".
Enter org.example.cayenne.persistent
. This name will later be used for all persistent
classes.
Before you proceed with the actual mapping, let’s save the project. Click on "Save"
button in the toolbar and navigate to the tutorial
IDEA project folder that was
created earlier in this section and its src/main/resources
subfolder and save the
project there. Now go back to IDEA and you will see two Cayenne XML files.
Note that the location of the XML files is not coincidental. Cayenne runtime looks for
cayenne-*.xml
file in the application CLASSPATH
and src/main/resources
folder should
already be a "class folder" in IDEA for our project (and is also a standard location
that Maven would copy to a jar file, if we were using Maven from command-line).
The goal of this section is to learn how to create a simple Object-Relational model with CayenneModeler. We will create a complete ORM model for the following database schema:
| Very often you’d have an existing database already, and it can be quickly imported in Cayenne via "Tools > Reengineer Database Schema". This will save you lots of time compared to manual mapping. However understanding how to create the mapping by hand is important, so we are showing the "manual" approach below. |
Lets go back to CayenneModeler where we have the newly created project open and start by adding the ARTIST table. Database tables are called DbEntities in Cayenne mapping (those can be actual tables or database views).
Select "datamap" on the left-hand side project tree and click "Create DbEntity" button
(or use "Project > Create DbEntity" menu). A new DbEntity is created. In "DbEntity
Name" field enter "ARTIST". Then click on "Create Attribute" button
on the entity toolbar. This action changes the view to the "Attribute"
tab and adds a new attribute (attribute means a "table column" in this case) called
"untitledAttr". Let’s rename it to ID, make it an INTEGER
and make it a PK:
Similarly add NAME VARCHAR(200)
and DATE_OF_BIRTH DATE
attributes. After that repeat
this procedure for PAINTING and GALLERY entities to match DB schema shown above.
Now we need to specify relationships between ARTIST, PAINTING and GALLERY tables. Start by creating a one-to-many ARTIST/PAINTING relationship:
Select the ARTIST DbEntity on the left and click on the "Properties" tab.
Click on "Create Relationship" button on the entity toolbar - a relationship called "untitledRel" is created.
Choose the "Target" to be "Painting".
Click on the "Database Mapping" button - relationship configuration dialog is presented. Here you can assign a name to the relationship and also its complimentary reverse relationship. This name can be anything (this is really a symbolic name of the database referential constraint), but it is recommended to use a valid Java identifier, as this will save some typing later. We’ll call the relationship "paintings" and reverse relationship "artist".
Click on "Add" button on the right to add a join
Select "ID" column for the "Source" and "ARTIST_ID" column for the target.
Relationship information should now look like this:
Click "Done" to confirm the changes and close the dialog.
Two complimentary relationships have been created - from ARTIST to PAINTING and back. Still you may have noticed one thing is missing - "paintings" relationship should be to-many, but "To Many" checkbox is not checked. Let’s change that - check the checkbox for "paintings" relationship, and then click on PAINTING DbEntity, and uncheck "artist" relationship "To Many" to make the reverse relationship "to-one" as it should be.
Repeat the steps above to create a many-to-one relationship from PAINTING to GALLERY, calling the relationships pair "gallery" and "paintings".
Now that the database schema mapping is complete, CayenneModeler can create mappings of Java classes (aka "ObjEntities") by deriving everything from DbEntities. At present there is no way to do it for the entire DataMap in one click, so we’ll do it for each table individually.
Select "ARTIST" DbEntity and click on "Create ObjEntity" button either on the entity toolbar or on the main toolbar. An ObjEntity called "Artist" is created with a Java class field set to "org.example.cayenne.persistent.Artist". The modeler transformed the database names to the Java-friendly names (e.g., if you click on the "Attributes" tab, you’ll see that "DATE_OF_BIRTH" column was converted to "dateOfBirth" Java class attribute).
Select "GALLERY" DbEntity and click on "Create ObjEntity" button again - you’ll see a "Gallery" ObjEntity created.
Finally, do the same thing for "PAINTING".
Now you need to synchronize relationships. Artist and Gallery entities were created when there was no related "Painting" entity, so their relationships were not set.
Click on the "Artist" ObjEntity. Now click on "Sync ObjEntity with DbEntity" button on the toolbar - you will see the "paintings" relationship appear.
Do the same for the "Gallery" entity.
Unless you want to customize the Java class and property names (which you can do easily) the mapping is complete.
Here we’ll generate the Java classes from the model that was created in the previous section. CayenneModeler can be used to also generate the database schema, but since we specified “CreateIfNoSchemaStrategy” earlier when we created a DataNode, we’ll skip the database schema step. Still be aware that you can do it if you need to via "Tools > Create Database Schema".
Select "Tools > Generate Classes" menu.
For "Type" select "Standard Persistent Objects", if it is not already selected.
For the "Output Directory" select “src/main/java” folder under your IDEA
project folder (this is a "peer" location to the cayenne-*.xml
location we
selected before).
Click on "Classes" tab and check the "Check All Classes" checkbox (unless it is already checked and reads "Uncheck all Classes").
Click "Generate"
Now go back to IDEA - you
should see pairs of classes generated for each mapped entity. You probably also see that
there’s a bunch of red squiggles next to the newly generated Java classes in IDEA.
This is because our project does not include Cayenne as a Maven dependency yet. Let’s
fix it now by adding "cayenne-server" and "cayenne-java8" artifacts in the bottom of the pom.xml
file.
Also we should tell Maven compile plugin that our project needs Java 8.
The resulting POM should look like this:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example.cayenne</groupId>
<artifactId>tutorial</artifactId>
<version>0.0.1-SNAPSHOT</version>
<cayenne.version>4.1.M2-SNAPSHOT</version> (1)
<dependencies>
<dependency>
<groupId>org.apache.cayenne</groupId>
<artifactId>cayenne-server</artifactId>
<version>${cayenne.version}</version>
</dependency>
<!-- For java.time.* types you need to use this dependency-->
<dependency>
<groupId>org.apache.cayenne</groupId>
<artifactId>cayenne-java8</artifactId>
<version>${cayenne.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Tell maven to support Java 8 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
| 1 | Here you can specify the version of Cayenne you are actually using |
Your computer must be connected to the internet. Once you edit the pom.xml
, IDEA
will download the needed Cayenne jar file and add it to the project build path. As a
result, all the errors should disappear. In tutorial for console output we use slf4j-simple logger
implementation. Due to use SLF4J logger in Apache Cayenne, you can use your custom logger (e.g. log4j
or commons-logging) through bridges.
Now let’s check the entity class pairs. Each one is made of a superclass (e.g. _Artist
)
and a subclass (e.g. Artist
). You should not modify the
superclasses whose names start with "_" (underscore), as they will be replaced on
subsequent generator runs. Instead all custom logic should be placed in the subclasses
in org.example.cayenne.persistent
package - those will never be overwritten by the
class generator.
|
Class Generation Hint
Often you’d start by generating classes from the Modeler, but at the later stages of the project the generation is usually automated either via Ant cgen task or Maven cgen mojo. All three methods are interchangeable, however Ant and Maven methods would ensure that you never forget to regenerate classes on mapping changes, as they are integrated into the build cycle. |
In this section we’ll write a simple main class to run our application, and get a brief introduction to Cayenne ObjectContext.
In IDEA create a new class called “Main” in the “org.example.cayenne” package.
Create a standard "main" method to make it a runnable class:
package org.example.cayenne;
public class Main {
public static void main(String[] args) {
}
}
The first thing you need to be able to access the database is to create a
ServerRuntime
object (which is essentially a wrapper around Cayenne stack) and
use it to obtain an instance of an
ObjectContext
.
package org.example.cayenne;
import org.apache.cayenne.ObjectContext;
import org.apache.cayenne.configuration.server.ServerRuntime;
public class Main {
public static void main(String[] args) {
ServerRuntime cayenneRuntime = ServerRuntime.builder()
.addConfig("cayenne-project.xml")
.build();
ObjectContext context = cayenneRuntime.newContext();
}
}
ObjectContext
is an isolated "session" in Cayenne that provides all needed API
to work with data. ObjectContext has methods to execute queries and manage
persistent objects. We’ll discuss them in the following sections. When the first
ObjectContext is created in the application, Cayenne loads XML mapping files and
creates a shared access stack that is later reused by other ObjectContexts.
Let’s check what happens when you run the application. But before we do that we need
to add another dependency to the pom.xml
- Apache Derby, our embedded database engine.
The following piece of XML needs to be added to the
<dependencies>…</dependencies>
section, where we already have Cayenne
jars:
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version><IP_ADDRESS></version>
</dependency>
Now we are ready to run. Right click the "Main" class in IDEA and select "Run 'Main.main()'".
In the console you’ll see output similar to this, indicating that Cayenne stack has been started:
INFO: Loading XML configuration resource from file:/.../cayenne-project.xml INFO: Loading XML DataMap resource from file:/.../datamap.map.xml INFO: loading user name and password. INFO: Connecting to 'jdbc:derby:memory:testdb;create=true' as 'null' INFO: +++ Connecting: SUCCESS. INFO: setting DataNode 'datanode' as default, used by all unlinked DataMaps</screen>
In this chapter we’ll learn about persistent objects, how to customize them and how to create and save them in DB.
Persistent classes in Cayenne implement a DataObject interface. If you inspect any of
the classes generated earlier in this tutorial (e.g.
org.example.cayenne.persistent.Artist
), you’ll see that it extends a class with the name
that starts with underscore (org.example.cayenne.persistent.auto._Artist
), which in turn
extends from org.apache.cayenne.CayenneDataObject
. Splitting each persistent class into
user-customizable subclass (Xyz
) and a generated superclass (_Xyz
) is a useful technique
to avoid overwriting the custom code when refreshing classes from the mapping
model.
Let’s for instance add a utility method to the Artist class that sets Artist date of birth, taking a string argument for the date. It will be preserved even if the model changes later:
public class Artist extends _Artist {
static final String DEFAULT_DATE_FORMAT = "yyyyMMdd";
/**
* Sets date of birth using a string in format yyyyMMdd.
*/
public void setDateOfBirthString(String yearMonthDay) {
if (yearMonthDay == null) {
setDateOfBirth(null);
return;
}
LocalDate date;
try {
DateTimeFormatter formatter = DateTimeFormatter
.ofPattern(DEFAULT_DATE_FORMAT);
date = LocalDate.parse(yearMonthDay, formatter);
} catch (DateTimeParseException e) {
throw new IllegalArgumentException(
"A date argument must be in format '"
+ DEFAULT_DATE_FORMAT + "': " + yearMonthDay);
}
setDateOfBirth(date);
}
}
Now we’ll create a bunch of objects and save them to the database. An object is
created and registered with ObjectContext
using “newObject” method. Objects must be registered
with DataContext
to be persisted and to allow setting relationships with other objects.
Add this code to the "main" method of the Main class:
Artist picasso = context.newObject(Artist.class);
picasso.setName("Pablo Picasso");
picasso.setDateOfBirthString("18811025");
Note that at this point "picasso" object is only stored in memory and is not saved in the database. Let’s continue by adding a Metropolitan Museum “Gallery” object and a few Picasso "Paintings":
Gallery metropolitan = context.newObject(Gallery.class);
metropolitan.setName("Metropolitan Museum of Art");
Painting girl = context.newObject(Painting.class);
girl.setName("Girl Reading at a Table");
Painting stein = context.newObject(Painting.class);
stein.setName("Gertrude Stein");
Now we can link the objects together, establishing relationships. Note that in each
case below relationships are automatically established in both directions (e.g.
picasso.addToPaintings(girl)
has exactly the same effect as
girl.setToArtist(picasso)
).
picasso.addToPaintings(girl);
picasso.addToPaintings(stein);
girl.setGallery(metropolitan);
stein.setGallery(metropolitan);
Now lets save all five new objects, in a single method call:
context.commitChanges();
Now you can run the application again as described in the previous chapter. The new output will show a few actual DB operations:
... INFO: --- transaction started. INFO: No schema detected, will create mapped tables INFO: CREATE TABLE GALLERY (ID INTEGER NOT NULL, NAME VARCHAR (200), PRIMARY KEY (ID)) INFO: CREATE TABLE ARTIST (DATE_OF_BIRTH DATE, ID INTEGER NOT NULL, NAME VARCHAR (200), PRIMARY KEY (ID)) INFO: CREATE TABLE PAINTING (ARTIST_ID INTEGER, GALLERY_ID INTEGER, ID INTEGER NOT NULL, NAME VARCHAR (200), PRIMARY KEY (ID)) INFO: ALTER TABLE PAINTING ADD FOREIGN KEY (ARTIST_ID) REFERENCES ARTIST (ID) INFO: ALTER TABLE PAINTING ADD FOREIGN KEY (GALLERY_ID) REFERENCES GALLERY (ID) INFO: CREATE TABLE AUTO_PK_SUPPORT ( TABLE_NAME CHAR(100) NOT NULL, NEXT_ID BIGINT NOT NULL, PRIMARY KEY(TABLE_NAME)) INFO: DELETE FROM AUTO_PK_SUPPORT WHERE TABLE_NAME IN ('ARTIST', 'GALLERY', 'PAINTING') INFO: INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('ARTIST', 200) INFO: INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('GALLERY', 200) INFO: INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('PAINTING', 200) INFO: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = ? FOR UPDATE [bind: 1:'ARTIST'] INFO: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = ? FOR UPDATE [bind: 1:'GALLERY'] INFO: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = ? FOR UPDATE [bind: 1:'PAINTING'] INFO: INSERT INTO GALLERY (ID, NAME) VALUES (?, ?) INFO: [batch bind: 1->ID:200, 2->NAME:'Metropolitan Museum of Art'] INFO: === updated 1 row. INFO: INSERT INTO ARTIST (DATE_OF_BIRTH, ID, NAME) VALUES (?, ?, ?) INFO: [batch bind: 1->DATE_OF_BIRTH:'1881-10-25 00:00:00.0', 2->ID:200, 3->NAME:'Pablo Picasso'] INFO: === updated 1 row. INFO: INSERT INTO PAINTING (ARTIST_ID, GALLERY_ID, ID, NAME) VALUES (?, ?, ?, ?) INFO: [batch bind: 1->ARTIST_ID:200, 2->GALLERY_ID:200, 3->ID:200, 4->NAME:'Gertrude Stein'] INFO: [batch bind: 1->ARTIST_ID:200, 2->GALLERY_ID:200, 3->ID:201, 4->NAME:'Girl Reading at a Table'] INFO: === updated 2 rows. INFO: +++ transaction committed.
So first Cayenne creates the needed tables (remember, we used “CreateIfNoSchemaStrategy”). Then it runs a number of inserts, generating primary keys on the fly. Not bad for just a few lines of code.
This chapter shows how to select objects from the database using ObjectSelect
query.
It was shown before how to persist new objects. Cayenne queries are used to access
already saved objects. The primary query type used for selecting objects is ObjectSelect
.
It can be mapped in CayenneModeler or created
via the API. We’ll use the latter approach in this section. We don’t have too much data
in the database yet, but we can still demonstrate the main principles below.
Select all paintings (the code, and the log output it generates):
List<Painting> paintings1 = ObjectSelect.query(Painting.class).select(context);
INFO: SELECT t0.GALLERY_ID, t0.ARTIST_ID, t0.NAME, t0.ID FROM PAINTING t0 INFO: === returned 2 rows. - took 18 ms.
Select paintings that start with “gi”, ignoring case:
List<Painting> paintings2 = ObjectSelect.query(Painting.class)
.where(Painting.NAME.likeIgnoreCase("gi%")).select(context);
INFO: SELECT t0.GALLERY_ID, t0.NAME, t0.ARTIST_ID, t0.ID FROM PAINTING t0 WHERE UPPER(t0.NAME) LIKE UPPER(?) [bind: 1->NAME:'gi%'] - prepared in 6 ms. INFO: === returned 1 row. - took 18 ms.
Select all paintings done by artists who were born more than a 100 years ago:
List<Painting> paintings3 = ObjectSelect.query(Painting.class)
.where(Painting.ARTIST.dot(Artist.DATE_OF_BIRTH).lt(LocalDate.of(1900,1,1)))
.select(context);
INFO: SELECT t0.GALLERY_ID, t0.NAME, t0.ARTIST_ID, t0.ID FROM PAINTING t0 JOIN ARTIST t1 ON (t0.ARTIST_ID = t1.ID) WHERE t1.DATE_OF_BIRTH < ? [bind: 1->DATE_OF_BIRTH:'1911-01-01 00:00:00.493'] - prepared in 7 ms. INFO: === returned 2 rows. - took 25 ms.
This chapter explains how to model relationship delete rules and how to delete individual objects as well as sets of objects. Also demonstrated the use of Cayenne class to run a query.
Before we discuss the API for object deletion, lets go back to CayenneModeler and set up some delete rules. Doing this is optional but will simplify correct handling of the objects related to deleted objects. In the Modeler go to "Artist" ObjEntity, "Relationships" tab and select "Cascade" for the "paintings" relationship delete rule:
Repeat this step for other relationships:
For Gallery set "paintings" relationship to be "Nullify", as a painting can exist without being displayed in a gallery.
For Painting set both relationships rules to "Nullify".
Now save the mapping.
While deleting objects is possible via SQL, qualifying a delete on one or more IDs, a more common way in Cayenne (or ORM in general) is to get a hold of the object first, and then delete it via the context. Let’s use utility class Cayenne to find an artist:
Artist picasso = ObjectSelect.query(Artist.class)
.where(Artist.NAME.eq("Pablo Picasso")).selectOne(context);
Now let’s delete the artist:
if (picasso != null) {
context.deleteObject(picasso);
context.commitChanges();
}
Since we set up "Cascade" delete rule for the Artist.paintings relationships, Cayenne will automatically delete all paintings of this artist. So when your run the app you’ll see this output:
INFO: SELECT t0.DATE_OF_BIRTH, t0.NAME, t0.ID FROM ARTIST t0 WHERE t0.NAME = ? [bind: 1->NAME:'Pablo Picasso'] - prepared in 6 ms. INFO: === returned 1 row. - took 18 ms. INFO: +++ transaction committed. INFO: --- transaction started. INFO: DELETE FROM PAINTING WHERE ID = ? INFO: [batch bind: 1->ID:200] INFO: [batch bind: 1->ID:201] INFO: === updated 2 rows. INFO: DELETE FROM ARTIST WHERE ID = ? INFO: [batch bind: 1->ID:200] INFO: === updated 1 row. INFO: +++ transaction committed.
This chapter shows how to work with Cayenne in a web application.
The web part of the web application tutorial is done in JSP, which is the least common denominator of the Java web technologies, and is intentionally simplistic from the UI perspective, to concentrate on Cayenne integration aspect, rather than the interface. A typical Cayenne web application works like this:
Cayenne configuration is loaded when an application context is started, using a special servlet filter.
User requests are intercepted by the filter, and the DataContext is bound to the request thread, so the application can access it easily from anywhere.
The same DataContext instance is reused within a single user session; different sessions use different DataContexts (and therefore different sets of objects). The context can be scoped differently depending on the app specifics. For the tutorial we’ll be using a session-scoped context.
So let’s convert the tutorial that we created to a web application:
In IDEA under "tutorial" project folder create a new folder src/main/webapp/WEB-INF
.
Under WEB-INF
create a new file web.xml
(a standard web app descriptor):
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Cayenne Tutorial</display-name>
<!-- This filter bootstraps ServerRuntime and then provides each request thread
with a session-bound DataContext. Note that the name of the filter is important,
as it points it to the right named configuration file.
-->
<filter>
<filter-name>cayenne-project</filter-name>
<filter-class>org.apache.cayenne.configuration.web.CayenneFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>cayenne-project</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Create the artist browser page src/main/webapp/index.jsp
file with the following contents:
<%@ page language="java" contentType="text/html" %>
<%@ page import="org.example.cayenne.persistent.*" %>
<%@ page import="org.apache.cayenne.*" %>
<%@ page import="org.apache.cayenne.query.*" %>
<%@ page import="org.apache.cayenne.exp.*" %>
<%@ page import="java.util.*" %>
<%
ObjectContext context = BaseContext.getThreadObjectContext();
List<Artist> artists = ObjectSelect.query(Artist.class)
.orderBy(Artist.NAME.asc())
.select(context);
%>
<html>
<head>
<title>Main</title>
</head>
<body>
<h2>Artists:</h2>
<% if(artists.isEmpty()) {%>
<p>No artists found</p>
<% } else {
for(Artist a : artists) {
%>
<p><a href="detail.jsp?id=<%=Cayenne.intPKForObject(a)%>"> <%=a.getName()%> </a></p>
<%
}
} %>
<hr>
<p><a href="detail.jsp">Create new artist...</a></p>
</body>
</html>
Create the artist editor page src/main/webapp/detail.jsp
with the following content:
<%@ page language="java" contentType="text/html" %>
<%@ page import="org.example.cayenne.persistent.*" %>
<%@ page import="org.apache.cayenne.*" %>
<%@ page import="org.apache.cayenne.query.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="java.time.format.DateTimeFormatter" %>
<%
ObjectContext context = BaseContext.getThreadObjectContext();
String id = request.getParameter("id");
// find artist for id
Artist artist = null;
if(id != null && id.trim().length() > 0) {
artist = SelectById.query(Artist.class, Integer.parseInt(id)).selectOne(context);
}
if("POST".equals(request.getMethod())) {
// if no id is saved in the hidden field, we are dealing with
// create new artist request
if(artist == null) {
artist = context.newObject(Artist.class);
}
// note that in a real application we would so dome validation ...
// here we just hope the input is correct
artist.setName(request.getParameter("name"));
artist.setDateOfBirthString(request.getParameter("dateOfBirth"));
context.commitChanges();
response.sendRedirect("index.jsp");
}
if(artist == null) {
// create transient artist for the form response rendering
artist = new Artist();
}
String name = artist.getName() == null ? "" : artist.getName();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
String dob = artist.getDateOfBirth() == null
? "" :artist.getDateOfBirth().format(formatter);
%>
<html>
<head>
<title>Artist Details</title>
</head>
<body>
<h2>Artists Details</h2>
<form name="EditArtist" action="detail.jsp" method="POST">
<input type="hidden" name="id" value="<%= id != null ? id : "" %>" />
<table border="0">
<tr>
<td>Name:</td>
<td><input type="text" name="name" value="<%= name %>"/></td>
</tr>
<tr>
<td>Date of Birth (yyyyMMdd):</td>
<td><input type="text" name="dateOfBirth" value="<%= dob %>"/></td>
</tr>
<tr>
<td></td>
<td align="right"><input type="submit" value="Save" /></td>
</tr>
</table>
</form>
</body>
</html>
We need to provide javax servlet-api for our application.
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
Also to run the web application we’ll use "maven-jetty-plugin". To activate it,
let’s add the following piece of code to the pom.xml
file, following the "dependencies"
section and save the POM:
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.14.v20161028</version>
</plugin>
</plugins>
</build>
Go to "Select Run/Debug Configuration" menu, and then "Edit Configuration…"
Click +
button and select "Maven". Enter "Name" and "Command line" as shown on screenshot:
Click "Apply" and "Run". On the first execution it may take a few minutes for Jetty plugin to download all dependencies, but eventually you’ll see the logs like this:
[INFO] ------------------------------------------------------------------------ [INFO] Building tutorial 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ ... [INFO] Configuring Jetty for project: tutorial [INFO] webAppSourceDirectory not set. Trying src/main/webapp [INFO] Reload Mechanic: automatic [INFO] Classes = /.../tutorial/target/classes [INFO] Logging initialized @1617ms [INFO] Context path = / [INFO] Tmp directory = /.../tutorial/target/tmp [INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml [INFO] Web overrides = none [INFO] web.xml file = file:/.../tutorial/src/main/webapp/WEB-INF/web.xml [INFO] Webapp directory = /.../tutorial/src/main/webapp [INFO] jetty-9.3.0.v20150612 [INFO] Started o.e.j.m.p.JettyWebAppContext@6872f9c8{/,file:/.../tutorial/src/main/webapp/,AVAILABLE}{file:/.../tutorial/src/main/webapp/} [INFO] Started ServerConnector@723875bc{HTTP/1.1,[http/1.1]}{<IP_ADDRESS>:8080} [INFO] Started @2367ms [INFO] Started Jetty Server</screen>
So the Jetty container just started.
Now go to http://localhost:8080/ URL. You should see "No artists found message" in the web browser and the following output in the IDEA console:
INFO: Loading XML configuration resource from file:/.../tutorial/target/classes/cayenne-project.xml INFO: loading user name and password. INFO: Connecting to 'jdbc:derby:memory:testdb;create=true' as 'null' INFO: +++ Connecting: SUCCESS. INFO: setting DataNode 'datanode' as default, used by all unlinked DataMaps INFO: Detected and installed adapter: org.apache.cayenne.dba.derby.DerbyAdapter INFO: --- transaction started. INFO: No schema detected, will create mapped tables INFO: CREATE TABLE GALLERY (ID INTEGER NOT NULL, NAME VARCHAR (200), PRIMARY KEY (ID)) INFO: CREATE TABLE ARTIST (DATE_OF_BIRTH DATE, ID INTEGER NOT NULL, NAME VARCHAR (200), PRIMARY KEY (ID)) INFO: CREATE TABLE PAINTING (ARTIST_ID INTEGER, GALLERY_ID INTEGER, ID INTEGER NOT NULL, NAME VARCHAR (200), PRIMARY KEY (ID)) INFO: ALTER TABLE PAINTING ADD FOREIGN KEY (ARTIST_ID) REFERENCES ARTIST (ID) INFO: ALTER TABLE PAINTING ADD FOREIGN KEY (GALLERY_ID) REFERENCES GALLERY (ID) INFO: CREATE TABLE AUTO_PK_SUPPORT ( TABLE_NAME CHAR(100) NOT NULL, NEXT_ID BIGINT NOT NULL, PRIMARY KEY(TABLE_NAME)) ... INFO: SELECT t0.DATE_OF_BIRTH, t0.NAME, t0.ID FROM ARTIST t0 ORDER BY t0.NAME INFO: === returned 0 rows. - took 17 ms. INFO: +++ transaction committed.</screen>
You can click on "Create new artist" link to create artists. Existing artists can be edited by clicking on their name:
You are done with the tutorial!


---
layout: post
title: LOL/SQL?
date: '2007-06-02T15:20:00.000-05:00'
author: Don Seiler
tags:
- orly
- lolcats
- pl/sql
modified_time: '2010-11-19T22:48:46.411-06:00'
blogger_id: tag:blogger.com,1999:blog-7032512792942232766.post-3698401016547466022
blogger_orig_url: http://www.seiler.us/2007/06/lolsql.html
---
It started with the LOLCATS. Then we had the ORLY thing and the "in ur base" thing. It's all one big conglomeration now, and it has belched forth LOLCODE. I'm told there is a parser/compiler for LOLCODE, but my head hurts just thinking about it.
But it does beg the question of when we'll see the Oracle extension of LOL/SQL and who will write it. Steven?


{% include email-modal.html %} {% include privacy-policy-modal.html %} {% include secure-modal.html %}


By Leilia Lin, Haocheng M., Amina Penafiel, Everlee Mai, Izzy C. Arcinue, JH Ronk, Ray K., Lesley Galvan, Alexis Lee, Alice T., Daphne F., Sophie T. (@on5li7), Santiago Tavarez, Corwin Grably-Shrager
The Witches of Luminoire
Contact<EMAIL_ADDRESS>Spring 2022 - Spring 2022
Tags: Visual Novel, Romance, Comedy, Slice of Life, 2D
Accepted to the all-girls school of magic, Luminoire Academy, you have one week to prepare for the Full Moon Banquet with one of three charming witches. Play through this witchy dating game, and discover the secrets Luminoire Academy has to offer!


Areas Of Interest
Environmental and Sustainable Engineering, Waste water treatment, Waste Management.
Working on various Industrial projects.
Research / Project Work
PhD: Thesis title “APPLICATION OFAGRO-BASED WASTE MATERIAL SAS ADSORBENT FOR THE REMOVAL
OF CONTAMINANTS
(ORGANIC /INORGANIC) FROM THE SECONDARY TREATED INDUSTRIAL EFFLUENT” under the guidance of
Dr. Rampravesh K. Rai ASSOCIATE PROFESSOR IN CIVIL ENGINEEING GOVERNMENT COLLEGE OF ENGINEERING,
AMRAVATI
Teamwork / Leadership Experience
- Founder member of MIT College of Engineering, Pune.
- Head – First Year Engineering, from 2001-2007, establishing and setting the labs required for First Year Engineering.
- University (SPPU) examination coordinator and custodian for 9 years.
- Mentoring and guiding First Year grooming students.
- Coordinating programs like Gathering, Women’s Day, Foundation Day and other college level programs.
- Coordinator of Indo-Italian Conference.GCE-2007
- Convener of 5 days CSIR sponsored STTP (FDP) on Environment and Waste Management Technology (EWMT-2008)
- Member of S.E. and B.E. Syllabus Revision Committee of SPPU, Pune
- Team member of the NBA college level committee. 2010-11
- Developing labs and other infrastructure of Civil Engg. Department (2012)
- Paper setter of ME Civil – Construction Management. (SPPU)
- Member – College level Women Grievances Cell.
- Participated in many Conferences, Workshops and Seminars
- Incharge Cultural activities of the Universit
- Coordinator National FEST: AAROHAN
- Presently Head of Department of Civil Engineering, MIT College of engineering
Professional Affiliation
- Life Member of Indian Water Work Association.
- Life member of ISTE
- Life member of Indian Institute of Engineers
Industry Interactions
- Apex Environ Pvt. Ltd.
- CWPRS
Guided Projects On
- Passive Architecture and Engineering.
- Sustainable Transportation Programs
- Smart cities Implementation Devices in Water Management
- Recyclable Embankments for Water Storages
- Unconventional Water Treatment Systems
Member for Peace Program at MIT WPU.
Deliver lectures on “ Sharing Happiness” for women and “Science and Spirituality”
Personal Mission Statement
I do believe that every person is unique. Every one of us has the capacity and power to choose
abundant life full of happiness, health and joy.
The infinite intelligence always leads and guides me to bless every one with love and harmony
in their every action in life. I am passionate
about guiding and facilitating the younger generation for their overall development.
In this Era of internet and globalization, every student is well equipped with the latest information
and is unable to assimilate to apply it on the in the day to day activities.
They remain confused and float in this abundant information available and are not focused to take a
definite decision.
The Universe always blesses some human beings with a heart of full of compassion and eager to guide
these students.
I feel I am one of them and would surely like to use this asset for the benefit of my students.


About
David Emeleogu
As a backend developer, David is an energetic, fun, and sometimes introverted person, with a knack for figuring things out.


Dewandra Downs
I'm just a girl fascinated by code, currently enrolled at Lambda School, on a journey to become a Software Developer.
My Projects Below
Studio Ghibli Movie Cards
Built using the Studio Ghibli API, React, Redux, and Reactstrap, this application provides information about the popular movies created by the Japanese animation film studio
NASA Photo of the Day
Built using the NASA APOD API, React, and Greensock, this application presents a different astronomical photo or video every day


A few drops of your blood can help a life to bloom-
Blood donation refers to a practice where people donate their blood to people so it helps them
with their health problems. Blood is one of the most essential fluids of our body that helps in
the smooth functioning of our body. If the body loses blood in excessive amounts, people to get
deadly diseases and even die. Thus, we see how blood donation is literally life-saving which
helps people. It is also a sign of humanity that unites people irrespective of caste, creed,
religion and more..
World Blood Donor Day-
In order to raise awareness about this life-saving procedure, the world observes 14th June as
Blood Donor Day.
Furthermore, this day is quite an important day >as it makes people about safe blood. People need
to know the basics to be able to donate blood. For instance, there are certain criteria one must
fulfill to donate blood. Not everyone knows that. Thus, this day helps in doing so.
Most importantly, on this day, the WHO organizes a campaign that invites people to donate blood.
A person eligible to donate blood must fall in the age bracket of 17-66 years of age. They must
weigh more than 50 kgs and have sound health. People suffering from diseases like diabetes,
hypertension and more cannot donate blood.


Ocean [au52], ocean, in The Inner Sea
Last updated Turn #138
Ocean [au52], ocean, in The Inner Sea
------------------------------------------------------------------------
20: Pleasure Sloop [v5n], ship, 30 hulls, 1 rowing port, 90 sails, arrived
20: from Ocean [au53], owner:
20: Dorothy [v1b], Pen, with one worker, 94 sailors
20: Apollo [b5e], Imperial Empire, with 11 workers, 63 lt. xbowmen,
20: six sailors, accompanied by:
20: Lutra [a4w], Imperial Empire, with 13 paladins, 29 pikemen
20: Hera [g3f], Imperial Empire, with seven soldiers, 42 pikemen
20: Thor [r4g], Imperial Empire, with 43 pikemen
20: Eos [a2t], Imperial Empire, with ten workers, 48 lt. xbowmen
20: Khaki Blazer [w4j], Imperial Empire, with 13 soldiers,
20: six pikemen, 32 lt. foot
20: Banian [e7n], Imperial Empire, duke, the High Priest of the
20: Church of Eres [151], with four soldiers, ten angels
20: Winstin [o7y], Mandor Confederacy, prisoner
20: Merbit [e2m], Mandor Confederacy, prisoner
20: Trokad [m3d], Mandor Confederacy, prisoner
21: Pleasure Sloop [v5n], ship, 30 hulls, 1 rowing port, 90 sails,
21: departed for Ocean [au51].
Routes leaving Ocean:
North, to Ocean [at52], 6 days
East, to Ocean [au53], 6 days
South, to Ocean [av52], 6 days
West, to Ocean [au51], 6 days


Chapter-Chair/Editor: |
Frank Oemig |
Chapter-Chair/Editor: |
Dr.
Bernd Blobel |
The
Personnel Management transactions set provides for the transmission of new or
updated healthcare administration information about individual healthcare
practitioners and supporting staff members. Since many systems (e.g.,
security, scheduling, orders, etc.), must be able to closely monitor changes in
certain information regarding individual healthcare practitioners, the
Personnel Management transaction set is used to clearly identify these events.
For example, it is important to a Security System to be aware of when a staff
member was hired or specific role has been terminated. Prior to Version 2.4,
master file updates were the only method to update this information. However,
when any of these changes are reported as master file update notifications, it
is not obvious which of the data has been changed, and is cumbersome to process
efficiently. It should be noted that Personnel Management functions that do
not affect healthcare administration (e.g. benefits) are not addressed in this
chapter.
Generally, information is entered into a Personnel Management system and passed
to other systems requiring individual healthcare practitioner data either in
the form of an unsolicited update or a response to a record-oriented query.
This document defines the transactions that occur at the application layer (the
seventh level of the ISO-OSI models), that is, the abstract messages. The
examples included in this chapter were constructe
d
using the HL7 Encoding Rules
,
Trigger Events and Messages.
Each trigger event is documented below, along with the applicable form of the
message exchange. The notation used to describe the sequence, optionality, and
repetition of segments is described in Chapter 2, Section 2.12, "Chapter
Formats for Defining HL7 Messages."
The trigger events that follow are served by the unsolicited Personnel
Management update (PMU) and General Acknowledgment (ACK) response.
The information that is included in any of these trigger event transactions can
be more than the minimum necessary to communicate that event. Any of the
fields occurring in the segments listed for the message can be used. A few or
many fields can be used as agreed upon during implementation. However, please
note, that when the contents of a field change for a field that is not
necessarily related to the trigger event, it is a matter for implementation
negotiation as to whether the receiving systems can capture this changed data.
Chapter
8 deals with master file maintenance.
Chapter 15 manages operational relationships based on trigger events.
An
event B01 signals to add a new record for healthcare administration information
about an individual healthcare practitioner establishing a relationship between
that practitioner and the institution.
The EVN segment is used to indicate the effective or planned date.
PMU^B01^PMU_B01 |
PMU Message |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
EVN |
Event Type |
3 |
STF |
Staff |
15 |
{ [ PRA ] } |
Practitioner |
15 |
{ [ ORG ] } |
Organization |
15 |
{ [ AFF ] } |
Affiliation |
15 |
{ [ LAN ] } |
Language |
15 |
{ [ EDU ] } |
Education |
15 |
ACK^B01^ACK |
General Acknowledgment |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
MSA |
Message Acknowledgment |
2 |
[ERR ] |
Error |
2 |
An
event B02 signals to update the record with the healthcare administration
information about an individual healthcare practitioner.
PMU^B02^PMU_B01 |
PMU Message |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
EVN |
Event Type |
3 |
STF |
Staff |
15 |
{ [PRA ] } |
Practitioner |
15 |
{ [ ORG ] } |
Organization |
15 |
{ [ AFF ] } |
Affiliation |
15 |
{ [ LAN ] } |
Language |
15 |
{ [ EDU ] } |
Education |
15 |
ACK^B02^ACK |
General Acknowledgment |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
MSA |
Message Acknowledgment |
2 |
[ ERR ] |
Error |
2 |
An
event B03 signals to delete the record with the healthcare administration
information about an individual healthcare practitioner to correct erroneous
entries.
PMU^B03^PMU_B03 |
PMU Message |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
EVN |
Event Type |
3 |
STF |
Staff |
15 |
ACK^B03^ACK |
General Acknowledgment |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
MSA |
Message Acknowledgment |
2 |
[ ERR ] |
Error |
2 |
An
event B04 signals that a staff member is available for work (e.g. schedules can
be created) and has a relationship with the institution. This message applies
to STF-7.
PMU^B04^PMU_B04 |
PMU Message |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
EVN |
Event Type |
3 |
STF |
Staff |
15 |
{ [ PRA ] } |
Practitioner |
15 |
[ ORG ] |
Organization |
15 |
ACK^B04^ACK |
General Acknowledgment |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
MSA |
Message Acknowledgment |
2 |
[ ERR ] |
Error |
2 |
An
event B05 indicates that a staff member is temporarily unavailable for work,
while maintaining a relationship with the institution. This message applies to
STF-7.
PMU^B05^PMU_B04 |
PMU Message |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
EVN |
Event Type |
3 |
STF |
Staff |
15 |
{ [ PRA ] } |
Practitioner |
15 |
[ ORG ] |
Organization |
15 |
ACK^B05^ACK |
General Acknowledgment |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
MSA |
Message Acknowledgment |
2 |
[ ERR ] |
Error |
2 |
An
event B06 signals that the formal relationship between a staff member and the
institution has ended (e.g. upon termination).
PMU^B06^PMU_B04 |
PMU Message |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
EVN |
Event Type |
3 |
STF |
Staff |
15 |
{ [ PRA ] } |
Practitioner |
15 |
[ ORG ] |
Organization |
15 |
ACK^B06^ACK |
General Acknowledgment |
Chapter |
|---|---|---|
MSH |
Message Header |
2 |
MSA |
Message Acknowledgment |
2 |
[ ERR ] |
Error |
2 |
The
following trigger event is served by the following Conformance Statement:
Another application determines a need for Personnel data about a person and
sends a query to a system providing this information.
Conformance Statement ID: |
Q25 |
|---|---|
Query Table Type: |
Query |
Query Name: |
Personnel Information by Segment |
Query Trigger: |
QBP^Q25^QBP_Q21 |
Query Mode: |
Both |
Response Trigger: |
RSP^K25^RSP_K25 |
Query Characteristics |
Returns response sorted by STF-3-Staff Name |
Purpose: |
Retrieve all available personnel information based upon the values of one or more commonly used search parameters |
Response Characteristics: |
Returns response sorted by StaffName unless otherwise specified. |
Based on Segment Pattern: |
PMU_B01 |
QBP^Q25^QBP_Q21 |
Personnel Information Message |
Group Control |
Comment |
Support Indicator |
Chapter |
|---|---|---|---|---|---|
see |
3.3.56 |
Fld. Seq. |
ColName |
Key/ |
Sort |
LEN |
TYPE |
Opt |
Rep |
Match Op |
TBL |
Segment Field Name |
LOINC or HL7 code/ Domain |
Element Name |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 |
StaffIDCode |
S |
Y |
60 |
CX |
O |
= |
STF.2 |
STF-2: Staff ID Code |
|||
2 |
StaffName |
S |
Y |
48 |
XPN |
O |
= |
STF.3 |
STF-3: Staff Name |
|||
3 |
PractitionerCategory |
S |
Y |
3 |
IS |
O |
Y |
in |
0186 |
PRA.3 |
PRA-3: Practitioner Category |
|
4 |
Language |
S |
Y |
60 |
CE |
O |
Y |
in |
0296 |
LAN.2 |
LAN-2: Language |
|
5 |
LanguageAbility |
Y |
60 |
CE |
C |
Y |
in |
0403 |
LAN.3 |
LAN-3: Language Ability |
||
6 |
LanguageProficiency |
Y |
60 |
CE |
C |
Y |
in |
0404 |
LAN.4 |
LAN-4: Language Proficiency |
Input Parameter |
Comp Name |
DT |
Description |
|---|---|---|---|
StaffIDCode |
CX |
Components: <ID (ST)> ^ <check digit (ST)> ^ <code identifying the check digit scheme employed (ID)> ^ <assigning authority (HD)> ^ <identifier type code (IS)> ^ <assigning facility (HD)> |
|
This field contains a personnel identification code or institution user number, used by the institution to identify the requested person. |
|||
If this field is not valued, all values for this field are considered to be a match. |
|||
The following components may be specified: |
|||
ID |
If this field, STF.2.1, is not valued, all values for this field are considered to be a match. |
||
Assigning Authority |
If this field, STF.2.4, is not valued, all values for this field are considered to be a match. |
||
Identifier type code |
If this field, STF.2.5, is not valued, all values for this field are considered to be a match. |
||
StaffName |
XPN |
If this field is not valued, all values for this field are considered to be a match. |
|
PractitionerCategory |
IS |
If this field is not valued, all values for this field are considered to be a match. If this field contains multiple values, the Server will record a match for any of the match values specified. |
|
Language |
CE |
If this field is not valued, all values for this field are considered to be a match. If this field contains multiple values, the Server will record a match for any of the match values specified. |
|
LanguageAbility |
CE |
The Server will evaluate this field only if the Language field is specified; otherwise, this field will be ignored. If this field is not valued, all values for this field are considered to be a match. If this field contains multiple values, the Server will record a match for any of the match values specified. |
|
LanguageProficiency |
CE |
The Server will evaluate this field only if the Language field is specified; otherwise, this field will be ignored. If this field is not valued, all values for this field are considered to be a match. If this field contains multiple values, the Server will record a match for any of the match values specified. |
RSP^K25^RSP_K25 |
Personnel Information Message |
Group Control |
Comment |
Support Indicator |
Chapter |
|---|---|---|---|---|---|
MSH |
Message Header |
2.16.9 |
|||
MSA |
Message Acknowledgement |
2.16.8 |
|||
[ERR] |
Error |
2.16.5 |
|||
QAK |
Query Acknowledgement |
5.5.2 |
|||
QPD |
Query Parameter Definition |
5.5.4 |
|||
RCP |
Response Control Parameter |
5.5.6 |
|||
{ |
Query Result Cluster |
||||
STF |
Staff |
15.4.6 |
|||
[ PRA ] |
Practitioner |
15.4.5 |
|||
{ [ ORG ] } |
Organization |
15.4.4 |
|||
{ [ AFF ] } |
Affiliation |
15.4.1 |
|||
{ [ LAN ] } |
Language |
15.4.3 |
|||
{ [ EDU ] } |
Education |
15.4.2 |
|||
} |
End Query Results |
||||
[ DSC ] |
Continuation Pointer |
2.16.4 |
The following segments are defined for the Personnel Management messages.
The
AFF segment adds detailed information regarding professional affiliations with
which the staff member identified by the STF segment is/was associated.
SEQ |
LEN |
DT |
OPT |
RP/# |
TBL# |
ITEM# |
ELEMENT NAME |
|---|---|---|---|---|---|---|---|
1 |
60 |
SI |
R |
01427 |
Set ID - AFF |
||
2 |
250 |
XON |
R |
01444 |
Professional Organization |
||
3 |
250 |
XAD |
O |
01445 |
Professional Organization Address |
||
4 |
52 |
DR |
O |
Y |
01446 |
Professional Organization Affiliation Date Range |
|
5 |
60 |
ST |
O |
01447 |
Professional Affiliation Additional Information |
Definition: This field contains the number that identifies this transaction. For the first occurrence of the segment, the sequence number shall be one, for the second occurrence, the sequence number shall be two, etc.
Components:
<organization name (ST)> ^ <organization name type code (IS)> ^
<ID number (NM)> ^ <check digit (NM)> ^ <code identifying the
check digit scheme employed (ID)> ^ <assigning authority (HD)> ^
<identifier type code (IS)> ^ <assigning facility ID (HD)> ^
<name representation code(ID)>
Subcomponents of assigning authority: <namespace ID (IS)> &
<universal ID (ST)> & <universal ID type (ID)>
Subcomponents of assigning facility: <namespace ID (IS)> &
<universal ID (ST)> & <universal ID type (ID)>
Definition: This field contains the official name of the association promoting
specific professional interests with which the staff member is affiliated.
Components:
In Version 2.3 and later, replaces the AD data type. <street address
(ST)> ^ <other designation (ST)> ^ <city (ST)> ^ <state or
province (ST)> ^ <zip or postal code (ST)> ^ <country (ID)> ^
< address type (ID)> ^ <other geographic designation (ST)>
^ <county/parish code (IS)> ^ <census tract (IS)> ^
<address representation code (ID)> ^ <address validity range
(DR)>
Definition: This field contains the postal address of the professional
organization with which the Staff Member is associated.
Components:
<range start date/time (TS)> ^ <range end date/time (TS)>
Definition: This field contains the period the staff member started and ended
membership in the professional organization.
Definition: This field contains miscellaneous additional information related to the staff member's membership in the professional organization.
The
EDU segment adds detailed educational information to the staff member
identified by the STF segment. An EDU segment may optionally follow an STF
segment. An EDU segment must always have been preceded by a corresponding STF
segment.
SEQ |
LEN |
DT |
OPT |
RP/# |
TBL# |
ITEM# |
ELEMENT NAME |
|---|---|---|---|---|---|---|---|
1 |
60 |
SI |
R |
01448 |
Set ID - EDU |
||
2 |
10 |
IS |
0360 |
01449 |
Academic Degree |
||
3 |
52 |
DR |
O |
01597 |
Academic Degree Program Date Range |
||
4 |
52 |
DR |
O |
01450 |
Academic Degree Program ParticipationDate Range |
||
5 |
8 |
DT |
O |
01451 |
Academic Degree Granted Date |
||
6 |
250 |
XON |
O |
01452 |
School |
||
7 |
250 |
CE |
O |
0402 |
01453 |
School Type Code |
|
8 |
250 |
XAD |
O |
01454 |
School Address |
Definition: This field contains the number that identifies this transaction. For the first occurrence of the segment, the sequence number shall be one, for the second occurrence, the sequence number shall be two, etc.
Definition: This field contains the standard classification awarded upon completion of a unified program of study. HL7 suggests using values in User-defined Table 0360 - Degree.
Definition: This field contains the date range when the academic degree program took place.
Definition: This field contains the date range during which the staff member participated in the academic degree program.
Definition: This field contains the date the academic degree was granted to the staff member.
Components:
<organization name (ST)> ^ <organization name type code (IS)> ^
<ID number (NM)> ^ <check digit (NM)> ^ <code identifying the
check digit scheme employed (ID)> ^ <assigning authority (HD)> ^
<identifier type code (IS)> ^ <assigning facility ID (HD)> ^
<name representation code(ID)>
Subcomponents of assigning authority: <namespace ID (IS)> &
<universal ID (ST)> & <universal ID type (ID)>
Subcomponents of assigning facility: <namespace ID (IS)> &
<universal ID (ST)> & <universal ID type (ID)>
Definition: This field contains the official name of the academic institution
that granted the degree to the Staff Member.
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the categorization of the academic institution
that granted the degree to the Staff Member. HL7 suggests using values in
User-defined Table 0402 - School type.
Value |
Description |
|---|---|
D |
Dental |
G |
Graduate |
M |
Medical |
U |
Undergraduate |
Components:
In Version 2.3 and later, replaces the AD data type. <street address
(ST)> ^ <other designation (ST)> ^ <city (ST)> ^ <state or
province (ST)> ^ <zip or postal code (ST)> ^ <country (ID)> ^
< address type (ID)> ^ <other geographic designation (ST)>
^ <county/parish code (IS)> ^ <census tract (IS)> ^
<address representation code (ID)> ^ <address validity range
(DR)>
Definition: This field contains the postal address of the academic institution
that granted the degree to the Staff Member.
The
LAN segment adds detailed language information to the staff member identified
by the STF segment. An LAN segment may optionally follow an STF segment. An
LAN segment must always have been preceded by a corresponding STF segment.
SEQ |
LEN |
DT |
OPT |
RP/# |
TBL# |
ITEM# |
ELEMENT NAME |
|---|---|---|---|---|---|---|---|
1 |
60 |
SI |
R |
01455 |
Set ID - LAN |
||
2 |
250 |
CE |
R |
0296 |
01456 |
Language Code |
|
3 |
250 |
CE |
O |
Y |
0403 |
01457 |
Language Ability Code |
4 |
250 |
CE |
O |
0404 |
01458 |
Language Proficiency Code |
Definition: This field contains the number that identifies this transaction. For the first occurrence of the segment, the sequence number shall be one, for the second occurrence, the sequence number shall be two, etc.
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the language about which the Staff Member's
has some knowledge. HL7 recommends using ISO table 639 as the suggested values
in User-defined Table 0296 - Language.
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the ability the Staff Member possesses with
respect to the language. HL7 recommends using values in HL7 Table 0403 -
Language ability.
Value |
Description |
|---|---|
1 |
Read |
2 |
Write |
3 |
Speak |
4 |
Understand |
5 |
Sign |
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the level of knowledge the Staff Member
possesses with respect to the language ability. HL7 suggests using values in
HL7 Table 0404 - Language proficiency.
Value |
Description |
|---|---|
1 |
Excellent |
2 |
Good |
3 |
Fair |
4 |
Poor |
5 |
Some (level unknown) |
6 |
None |
The
ORG segment relates a practitioner to an organization unit and adds detailed
information regarding the practitioner's practicing specialty in that
organization unit. An ORG segment may optionally follow an STF segment. An
ORG segment must always have been preceded by a corresponding STF segment. If
no organization unit is specified, this segment is used to relate practitioners
with their practicing specialties, including effective and end dates. When it
is not necessary to record organization unit or dates associated with the
practicing specialty, this data is recorded in PRA-3-Practitioner
Category.
SEQ |
LEN |
DT |
OPT |
RP/# |
TBL# |
ITEM# |
ELEMENT NAME |
|---|---|---|---|---|---|---|---|
1 |
60 |
SI |
R |
01459 |
Set ID - ORG |
||
2 |
250 |
CE |
O |
0405 |
01460 |
Organization Unit Code |
|
3 |
250 |
CE |
O |
0474 |
01461 |
Organization Unit Type Code |
|
4 |
1 |
ID |
O |
0136 |
01462 |
Primary Org Unit Indicator |
|
5 |
60 |
CX |
O |
01463 |
Practitioner Org Unit Identifier |
||
6 |
250 |
CE |
O |
0452 |
01464 |
Health Care Provider Type Code |
|
7 |
250 |
CE |
O |
0453 |
01614 |
Health Care Provider Classification Code |
|
8 |
250 |
CE |
O |
0454 |
01615 |
Health Care Provider Area of Specialization Code |
|
9 |
52 |
DR |
O |
01465 |
Effective Date Range |
||
10 |
2 |
CE |
O |
0066 |
01276 |
Employment Status Code |
|
11 |
1 |
ID |
O |
0136 |
01467 |
Board Approval Indicator |
|
12 |
1 |
ID |
O |
0136 |
01468 |
Primary Care Physician Indicator |
Definition: This field contains the number that identifies this transaction. For the first occurrence of the segment, the sequence number shall be one, for the second occurrence, the sequence number shall be two, etc.
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the hierarchical components of the
organization unit, as defined by the institution. Refer to
User-defined Table 0405 - Organization unit for suggested
values.
Value |
Description |
|---|---|
No suggested values defined |
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains a code indicating the classification of the
organization unit. HL7 suggests using values in User-defined Table 0474
- Organization unit type.
Value |
Description |
|---|---|
D |
Department |
F |
Facility |
L |
Local market area |
M |
Medical Center Area |
U |
Subdepartment |
S |
Subdivision |
V |
Division |
Definition:
This field contains an indicator for whether this organization unit is the
primary organization unit for this practitioner. Refer to HL7 Table 0136 -
Yes/no indicator for valid values.
Y this is the primary organization unit
N this is not the primary organization unit
Components:
<ID (ST)> ^ <check digit (ST)> ^ <code identifying the check
digit scheme employed (ID)> ^ < assigning authority (HD)> ^
<identifier type code (ID)> ^ < assigning facility (HD) ^
<effective date (DT)> ^ <expiration date (DT)>
Subcomponents of assigning authority: <namespace ID (IS)> &
<universal ID (ST)> & <universal ID type (ID)>
Subcomponents of assigning facility: <namespace ID (IS)> &
<universal ID (ST)> & <universal ID type (ID)>
Definition: This field contains an identification code used by the institution
to identify this person at this specific organization unit. If the person is
identified with the same code at all organization units, then this data should
be coded in STF-2-staff ID codes.
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the major grouping of the service or
occupation of the practitioner at a specific organization unit. For example,
Behavioral Health & Social Service. HL7 suggests using values derived from
the ANSI ASC X12 Health Care Provider Taxonomy, Level 1 - Type.
Value |
Description |
|---|---|
SUGGESTION |
ANSI ASC X12 Health Care Provider Taxonomy, Level 1 - Type |
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the more specific service or occupation within
the health care provider type of the practitioner at a specific organization
unit. For example, Counselor. HL7 suggests using values derived from the ANSI
ASC X12 Health Care Provider Taxonomy, Level 2 - Classification.
Value |
Description |
|---|---|
SUGGESTION |
ANSI ASC X12 Health Care Provider Taxonomy, Level 2 - Classification |
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the segment of the population that a health
care provider chooses to service, a specific medical service, a specialization
in treating a specific disease, or any other descriptive characteristic about
the provider's practice relating to the services rendered of the practitioner
at a specific organization unit. For example, Mental Health. HL7 suggests
using values derived from the ANSI ASC X12 Health Care Provider Taxonomy, Level
3 - specialization.
Value |
Description |
|---|---|
SUGGESTION |
ANSI ASC X12 Health Care Provider Taxonomy, Level 3 - specialization |
Components:
<range start date/time (TS)> ^ <range end date/time (TS)>
Definition: This field contains the date range in which the practitioner
started and ended working at the specific organization unit in the specific
practicing specialty category.
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains a code indicating the working relationship of
the practitioner at this organization unit. It may be different than the work
status specified in STF-20. Refer to User-defined Table 0066 -
Employment status for suggested values.
Value |
Description |
|---|---|
No suggested values defined |
Definition:
This field contains an indicator for whether this practice specialty requires
board approval. Refer to HL7 Table 0136 - Yes/no indicator for valid
values.
Y this practice specialty requires board approval
N this practice specialty does not require board approval
Definition:
This field contains an indicator for whether this practice specialty may act
as a primary care physician (PCP). Refer to HL7 Table 0136 - Yes/no
indicator for valid values.
Y this practice specialty may act as a primary care physician
N this practice specialty may not act as a primary care physician
The Technical Steward for the PRA segment is PAFM and Personnel Management
The PRA segment adds detailed medical practitioner information to the personnel
identified by the STF segment. A PRA segment may optionally follow an STF
segment. A PRA segment must always have been preceded by a corresponding STF
segment. The PRA segment may also be used for staff who work in healthcare who
are not practitioners, but need to be certified, e.g., "medical records staff."
SEQ |
LEN |
DT |
OPT |
RP/# |
TBL# |
ITEM# |
ELEMENT NAME |
|---|---|---|---|---|---|---|---|
1 |
250 |
CE |
C |
9999 |
00685 |
Primary Key Value - PRA |
|
2 |
250 |
CE |
O |
Y |
0358 |
00686 |
Practitioner Group |
3 |
3 |
IS |
O |
Y |
0186 |
00687 |
Practitioner Category |
4 |
1 |
ID |
O |
0187 |
00688 |
Provider Billing |
|
5 |
100 |
CM |
O |
Y |
0337 |
00689 |
Specialty |
6 |
100 |
CM |
O |
Y |
0338 |
00690 |
Practitioner ID Numbers |
7 |
200 |
CM |
O |
Y |
00691 |
Privileges |
|
8 |
8 |
DT |
O |
01296 |
Date Entered Practice |
||
9 |
250 |
CE |
O |
01613 |
Institution |
||
10 |
8 |
DT |
O |
01348 |
Date Left Practice |
||
11 |
250 |
CE |
O |
Y |
0401 |
01388 |
Government Reimbursement Billing Eligibility |
12 |
60 |
SI |
C |
01616 |
Set ID - PRA |
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: For MFN Master File Notification, this field is required and must
match MFE-4-primary key value, to identify which entry is being
referenced. For all other messages, this field should not be used.
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the name and/or code of a group of
practitioners to which this practitioner belongs. Refer to User-defined
Table 0358 Practitioner group for suggested values.
Value |
Description |
|---|---|
No suggested values defined |
Definition:
This field contains the category of practitioner. Refer to User-defined
Table 0186 - Practitioner category for suggested values. Values may
include codes for staff physician, courtesy physician, resident, physician
assistant, physical therapist, psychiatrist, psychologist, pharmacist,
registered nurse, licensed practical nurse, licensed vocational nurse, nurse
practitioner, etc. If the provider works in different Practitioner Categories
in different organization units, then this information should be recorded
separately in ORG-6,7,8.
Value |
Description |
|---|---|
No suggested values defined |
Definition:
This field indicates how provider services are billed. Refer to HL7
Table 0187 - Provider billing for valid values.
Value |
Description |
|---|---|
I |
Institution bills for provider |
P |
Provider does own billing |
Components:
<specialty name (ST)> ^ <governing board (ST)> ^ <eligible or
certified (ID)> ^ <date of certification (DT)>
Definition: This repeating field is made up of multiple components to record
the practitioner's specialties. The multiple components of each specialty are:
(1) specialty name or abbreviation, identifies provider's specialty, (2) name
of specialty governing board, (3) Certification Status, (4) certified date
contains the date of certification, if certified. Refer to HL7 Table
0337 - Certification status for valid values.
Value |
Description |
|---|---|
C |
Certified |
E |
Eligible |
Components:
<ID number (ST)> ^ <type of ID number (IS)> ^ <state/other
qualifying info (ST)> ^ <expiration date>
Definition: This repeating field contains this practitioner's license numbers
and other ID numbers. This is a field made up of the following components: (1)
the ID number, and (2) the type of number, and optionally (3) the state or
province in which it is valid, if relevant, or other qualifying information.
It is recommended that state qualifications use the abbreviations from the
postal service of the country. The practitioner ID number type (component 2)
is a user-defined table (Table 0338).
Value |
Description |
|---|---|
CY |
County number |
DEA |
Drug Enforcement Agency no. |
GL |
General ledger number |
L&I |
Labor and industries number |
MCD |
Medicaid number |
MCR |
Medicare number |
QA |
QA number |
SL |
State license number |
TAX |
Tax ID number |
TRL |
Training license number |
UPIN |
Unique physician ID no. |
Components:
<privilege (CE)> & <privilege class (CE)> ^ <expiration
date (DT)> ^ <activation date (DT)> ^ <facility (EI)>
Subcomponents for privilege: < identifier (ID)> & <text
(ST)> & <name of coding system (IS)> & <alternate
identifier (ID)> & <text (ST)> & <name of alternate coding
system (ST)>
Subcomponents for privilege class: < identifier (ID)> & <text
(ST)> & <name of coding system (IS)> & <alternate
identifier (ID)> & <text (ST)> & <name of alternate coding
system (ST)>
Subcomponents for facility: < entity identifier (ST)> &
<namespace ID (IS)> & <universal ID> & <universal ID
type (ID)>
Definition: This field contains the institutional privileges which this
provider may exercise. Depends upon institutional needs. For example, admit,
transfer, discharge, place orders, verify orders, review results, etc. Can
also be used for privileges other than patient services. This is a repeating
field, with each privilege made up of the following components: (1) privilege;
(2) privilege class; (3) privilege expiration date, if any; (4) privilege
activation date, if any, and (5) facility. Note that the privilege and
privilege class components are CE data types, and thus they are encoded with
the subcomponent delimiter (&) rather than the component delimiter (^).
The facility component is an EI data type specifying the facility to which the
privilege applies and is encoded with the subcomponent delimiter (&) rather
than the component delimiter (^). The facility component is an EI data type
specifying the facility to which the privilege applies and is encoded with the
subcomponent delimiter (&) rather than the component delimiter (^).
Components: <date (TS)> ^ <institution name (CE)>
Subcomponents for institution name: <identifier (ST)> & <text
(ST) & <name of coding system (IS)> & <alternate identifier
(ST)> & <alternate text (ST)> & <name of alternate coding
system (ST)>
Definition: This field contains the date the practitioner began practicing at the present institution (e.g., at hospital, at physician organization, at managed care network).
Components:
<identifier (ST)> & <text (ST) & <name of coding system
(IS)> & <alternate identifier (ST)> & <alternate text
(ST)> & <name of alternate coding system (ST)>
Definition: This field contains the institution the practitioner began or
intends to begin practicing at (e.g., at hospital, at physician organization,
at managed care network).
Definition: This field contains the date the practitioner ended or intends to end practicing at the given institution (e.g., at hospital, at physician organization, at managed care network).
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains a code that indicates the agency that the
practitioner is authorized to bill for medical services. Refer to
User-defined Table 0401 - Government reimbursement program for
valid values. This is a repeating field.
Value |
Description |
|---|---|
MM |
Medicare |
C |
Medi-Cal |
Definition: For all messages except the Staff/Practitioner Master File Notification, this field is required and contains the number that identifies this transaction. For the first occurrence of the segment, the sequence number shall be one, for the second occurrence, the sequence number shall be two, etc. For the Staff/Practitioner Master File Notification message, this field should not be used.
The
Technical Steward for the STF segment is PAFM and Personnel Management.
The STF segment can identify any personnel referenced by information systems.
These can be providers, staff, system users, and referring agents. In a
network environment, this segment can be used to define personnel to other
applications; for example, order entry clerks, insurance verification clerks,
admission clerks, as well as provider demographics. When using the STF and PRA
segments in the Staff/Practitioner Master File message, MFE-4-primary key
value is used to link all the segments pertaining to the same master file
entry. Therefore, in the MFE segment, MFE-4-primary key value must be
filled in. Other segments may follow the STF segment to provide data for a
particular type of staff member. The PRA segment (practitioner) is one such.
It may optionally follow the STF segment in order to add practitioner-specific
data. Other segments may be defined as needed. When using the segments included
in this chapter for other then Staff/Practitioner Master File messages,
disregard references to MFE-4 - primary key value.
SEQ |
LEN |
DT |
OPT |
RP/# |
TBL# |
ITEM# |
ELEMENT NAME |
|---|---|---|---|---|---|---|---|
1 |
250 |
CE |
C |
9999 |
00671 |
Primary Key Value - STF |
|
2 |
60 |
CX |
O |
Y |
00672 |
Staff ID Code |
|
3 |
250 |
XPN |
O |
Y |
00673 |
Staff Name |
|
4 |
2 |
IS |
O |
Y |
0182 |
00674 |
Staff Type |
5 |
1 |
IS |
O |
0001 |
00111 |
Administrative Sex |
|
6 |
26 |
TS |
O |
00110 |
Date/Time Of Birth |
||
7 |
1 |
ID |
O |
0183 |
00675 |
Active/Inactive Flag |
|
8 |
250 |
CE |
O |
Y |
0184 |
00676 |
Department |
9 |
250 |
CE |
O |
Y |
0069 |
00677 |
Hospital Service - STF |
10 |
250 |
XTN |
O |
Y |
00678 |
Phone |
|
11 |
250 |
XAD |
O |
Y |
00679 |
Office/Home Address |
|
12 |
26 |
CM |
O |
Y |
00680 |
Institution Activation Date |
|
13 |
26 |
CM |
O |
Y |
00681 |
Institution Inactivation Date |
|
14 |
250 |
CE |
O |
Y |
- - - - |
00682 |
Backup Person ID |
15 |
40 |
ST |
O |
Y |
00683 |
E-Mail Address |
|
16 |
250 |
CE |
O |
0185 |
00684 |
Preferred Method Of Contact |
|
17 |
250 |
CE |
O |
0002 |
00119 |
Marital Status |
|
18 |
20 |
ST |
O |
00785 |
Job Title |
||
19 |
20 |
JCC |
O |
0327/ 0328 |
00786 |
Job Code/Class |
|
20 |
2 |
CE |
O |
0066 |
01276 |
Employment Status Code |
|
21 |
1 |
ID |
O |
0136 |
01275 |
Additional Insured on Auto |
|
22 |
25 |
DLN |
O |
01302 |
Driver's License Number - Staff |
||
23 |
1 |
ID |
O |
0136 |
01229 |
Copy Auto Ins |
|
24 |
8 |
DT |
O |
01232 |
Auto Ins. Expires |
||
25 |
8 |
DT |
O |
01298 |
Date Last DMV Review |
||
26 |
8 |
DT |
O |
01234 |
Date Next DMV Review |
||
27 |
250 |
CE |
O |
0005 |
00113 |
Race |
|
28 |
250 |
CE |
O |
0189 |
00125 |
Ethnic Group |
|
29 |
1 |
ID |
O |
0136 |
01596 |
Re-activation Approval Indicator |
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: For MFN Master File Notification, this field is required and must
match MFE-4-primary key value to identify which entry is being
referenced. For all other messages, this field should not be used.
Components:
<ID (ST)> ^ <check digit (ST)> ^ <code identifying the check
digit scheme employed (ID)> ^ < assigning authority (HD)> ^
<identifier type code (ID)> ^ < assigning facility (HD) ^
<effective date (DT)> ^ <expiration date (DT)>
Subcomponents of assigning authority: <namespace ID (IS)> &
<universal ID (ST)> & <universal ID type (ID)>
Subcomponents of assigning facility: <namespace ID (IS)> &
<universal ID (ST)> & <universal ID type (ID)>
Definition: This field contains a personnel identification code or institution
user number, used by the institution to identify this person. Repeating field
allows multiple ID codes per person, with the type of ID code indicated in the
third component of the coded entry data type. If a Staff Member has Staff ID
codes that are valid only in specific organization units, that Staff ID code
should be recorded in the ORG-Practitioner Organization Unit segment.
Components:
In Version 2.3, replaces the PN data type. <family name (FN)> ^
<given name (ST)> ^ <second and further given names or initials
thereof (ST)> ^ <suffix (e.g., JR or III) (ST)> ^ <prefix (e.g.,
DR) (ST)> ^ <degree (e.g., MD) (IS)> ^ <name type code (ID)
> ^ <name representation code (ID)> ^ <name context (CE)> ^
<name validity range (DR)> ^ <name assembly order (ID)>
Subcomponents of family name: <family name (ST)> & <own
family name prefix (ST)> & <own family name (ST)> & <family
name prefix from partner/spouse (ST)> & <family name from
partner/spouse (ST)>
Definition: This field contains the staff person's name. This field may
repeat to transmit multiple names for the same person.
Definition:
This field contains a code identifying what type of staff. Refer to
User-defined Table 0182 - Staff type for suggested values. Values
may include codes for staff, practitioner (physician, nurse, therapist, etc.),
referral agent or agency, etc.
Value |
Description |
|---|---|
... |
No suggested values defined |
Definition: This field contains the staff person's sex. Refer to User-defined Table 0001 - Administrative Sex for suggested values.
Definition: This field contains a staff member's date and time of birth.
Definition:
This field indicates whether person is currently a valid staff member. Refer
to HL7 Table 0183 - Active/inactive for valid values.
Value |
Description |
|---|---|
A |
Active Staff |
I |
Inactive Staff |
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the institution department to which this
person reports or belongs. Refer to User-defined Table 0184 -
Department for suggested values.
Value |
Description |
|---|---|
... |
No suggested values defined |
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the hospital or ancillary service with which
this staff person is associated. Refer to
User-defined
Table 0069 - Hospital service for suggested values.
Components:
[NNN] [(999)]999-9999 [X99999] [B99999] [C any text] ^
<telecommunication use code (ID)> ^ <telecommunication equipment type
(ID)> ^ <email address (ST)> ^ <county code (NM)> ^
<area/city code (NM)> ^ <phone number (NM) ^ <extension (NM)> ^
<any text (ST)>
Definition: This field contains the staff person's phone number. This is a
repeating field with a component for indicating which phone number is which. It
is recommended that the last part of the XTN, [C any text], start with a code
from the table associated below with STF-16-preferred method of contact,
in order to indicate the type of each phone number in this repeating field.
Components:
In Version 2.3 and later, replaces the AD data type. <street address
(ST)> ^ <other designation (ST)> ^ <city (ST)> ^ <state or
province (ST)> ^ <zip or postal code (ST)> ^ <country (ID)> ^
< address type (ID)> ^ <other geographic designation (ST)>
^ <county/parish code (IS)> ^ <census tract (IS)> ^
<address representation code (ID)> ^ <address validity range
(DR)>
Subcomponents of street address: <street address (ST> &
<street name (ST)> & <dwelling number (ST)>
Definition: This field contains the office address and home address of the
staff person. This is a repeating field.
Components:
<date (TS)> ^ <institution name (CE)>
Subcomponents for institution name: <identifier (ST)> & <text
(ST) & <name of coding system (IS)> & <alternate identifier
(ST)> & <alternate text (ST)> & <name of alternate coding
system (ST)>
Definition: This field contains the date when staff became active for an
institution. This is a repeating field.
Components:
<date (TS)> ^ <institution name (CE)>
Subcomponents for institution name: <identifier (ST)> & <text
(ST) & <name of coding system (IS)> & <alternate identifier
(ST)> & <alternate text (ST)> & <name of alternate coding
system (ST)>
Definition: This field contains the date when staff became inactive for an
institution. This is a repeating field.
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the MFE-4-primary key value of the
master file entry that corresponds to the designated backup person for this
staff person.
Definition: This field has been retained for backward compatibility. (It is now present in the fourth component of STF-10-phone).
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field indicates which of a group of multiple phone numbers is
the preferred method of contact for this person. Note that all values of this
code refer to this segment's phone field, except for the value "E," which
refers to the E-mail address field. If more than one phone number of the
preferred type exists in STF-10-phone, this field refers to the first
such instance. Refer to HL7 Table 0185 - Preferred method of
contact for valid values.
Value |
Description |
|---|---|
B |
Beeper Number |
C |
Cellular Phone Number |
E |
E-Mail Address (for backward compatibility) |
F |
FAX Number |
H |
Home Phone Number |
O |
Office Phone Number |
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field contains the staff member's marital status. Refer to
User-defined Table 0002 - Marital status for suggested values. Same
values as those for PID-16-marital status.
Definition: This field contains a descriptive name of the staff member's occupation (e.g., Sr. Systems Analyst, Sr. Accountant).
Components:
<job code (IS)> ^ <job class (IS)>
Definition: This field contains the staff member's job code and employee
classification. Refer to User-defined Table 0327 - Job code and
User-defined Table 0328 - Employee classification for suggested values.
Definition:
This field contains the code that indicates the staff member's employment
status, e.g., full-time, part-time, self-employed, etc. Refer to
User-defined Table 0066 - Employment status for suggested
values.
Value |
Description |
|---|---|
see chapter 6 |
Definition:
This field contains an indicator for whether the present institution is named
as an additional insured on the staff member's auto insurance, especially for
use when staff is a driver for the institution. Refer to HL7 Table 0136 -
Yes/no indicator for valid values.
Y indicates that the institution is named as an additional insured
N indicates that the institution is not named as an additional insured
Components:
<license number (ST)> ^ <issuing state, province, country (IS)> ^
<expiration date (DT)
Definition: This field contains the driver's license information of staff,
especially for use when staff is a driver for the institution. For state or
province refer to official postal codes for that country; for country refer to
ISO 3166 for codes.
Definition:
This field contains an indicator for whether the institution has on file a
copy of the staff member's auto insurance, especially for use when staff is a
driver for the institution. Refer to HL7 Table 0136 - Yes/no indicator
for valid values.
Y indicates that the institution has a copy on file
N indicates that the institution does not have a copy on file
Definition: This field contains the date on which the staff member's driver's license expires, especially for use when staff is a driver for the institution.
Definition: This field contains the date of the staff member's most recent Department of Motor Vehicles review, especially for use when staff is a driver for the institution.
Definition: This field contains the date of the staff member's next Department of Motor Vehicles review, especially for use when staff is a driver for the institution.
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field refers to the person's race. Refer to
User-defined Table 0005 - Race for suggested values. The second
triplet of the CE data type for race (alternate identifier, alternate text, and
name of alternate coding system) is reserved for governmentally assigned codes.
Value |
Description |
|---|---|
... |
see chapter 3 |
Components:
<identifier (ST)> ^ <text (ST)> ^ <name of coding system
(IS)> ^ <alternate identifier (ST)> ^ <alternate text (ST)> ^
<name of alternate coding system (IS)>
Definition: This field further defines the person's ancestry. Refer to
User-defined Table 0189 - Ethnic group for suggested values. The second
couplet of the CE data type for ethnic group (alternate identifier, alternate
text, and name of alternate coding system) is reserved for governmentally
assigned codes. In the United States, a current use is to report ethnicity in
line with US federal standards for Hispanic origin.
Value |
Description |
|---|---|
... |
see chapter 3 |
Definition:
This field contains an indicator for whether the re-activation of this record
requires special approval. Refer to HL7 Table 0136 - Yes/no indicator
for valid values.
Y the re-activation requires approval
N this re-activation does not require approval
MSH|^~\&|HL7REG|UH|HL7LAB|CH|199902280700||PMU^B01^PMU_B01|MSGID002|P|2.4|<cr<
EVN|B01|199902280700|<cr>
STF|PMF98123789182^^PLW|U2246^^^PLW~111223333^^^USSSA^SS|KILDARE^RICHARD^J^JR^DR^M.D.|P|M|19511004|A|^ICU|^MED|(206)689-1999X345CO~(206)283-3334CH(206)689-1345X789CB|214
JOHNSON ST^SUITE 200^SEATTLE^WA^98199^H~3029 24TH AVE W^^SEATTLE, WA^98198^O
|19890125^UMC&University Medical
<EMAIL_ADDRESS>PRA|PMF98123789182^^PLW|^KILDARE FAMILY PRACTICE|ST|I|OB/GYN^STATE BOARD OF
OBSTETRICS AND
GYNECOLOGY^C^19790123|1234887609^UPIN~1234987^CTY^MECOSTA~223987654^TAX~1234987757^DEA~12394433879^MDD^CA|ADMIT&&ADT^MED&&L2^19941231~DISCH&&ADT^MED&&L2^19941231|
AFF|1|AMERICAN MEDICAL ASSOCIATION|123 MAIN STREET^^OUR TOWN^CA^98765^U.S.A.^M
|19900101|
LAN|1|ESL^SPANISH^ISO639|1^READ^HL70403|1^EXCELLENT^HL70404|
LAN|2|ESL^SPANISH^ISO639|2^WRITE^HL70403|2^GOOD^HL70404|
LAN|3|FRE^FRENCH^ISO639|3^SPEAK^HL70403|3^FAIR^HL70404|
EDU|1|BA^BACHELOR OF ARTS^HL70360|19810901^19850601|YALE
UNIVERSITY^L|U^HL70402|456 CONNECTICUT AVENUE^^NEW HAVEN^CO^87654^U.S.A.^M|
EDU|2|MD^DOCTOR OF MEDICINE^HL70360|19850901^19890601|HARVARD MEDICAL SCHOOL^L
|M^HL70402|123 MASSACHUSETTS AVENUE^CAMBRIDGE^MA^76543^U.S.A.^M|
Proposals for the specification of additional events and messages should be submitted to the Personnel Management SIG.


Scootaloo has always dreamed of flying, but her wings are too tiny.
Rollerscoot across hills to fly, catch speed-boosting parasprites, and outrace the sunset!
Press Screen or S to Scoot
0
Press the Play button
to resume flight
PLAY ME as a FULLSCREEN APP
Open up your mobile browser's menu below
And select Add to Home Screen
Scootaloo flew
1337m
today!
max altitude
20
m
max velocity
20
kph
parasprites
20
Press Restart button or S to Start a new day
Tweet


{% extends 'main/base.html' %} {% block title %} LE - Password Changed {% endblock %} {% block content %}
Your Password has changed return to the login page.
Return to the login page: here


Australia Trip June/July 2001. |
||
|
|
|
Erin and I went on a trip to Australia to meet the parents. The photos can be seen by clicking on the links to the right. |
|
Roll 1 Livermore with Wares Section Heading 2 Bullet 1 Section Heading3 Bullet 1 |