Categorygithub.com/transcom/nom
modulepackage
0.0.0-20200512185926-8e3d78916321
Repository: https://github.com/transcom/nom.git
Documentation: pkg.go.dev

# README

Navy Orders Muncher

nom, the Navy Orders Muncher, ingests CSV files containing Navy Orders and excretes database updates to the move.mil Orders API.

License Information

Works created by U.S. Federal employees as part of their jobs typically are not eligible for copyright in the United States. In places where the contributions of U.S. Federal employees are not eligible for copyright, this work is in the public domain. In places where it is eligible for copyright, such as some foreign jurisdictions, the remainder of this work is licensed under the MIT License, the full text of which is included in the LICENSE.txt file in this repository.

Usage

$ nom <csv input file>

Building

Building is easy! Once you have the dependencies, run

$ make

Dependencies

nom is written in Go. Aside from go, you will need:

Acquiring and installing these is left as an exercise for the reader.

Input format

nom accepts comma-delimited CSV files and expects the following columns:

Column NameDescription
Ssn (obligation)If 9 digits, Social Security Number
If 10 digits, EDIPI
TACHousehold Goods (HHG) Transportation Account Code (TAC)
Order Create/Modification DateOrders date, in Excel date format (Day 1 = Dec 31, 1899)
Order Modification NumberNumber of modifications made by an Orders Writing System, such as EAIS, OAIS, or NMCMPS.
Obligation Modification NumberNumber of modifications made manually via POEMS.
Obligation Status CodeD: Cancel Obligation, effectively rescinding these Orders
N: Initial Mod - amended Orders
P: Initial Obligation - new Orders
Obligation Multi-leg CodeIndicates whether either endpoint is TDY.
0 - Perm to Perm
1 - Perm to Temp
5 - Temp to Temp
9 - Temp to Perm
CIC Purpose Information Code (OBLGTN)Purpose of the Orders, maps to Orders type
PaygradeThree-character DoD Paygrade, e.g., E05, W02, O10
Rank Classification DescriptionThe Navy rank or rating
Service Member NameThe sailor's name, in the format LASTNAME,FIRSTNAME (optional MI) (optional suffix)
Detach UICUnit Identification Code (UIC) of the detaching activity
Detach UIC Home PortHome port of the detaching activity
Detach UIC City NameDetaching activity city
Detach State CodeDetaching activity state
Detach Country CodeDetaching activity country
Ultimate Estimated Arrival DateReport No Later Than Date
Ultimate UICUnit Identification Code (UIC) of the ultimate activity
Ultimate UIC Home PortHome port of the ultimate activity
Ultimate UIC City NameUltimate activity city
Ultimate State CodeUltimate activity state
Ultimate Country CodeUltimate activity country
Entitlement IndicatorIf 'Y', then this is a 'Cost Order' with obligated moving expenses. If 'N', then this is a 'No Cost Order'.
Count of Dependents Participating in Move (STATIC)Number of sailor's dependents; needed to determine the correct weight entitlement
Count of Intermediate Stops (STATIC)Number of intermediate activities. If greater than 0, then this move has TDY en route.
Primary SDNThe Commercial Travel (CT) Standard Document Number (SDN), which nom uses as the unique Orders number

Columns that do not start with the above headers are ignored.

Orders number

On printed Navy Orders, the BUPERS Orders number is originally formatted as "<Order Control Number> <SSN>", for example, "3108 000-12-3456". It would be unique (because of the SSN), except that it’s possible for a set of orders to be cut on the same day 10 years later for the same sailor, resulting in a collision.

Because the BUPERS Orders Number contains PII (the SSN) and could potentially not be unique (because it only allows a single digit for the year), nom uses the Primary SDN (aka the Commercial Travel SDN) instead. For what it's worth, Marine Corps orders also use the CT SDN as the unique Orders number.

Modification number interpretation

The Orders API has a sequence number to indicate the chronology of amendments to a set of Orders. The input, however, has two modification number fields, which track the modification count from different systems. Fortunately, these two fields increment atomically, and never decrement.

Therefore, the sequence number is simply the sum of these two numbers.

Orders type

To determine the effective orders type, lookup the CIC Purpose Information Code and community (enlisted or officer) in the following table.

N_CIC_PURPEnlisted / OfficerDescriptionEffective Orders Type
0OfficerIPCOT In-place consecutive overseas travelipcot
1EnlistedIPCOT In-place consecutive overseas travelipcot
2OfficerAccession Travelaccession
3OfficerTraining Traveltraining
4OfficerOperational Traveloperational
5OfficerSeparation Travelseparation
6OfficerOrganized Unit/Homeport Changeunit-move
7OfficerEmergency Non-member Evacemergency-evac
8EnlistedOverseas Tour Extension Incentive Program (OTEIP)oteip
9EnlistedNAVCAD (Naval Cadet) Trainingtraining
AEnlistedAccession Travel Recruitsaccession
BEnlistedNon-recruit Accession Travelaccession
CEnlistedTraining Traveltraining
DEnlistedOperational Traveloperational
EEnlistedSeparation Travelseparation
FEnlistedOrganized Unit/Homeport Changeunit-move
GEnlistedMidshipman Accession Travelaccession
HBothSpecial Purpose Reimbursablespecial-purpose
IEnlistedNAVCAD(Naval Cadet) Accessionaccession
JEnlistedAccession Travel Recruitsaccession
KEnlistedNon-recruit Accession Travelaccession
LEnlistedTraining Traveltraining
MEnlistedRotational Travelrotational
NEnlistedSeparation Travelseparation
OEnlistedOrganized Unit/Homeport Changeunit-move
PEnlistedMidshipman Separation Travelseparation
QOfficerMisc. Rotational Non-memberrotational
REnlistedMisc. Operational Non-memberoperational
SOfficerAccession Travelaccession
TOfficerTraining Traveltraining
UOfficerRotational Travelrotational
VOfficerSeparation Travelseparation
WOfficerOrganized Unit/Homeport Changeunit-move
XEnlistedEMERGENCY NON-MEMBER EVACSemergency-evac
XOfficerMisc. Rotational Non-memberrotational
YEnlistedMisc. Rotational Non-memberrotational
ZEnlistedNAVCAD(Naval Cadet) Separationseparation

Output

nom uploads the Orders it reads to the move.mil Orders API.

# Structs

CategorizedRank combines officer status and paygrade.