index
int64 0
0
| repo_id
stringclasses 829
values | file_path
stringlengths 34
254
| content
stringlengths 6
5.38M
|
|---|---|---|---|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/serializer_spec_helper.rb
|
# frozen_string_literal: true
module SerializerSpecHelper
def serialize(obj, opts = {})
serializer_class = opts.delete(:serializer_class) || "#{obj.class.name}Serializer".constantize
serializer_with_jsonapi(serializer_class, obj, opts)
end
def expect_time_eq(serialized_time, time)
expect(serialized_time).to eq(time.iso8601(3))
end
def expect_data_eq(serialized_data, data)
key_type = determine_key_type(serialized_data)
expect(serialized_data).to eq(normalize_data(data, key_type))
end
private
def determine_key_type(data)
if data.is_a?(Array)
first_element = data.find { |item| item.is_a?(Hash) }
if first_element
first_element.keys.first.is_a?(String) ? :string : :symbol
end
elsif data.is_a?(Hash)
data.keys.first.is_a?(String) ? :string : :symbol
end
end
def normalize_data(data, key_type)
case data
when Hash
normalize_hash_keys(data, key_type)
when Array
data.map { |item| normalize_data(item, key_type) }
else
data
end
end
def normalize_hash_keys(hash, key_type)
case key_type
when :string
hash.deep_stringify_keys
when :symbol
hash.deep_symbolize_keys
end
end
def serializer_with_jsonapi(serializer_class, obj, opts = {})
serializer = serializer_class.new(obj, opts)
serializer.serializable_hash.to_json
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/stub_va_profile.rb
|
# frozen_string_literal: true
def stub_va_profile
allow_any_instance_of(FormProfile).to receive(:initialize_military_information).and_return({})
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/author.rb
|
# frozen_string_literal: true
require 'common/models/base'
class Author < Common::Base
per_page 20
max_per_page 1000
attribute :id, Integer, sortable: { order: 'ASC' }, filterable: %w[eq not_eq]
attribute :first_name, String, sortable: { order: 'ASC', default: true }, filterable: %w[eq not_eq match]
attribute :last_name, String, sortable: { order: 'ASC' }, filterable: %w[eq not_eq match]
attribute :birthdate, Common::UTCTime, sortable: { order: 'DESC' }, filterable: %w[eq lteq gteq not_eq]
attribute :zipcode, Integer
def <=>(other)
first_name <=> other.first_name
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/model_helpers.rb
|
# frozen_string_literal: true
module ModelHelpers
def model_exists?(model)
model.class.exists?(model.id)
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/error_details.rb
|
# frozen_string_literal: true
module ErrorDetails
def error_details_for(response, key: 'detail')
JSON.parse(response.body)['errors'].first[key]
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/controller_spec_helper.rb
|
# frozen_string_literal: true
shared_examples_for 'a controller that does not log 404 to Sentry' do
before do
allow_any_instance_of(described_class).to receive(:authenticate) do
raise Common::Exceptions::RecordNotFound, 'some_id'
end
end
it 'does not log 404 to sentry' do
with_routing do |routes|
@routes = routes
controller_klass = described_class
routes.draw do
get '/fake_route' => "#{controller_klass.to_s.underscore.gsub('_controller', '')}#authenticate"
end
allow_any_instance_of(ApplicationController).to receive(:log_exception_to_sentry) { raise }
get(controller.present? ? :authenticate : '/fake_route')
expect(response).to have_http_status(:not_found)
end
end
end
shared_examples_for 'a controller that deletes an InProgressForm' do |param_name, form_name, form_id|
let(:form) { build(form_name.to_sym) }
let(:param_name) { param_name.to_sym }
let(:form_id) { form_id }
describe '#create' do
def send_create
post(:create, params: { param_name => { form: form.form } })
end
context 'with a valid form' do
context 'with a user' do
let(:user) { create(:user, :with_terms_of_use_agreement) }
it 'deletes the "in progress form"' do
create(:in_progress_form, user_uuid: user.uuid, user_account: user.user_account, form_id:)
expect(controller).to receive(:clear_saved_form).with(form_id).and_call_original
sign_in_as(user)
expect { send_create }.to change(InProgressForm, :count).by(-1)
end
end
end
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/stub_efolder_documents.rb
|
# frozen_string_literal: true
require 'efolder/service'
def stub_efolder_index_documents
let(:list_documents_res) do
[{ document_id: '{73CD7B28-F695-4337-BBC1-2443A913ACF6}',
doc_type: '702',
type_description: 'Disability Benefits Questionnaire (DBQ) - Veteran Provided',
received_at: Date.new(2024, 9, 13) },
{ document_id: '{EF7BF420-7E49-4FA9-B14C-CE5F6225F615}',
doc_type: '45',
type_description: 'Military Personnel Record',
received_at: Date.new(2024, 9, 13) }]
end
before do
expect(efolder_service).to receive(:list_documents).and_return(
list_documents_res
)
end
end
def stub_efolder_show_document
let(:document_id) { '{93631483-E9F9-44AA-BB55-3552376400D8}' }
let(:content) { File.read('spec/fixtures/files/error_message.txt') }
before do
expect(efolder_service).to receive(:get_document).with(document_id).and_return(content)
end
end
def efolder_service
efolder_service = double
expect(Efolder::Service).to receive(:new).and_return(efolder_service)
efolder_service
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/spec_builders.rb
|
# frozen_string_literal: true
require 'active_support/concern'
module SpecBuilders
extend ActiveSupport::Concern
module ClassMethods
def test_method(klass, method, test_data)
describe "##{method}" do
test_data.each do |test_datum|
args = Array.wrap(test_datum[0])
return_val = test_datum[1]
context "with an input of #{args.join(',')}" do
it "returns #{return_val}" do
actual =
if args.length == 1 && args[0].is_a?(Hash) && !args[0].empty?
klass.send(method, **args.first)
else
klass.send(method, *args)
end
expect(actual).to eq(return_val)
end
end
end
end
end
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/shared_examples_for_labs_and_tests.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'labs and tests response structure validation' do |response_data_path|
let(:labs_data) do
parsed = JSON.parse(response.body)
response_data_path ? parsed.dig(*response_data_path) : parsed
end
it 'returns the expected number of lab records' do
expect(labs_data.length).to eq(29)
end
it 'each record has required top-level structure' do
expect(labs_data).to all(have_key('id').and(have_key('type')).and(have_key('attributes')))
end
it 'each record has type DiagnosticReport' do
labs_data.each do |lab|
expect(lab['type']).to eq('DiagnosticReport')
end
end
it 'each record has required attributes' do
labs_data.each do |lab|
attributes = lab['attributes']
expect(attributes).to include('status', 'dateCompleted', 'testCode')
end
end
it 'each record has either encodedData or observations' do
labs_data.each do |lab|
attributes = lab['attributes']
has_encoded_data = attributes['encodedData'].present?
has_observations = attributes['observations'].present? && attributes['observations'].any?
expect(has_encoded_data || has_observations).to be_truthy
end
end
it 'observations have proper structure when present' do
lab_with_observations = labs_data.find do |lab|
lab['attributes']['observations'].present? && lab['attributes']['observations'].any?
end
skip 'No observations in test data' if lab_with_observations.nil?
observation = lab_with_observations['attributes']['observations'].first
expect(observation).to be_a(Hash)
expect(observation).to include('testCode', 'status', 'value')
expect(observation['value']).to be_a(Hash)
expect(observation['value']).to have_key('text')
expect(observation['value']).to have_key('type')
end
it 'observation values have valid types when present' do
valid_value_types = %w[quantity codeable-concept string date-time]
labs_with_observations = labs_data.select do |lab|
lab['attributes']['observations'].present? && lab['attributes']['observations'].any?
end
skip 'No observations in test data' if labs_with_observations.empty?
labs_with_observations.each do |lab|
lab['attributes']['observations'].each do |obs|
next unless obs['value'] && obs['value']['type']
error_message = "Expected observation value type to be one of #{valid_value_types.join(', ')}, " \
"got #{obs['value']['type']}"
expect(valid_value_types).to include(obs['value']['type']), error_message
end
end
end
it 'encodedData is present and non-empty when included' do
lab_with_encoded = labs_data.find do |lab|
lab['attributes']['encodedData'].present?
end
skip 'No encodedData in test data' if lab_with_encoded.nil?
encoded = lab_with_encoded['attributes']['encodedData']
expect(encoded).to be_a(String)
expect(encoded).not_to be_empty
end
it 'dateCompleted is a valid ISO8601 timestamp' do
labs_data.each do |lab|
date_completed = lab['attributes']['dateCompleted']
expect(date_completed).to match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/)
end
end
it 'status values are valid FHIR diagnostic report statuses' do
valid_statuses = %w[registered preliminary final amended corrected cancelled entered-in-error unknown]
labs_data.each do |lab|
status = lab['attributes']['status']
expect(valid_statuses).to include(status),
"Expected status to be one of #{valid_statuses.join(', ')}, got #{status}"
end
end
it 'testCode is present and non-empty' do
labs_data.each do |lab|
test_code = lab['attributes']['testCode']
expect(test_code).to be_present
expect(test_code).to be_a(String)
end
end
it 'display field is present when included' do
labs_data.each do |lab|
display = lab['attributes']['display']
next if display.nil?
expect(display).to be_a(String)
expect(display).not_to be_empty
end
end
it 'sampleTested field is a string when included' do
labs_data.each do |lab|
sample_tested = lab['attributes']['sampleTested']
next if sample_tested.nil?
expect(sample_tested).to be_a(String)
end
end
it 'location field is a string when included' do
labs_data.each do |lab|
location = lab['attributes']['location']
next if location.nil?
expect(location).to be_a(String)
end
end
it 'orderedBy field is a string when included' do
labs_data.each do |lab|
ordered_by = lab['attributes']['orderedBy']
next if ordered_by.nil?
expect(ordered_by).to be_a(String)
end
end
it 'bodySite field is a string when included' do
labs_data.each do |lab|
body_site = lab['attributes']['bodySite']
next if body_site.nil?
expect(body_site).to be_a(String)
end
end
it 'observations have all required subfields when present' do
labs_with_observations = labs_data.select do |lab|
lab['attributes']['observations'].present? && lab['attributes']['observations'].any?
end
skip 'No observations in test data' if labs_with_observations.empty?
labs_with_observations.each do |lab|
lab['attributes']['observations'].each do |obs|
expect(obs).to have_key('testCode')
expect(obs).to have_key('status')
expect(obs).to have_key('value')
# testCode must be present and a string
expect(obs['testCode']).to be_present
expect(obs['testCode']).to be_a(String)
# status must be a valid FHIR status
valid_statuses = %w[registered preliminary final amended corrected cancelled entered-in-error unknown]
expect(valid_statuses).to include(obs['status']) if obs['status'].present?
# value must have text and type
value = obs['value']
expect(value).to have_key('text')
expect(value).to have_key('type')
# Optional fields should be strings when present
expect(obs['referenceRange']).to be_a(String) if obs['referenceRange'].present?
expect(obs['comments']).to be_a(String) if obs['comments'].present?
expect(obs['bodySite']).to be_a(String) if obs['bodySite'].present?
expect(obs['sampleTested']).to be_a(String) if obs['sampleTested'].present?
end
end
end
it 'observation value text is non-empty when present' do
labs_with_observations = labs_data.select do |lab|
lab['attributes']['observations'].present? && lab['attributes']['observations'].any?
end
skip 'No observations in test data' if labs_with_observations.empty?
labs_with_observations.each do |lab|
lab['attributes']['observations'].each do |obs|
value_text = obs.dig('value', 'text')
next if value_text.nil?
expect(value_text).not_to be_empty
end
end
end
end
RSpec.shared_examples 'labs and tests specific data validation' do |response_data_path = nil|
let(:labs_data) do
parsed = JSON.parse(response.body)
response_data_path ? parsed.dig(*response_data_path) : parsed
end
# Verify specific Vista lab record with encodedData
it 'contains the Vista lab record with expected ID and encodedData' do
vista_lab = labs_data.find { |lab| lab['id'] == 'f752ad57-a21d-4306-8910-7dd5dbc0a32e' }
expect(vista_lab).not_to be_nil, 'Expected to find Vista lab with ID f752ad57-a21d-4306-8910-7dd5dbc0a32e'
attributes = vista_lab['attributes']
expect(attributes['testCode']).to eq('urn:va:lab-category:MI')
expect(attributes['status']).to eq('final')
expect(attributes['dateCompleted']).to eq('2025-02-27T11:51:00+00:00')
expect(attributes['encodedData']).to be_present
expect(attributes['encodedData'].length).to eq(956)
# Decode and verify actual content
decoded_data = Base64.decode64(attributes['encodedData'])
expect(decoded_data).to include('Accession [UID]: MICRO 25 14 [1225000')
expect(decoded_data).to include('Collection sample: BLOOD')
expect(decoded_data).to include('Test(s) ordered: BLOOD CULTURE')
expect(decoded_data).to include('Provider: MCGUIRE,MARCI P')
expect(attributes['observations']).to be_nil.or be_empty
end
# Verify specific Oracle Health lab record with observations
it 'contains the Oracle Health lab record with expected observations' do
oracle_lab = labs_data.find { |lab| lab['id'] == 'b9552dee-1a50-4ce9-93cd-dcd1d02165b3' }
expect(oracle_lab).not_to be_nil, 'Expected to find Oracle Health lab with ID b9552dee-1a50-4ce9-93cd-dcd1d02165b3'
attributes = oracle_lab['attributes']
expect(attributes['testCode']).to eq('CH')
expect(attributes['status']).to eq('final')
expect(attributes['encodedData']).to be_blank
observations = attributes['observations']
expect(observations).to be_an(Array)
expect(observations).not_to be_empty
first_obs = observations.first
expect(first_obs['testCode']).to eq('URINE COLOR')
expect(first_obs['status']).to eq('final')
expect(first_obs.dig('value', 'type')).to eq('string')
expect(first_obs.dig('value', 'text')).to eq('clear')
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/mdot_helpers.rb
|
# frozen_string_literal: true
require 'mdot/token'
module MDOTHelpers
def set_mdot_token_for(user, token = 'abcd1234abcd1234abcd1234')
jwt = ::MDOT::Token.find_or_build(user.uuid)
jwt.update(token:, uuid: user.uuid)
end
def set_expired_mdot_token_for(user, token = 'abcd1234abcd1234abcd1234')
jwt = ::MDOT::Token.find_or_build(user.uuid)
jwt.update(token:, uuid: user.uuid)
jwt.expire(5)
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/database_cleaner.rb
|
# frozen_string_literal: true
class DirtyDatabaseError < RuntimeError
def initialize(meta)
super "#{meta[:full_description]}\n\t#{meta[:location]}"
end
end
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:deletion)
end
config.before(:all, :cleaner_for_context) do
DatabaseCleaner.strategy = :truncation
DatabaseCleaner.start
end
config.before do |example|
next if example.metadata[:cleaner_for_context]
DatabaseCleaner.strategy =
if example.metadata[:js]
:truncation
else
example.metadata[:strategy] || :transaction
end
DatabaseCleaner.start
end
config.after do |example|
next if example.metadata[:cleaner_for_context]
DatabaseCleaner.clean
# raise DirtyDatabaseError.new(example.metadata) if Record.count > 0
end
config.after(:all, :cleaner_for_context) do
DatabaseCleaner.clean
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/rx_client_helpers.rb
|
# frozen_string_literal: true
require 'rx/client'
module Rx
module ClientHelpers
HOST = Settings.mhv.rx.host
CONTENT_TYPE = 'application/json'
APP_TOKEN = 'your-unique-app-token'
TOKEN = 'GkuX2OZ4dCE=48xrH6ObGXZ45ZAg70LBahi7CjswZe8SZGKMUVFIU88='
def authenticated_client
Rx::Client.new(session: { user_id: 123,
expires_at: Time.current + (60 * 60),
token: TOKEN },
upstream_request: instance_double(ActionDispatch::Request,
{ 'env' => { 'SOURCE_APP' => 'myapp' } }))
end
def stub_varx_request(method, api_endpoint, response_hash, opts = {})
with_opts = { headers: Rx::Configuration.base_request_headers.merge('Token' => TOKEN) }
with_opts[:body] = opts[:body] unless opts[:body].nil?
status_code = opts[:status_code] || 200
response = response_hash.nil? ? '' : response_hash
stub_request(method, "#{HOST}/#{api_endpoint}")
.with(with_opts)
.to_return(
status: status_code,
body: response,
headers: { 'Content-Type' => CONTENT_TYPE }
)
end
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/fixture_helpers.rb
|
# frozen_string_literal: true
module FixtureHelpers
extend ActiveSupport::Concern
module ClassMethods
def get_fixture(path)
JSON.parse(File.read("spec/fixtures/#{path}.json"))
end
def get_fixture_absolute(path)
JSON.parse(File.read("#{path}.json"))
end
end
def get_fixture(*)
self.class.public_send(__method__, *)
end
def get_fixture_absolute(*)
self.class.public_send(__method__, *)
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/rswag_config.rb
|
# frozen_string_literal: true
class RswagConfig
def config
{
'public/openapi.json' => {
openapi: '3.0.3',
info: info_spec,
paths: {},
servers: [],
components: Openapi::Components::ALL
}
}
end
private
def info_spec
{
title: 'VA.gov OpenAPI Docs',
version: '1.0',
description: 'OpenAPI 3.0.3 Documentation for the VA.gov API',
contact: {
name: 'VA Platform Support',
url: 'https://depo-platform-documentation.scrollhelp.site/support/'
},
license: {
name: 'Creative Commons Zero v1.0 Universal'
}
}
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/validation_helpers.rb
|
# frozen_string_literal: true
module ValidationHelpers
extend ActiveSupport::Concern
def expect_attr_valid(model, attr)
model.valid?
expect(model.errors[attr]).to eq([])
end
class_methods do
def validate_inclusion(attr, array)
array = Array.wrap(array)
it "#{attr} should have the right value" do
model = described_class.new
array.each do |array_item|
model[attr] = array_item
expect_attr_valid(model, attr)
end
model[attr] = "#{array[0]}foo"
expect_attr_invalid(model, attr, 'is not included in the list')
end
end
end
def expect_attr_invalid(model, attr, error = 'is invalid')
model.valid?
expect(model.errors[attr].include?(error)).to be(true)
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/uploader_helpers.rb
|
# frozen_string_literal: true
require 'common/virus_scan'
module UploaderHelpers
extend ActiveSupport::Concern
module ClassMethods
def stub_virus_scan
before do
allow(Common::VirusScan).to receive(:scan).and_return(true)
end
end
end
end
|
0
|
code_files/vets-api-private/spec
|
code_files/vets-api-private/spec/support/shared_examples_for_mr.rb
|
# frozen_string_literal: true
shared_examples 'medical records new eligibility check' do |path, cassette_name|
context 'when new eligibility check is enabled' do
before do
allow(Flipper).to receive(:enabled?).with(:mhv_medical_records_new_eligibility_check).and_return(true)
end
context 'Basic User' do
let(:mhv_account_type) { 'Basic' }
before do
allow_any_instance_of(User).to receive(:mhv_user_account).and_return(OpenStruct.new(patient: false))
get path
end
include_examples 'for user account level', message: 'You do not have access to medical records'
end
context 'Advanced User' do
let(:mhv_account_type) { 'Advanced' }
before do
allow_any_instance_of(User).to receive(:mhv_user_account).and_return(OpenStruct.new(patient: false))
get path
end
include_examples 'for user account level', message: 'You do not have access to medical records'
end
context 'Premium User' do
let(:mhv_account_type) { 'Premium' }
context 'who is a VA patient' do
before do
allow_any_instance_of(User).to receive(:mhv_user_account).and_return(OpenStruct.new(patient: true))
end
it 'responds to GET #index' do
VCR.use_cassette(cassette_name) do
get path
end
expect(response).to be_successful
end
end
context 'who is NOT a VA patient' do
before do
allow_any_instance_of(User).to receive(:mhv_user_account).and_return(OpenStruct.new(patient: false))
get path
end
include_examples 'for non va patient user', authorized: false,
message: 'You do not have access to medical records'
end
end
end
end
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/medical_copays/stub_medical_copays.rb
|
# frozen_string_literal: true
def stub_medical_copays(method)
let(:content) { File.read('spec/fixtures/medical_copays/index.json') }
case method
when :index
before do
allow_any_instance_of(MedicalCopays::VBS::Service).to receive(:get_copays).and_return(content)
end
else
let!(:service) do
medical_copay_service = double
expect(MedicalCopays::VBS::Service).to receive(:new).and_return(medical_copay_service)
medical_copay_service
end
let(:statement_id) { '{93631483-E9F9-44AA-BB55-3552376400D8}' }
let(:content) { File.read('spec/fixtures/files/error_message.txt') }
before do
expect(service).to receive(:get_pdf_statement_by_id).with(statement_id).and_return(content)
end
end
end
def stub_medical_copays_show
let(:content) { File.read('spec/fixtures/medical_copays/show.json') }
let(:id) { '3fa85f64-5717-4562-b3fc-2c963f66afa6' }
before do
allow_any_instance_of(MedicalCopays::VBS::Service).to receive(:get_copay_by_id).and_return(content)
end
end
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_invalid_request.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd"
xmlns:idm="http://vaww.oed.oit.va.gov"
xmlns="urn:hl7-org:v3">
<id extension="WSDOC1909051245402750982473010" root="2.16.840.1.113883.4.349"/>
<creationTime value="20190905124540"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id root="null"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AE"/>
<targetMessage>
<id extension="200VGOV-2c3c0c78-5e44-4ad2-b542-11388c3e45cd" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystem="2.16.840.1.113883.5.1100" code="INTERR" displayName="Internal System Error"/>
<text>MVI[S]:INVALID REQUEST</text>
</acknowledgementDetail>
<acknowledgementDetail>
<text>MVI[S]:INVALID REQUEST</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<queryAck>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<queryResponseCode code="AE"/>
<resultCurrentQuantity value="0"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectAdministrativeGender>
<value code="M"/>
<semanticsText>Gender</semanticsText>
</livingSubjectAdministrativeGender>
<livingSubjectBirthTime>
<value value="19490304"/>
<semanticsText>Date of Birth</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="796122306" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
<livingSubjectName>
<value use="L">
<given>Mitchell</given>
<given>G</given>
<family>Jenkins</family>
</value>
<semanticsText>Legal Name</semanticsText>
</livingSubjectName>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_no_subject_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 ITSVersion="XML_1.0" xmlns="urn:hl7-org:v3" xmlns:idm="http://vaww.oed.oit.va.gov" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd">
<id extension="WSDOC1610281506526980946641502" root="2.16.840.1.113883.4.349"/>
<creationTime value="20161028150652"/>
<versionCode code="3.0"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device classCode="DEV" determinerCode="INSTANCE">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device classCode="DEV" determinerCode="INSTANCE">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AE"/>
<targetMessage>
<id extension="200VGOV-2588acd0-f28d-461b-bf66-307dec8f241b" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code code="INTERR" codeSystem="2.16.840.1.113883.5.1100" displayName="Internal System Error"/>
<text>MVI[S]:INVALID REQUEST</text>
</acknowledgementDetail>
<acknowledgementDetail>
<text>MVI[S]:INVALID REQUEST</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code code="PRPA_TE201306UV02" codeSystem="2.16.840.1.113883.1.6"/>
<queryAck>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<queryResponseCode code="NF"/>
<resultCurrentQuantity value="0"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectAdministrativeGender>
<value code="M"/>
<semanticsText>Gender</semanticsText>
</livingSubjectAdministrativeGender>
<livingSubjectBirthTime>
<value value="19780611"/>
<semanticsText>Date of Birth</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="796188587" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
<livingSubjectName>
<value use="L">
<given>EARL</given>
<given>M</given>
<family>STEPHENS</family>
</value>
<semanticsText>Legal Name</semanticsText>
</livingSubjectName>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/add_person_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:MCCI_IN000002UV01 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/MCCI_IN000002UV01.xsd" xmlns="urn:hl7-org:v3" xmlns:idm="http://********">
<id extension="WSDOC2002071405368870747096200" root="2.16.840.1.113883.4.349"/>
<creationTime value="20200207140538"/>
<versionCode code="4.1"/>
<interactionId extension="MCCI_IN000002UV01" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="200VGOV-40047fb4-02d3-4a7b-9cb9-a8cdf55d89cd" root="22a0f9e0-4454-11dc-a6be-3603d6866807"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystemName="MVI" code="111985523^PI^200BRLS^USVBA" displayName="IEN"/>
</acknowledgementDetail>
<acknowledgementDetail>
<code codeSystemName="MVI" code="32397028^PI^200CORP^USVBA" displayName="IEN"/>
</acknowledgementDetail>
</acknowledgement>
</idm:MCCI_IN000002UV01>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_multiple_mhv_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd"
xmlns:idm="http://vaww.oed.oit.va.gov" xmlns="urn:hl7-org:v3">
<id extension="WSDOC1611060614456041732180196" root="2.16.840.1.113883.4.349"/>
<creationTime value="20161106061445"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="P"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="200VGOV-2eac6984-3ff7-49ea-8b86-7be8037c0cd4" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystemName="MVI" code="130" displayName="IMT"/>
<text>Identity Match Threshold</text>
</acknowledgementDetail>
<acknowledgementDetail>
<code codeSystemName="MVI" code="103" displayName="PDT"/>
<text>Potential Duplicate Threshold</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<subject typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id nullFlavor="NA"/>
<statusCode code="active"/>
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<id extension="12345678901234567^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
<id extension="12345678^PI^200CORP^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="12345678901^PI^200MH^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="12345678902^PI^200MH^USVHA^D" root="2.16.840.1.113883.4.349"/>
<id extension="1122334455^NI^200DOD^USDOD^A" root="2.16.840.1.113883.3.42.10001.100001.12"/>
<id extension="0001234567^PN^200PROV^USDVA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123412345^PI^200BRLS^USVBA^A" root="2.16.840.1.113883.4.349"/>
<statusCode code="active"/>
<patientPerson>
<name use="L">
<given>STEVE</given>
<given>A</given>
<family>RANGER</family>
</name>
<telecom value="1112223333 p1" use="HP"/>
<administrativeGenderCode code="M"/>
<birthTime value="19800101"/>
<addr use="PHYS">
<streetAddressLine>42 MAIN ST</streetAddressLine>
<city>SPRINGFIELD</city>
<state>IL</state>
<postalCode>62722</postalCode>
<country>USA</country>
</addr>
<asOtherIDs classCode="SSN">
<id extension="111223333" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
</patientPerson>
<subjectOf1>
<queryMatchObservation classCode="COND" moodCode="EVN">
<code code="IHE_PDQ"/>
<value value="169" xsi:type="INT"/>
</queryMatchObservation>
</subjectOf1>
<subjectOf2 typeCode="SBJ">
<administrativeObservation classCode="VERIF">
<code codeSystem="2.16.840.1.113883.4.349" code="PERSON_TYPE" displayName="Person Type"/>
<value xsi:type="CD" code="PAT" displayName="Patient"/>
</administrativeObservation>
</subjectOf2>
</patient>
</subject1>
<custodian typeCode="CST">
<assignedEntity classCode="ASSIGNED">
<id root="2.16.840.1.113883.4.349"/>
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
<queryAck>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<queryResponseCode code="OK"/>
<resultCurrentQuantity value="1"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectAdministrativeGender>
<value code="M"/>
<semanticsText>Gender</semanticsText>
</livingSubjectAdministrativeGender>
<livingSubjectBirthTime>
<value value="19800101"/>
<semanticsText>Date of Birth</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="111223333" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
<livingSubjectName>
<value use="L">
<given>Steve</given>
<given>A</given>
<family>Ranger</family>
<semanticsText>Legal Name</semanticsText>
</value>
</livingSubjectName>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_ar_code_database_error_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
This is an 'AR' failure response from MVI.
An 'AR' response indicates that something is wrong with the MVI service (system down, internal error, etc.)
Specs to test handling of 'AR' responses will have to use this file.
A VCR cassette cannot be generated because
'AR' responses occur due to issues unrelated to how a request is constructed.
-->
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 xmlns:idm="http://vaww.oed.oit.va.gov" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd" xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0">
<id root="2.16.840.1.113883.4.349" extension="WS1909251643559041988507482"/>
<creationTime value="20190925164355"/>
<versionCode code="1.0"/>
<interactionId root="2.16.840.1.113883.1.6" extension="PRPA_IN201306UV02"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device classCode="DEV" determinerCode="INSTANCE">
<id root="1.2.840.114350.1.13.999.567" extension="200ESR"/>
</device>
</receiver>
<sender typeCode="SND">
<device classCode="DEV" determinerCode="INSTANCE">
<id root="2.16.840.1.113883.4.349" extension="200M"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AR"/>
<targetMessage>
<id root="1.2.840.114350.1.13.0.1.7.1.1" extension="MCID-12345"/>
</targetMessage>
<acknowledgementDetail>
<text>
<![CDATA[Environment Database Error]]>
</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code code="PRPA_TE201306UV02" codeSystem="2.16.840.1.113883.1.6"/>
<queryAck>
<queryId root="1.2.840.114350.1.13.28.1.18.5.999" extension="18204"/>
<queryResponseCode code="AE"/>
<resultCurrentQuantity value="0"/>
</queryAck>
<queryByParameter>
<!-- Unique identifier for the query -->
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<!-- The status of the query, default is "new" -->
<statusCode code="new"/>
<!-- MVI.COMP1=Add GetCorIds only Correlations -->
<!-- MVI.COMP1.RMS=Add GetCorIds with Correlations and Relationship Information -->
<!-- MVI.COMP2=Add GetCorIds with Correlations and ICN History -->
<modifyCode code="MVI.COMP1.RMS"/>
<!-- Attribute 'responseElementGroupId' indicates if Response should be the Primary View or Correlation, default is
Primary View. -->
<!-- extension="PV" root="2.16.840.1.113883.4.349 = Return Primary View -->
<!-- extension="COR" root="2.16.840.1.113883.4.349 = Return Correlation -->
<responseElementGroupId extension="PV" root="2.16.840.1.113883.4.349"/>
<!-- The return quantity should always be 1 for the retrieve -->
<initialQuantity value="1"/>
<!-- Identifier section: ONLY one identifier is valid, either an ICN or Correlation Id -->
<parameterList>
<id extension="1234^PI^523^USVHA" root="2.16.840.1.113883.4.349"/>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/add_person_internal_error_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:MCCI_IN000002UV01 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/MCCI_IN000002UV01.xsd" xmlns="urn:hl7-org:v3" xmlns:idm="http://********">
<id extension="WSDOC2002061957449380569866168" root="2.16.840.1.113883.4.349"/>
<creationTime value="20200206195744"/>
<versionCode code="4.1"/>
<interactionId extension="MCCI_IN000002UV01" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AR"/>
<targetMessage>
<id extension="200VGOV-1373004c-e23e-4d94-90c5-5b101f6be54a" root="22a0f9e0-4454-11dc-a6be-3603d6866807"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystem="2.16.840.1.113883.5.1100" code="INTERR" displayName="Internal System Error"/>
<text>Internal System Error</text>
</acknowledgementDetail>
<acknowledgementDetail>
<text>Internal System Error</text>
</acknowledgementDetail>
</acknowledgement>
</idm:MCCI_IN000002UV01>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/add_person_invalid_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:MCCI_IN000002UV01 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/MCCI_IN000002UV01.xsd" xmlns="urn:hl7-org:v3" xmlns:idm="http://********">
<id extension="WSDOC2002061957449380569866168" root="2.16.840.1.113883.4.349"/>
<creationTime value="20200206195744"/>
<versionCode code="4.1"/>
<interactionId extension="MCCI_IN000002UV01" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AE"/>
<targetMessage>
<id extension="200VGOV-1373004c-e23e-4d94-90c5-5b101f6be54a" root="22a0f9e0-4454-11dc-a6be-3603d6866807"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystem="2.16.840.1.113883.5.1100" code="INTERR" displayName="Internal System Error"/>
<text>Internal System Error</text>
</acknowledgementDetail>
<acknowledgementDetail>
<text>Internal System Error</text>
</acknowledgementDetail>
</acknowledgement>
</idm:MCCI_IN000002UV01>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/stub_mpi.rb
|
# frozen_string_literal: true
require 'mpi/models/mvi_profile'
require 'mpi/responses/find_profile_response'
def stub_mpi(profile = nil)
profile ||= FactoryBot.build(:mpi_profile)
# don't allow Mvi instances to be frozen during specs so that
# response_from_redis_or_service can always be reset
# (avoids WARNING: rspec-mocks was unable to restore the original... message)
allow_any_instance_of(MPIData).to receive(:freeze) { self }
allow_any_instance_of(MPIData).to receive(:response_from_redis_or_service).and_return(
FactoryBot.build(:find_profile_response, profile:)
)
end
def stub_mpi_not_found
allow_any_instance_of(MPIData).to receive(:response_from_redis_or_service).and_return(
FactoryBot.build(:find_profile_not_found_response)
)
end
def not_found_exception
Common::Exceptions::BackendServiceException.new(
'MVI_404',
{ source: 'MPI::Service' },
404,
'some error body'
)
end
def server_error_exception
Common::Exceptions::BackendServiceException.new(
'MVI_503',
{ source: 'MPI::Service' },
503,
'some error body'
)
end
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_multiple_match_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd"
xmlns:idm="http://vaww.oed.oit.va.gov"
xmlns="urn:hl7-org:v3">
<id extension="WSDOC1908291029321091314870791" root="2.16.840.1.113883.4.349"/>
<creationTime value="20190829102932"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AE"/>
<targetMessage>
<id extension="200VGOV-03b2801a-3005-4dcc-9a3c-7e3e4c0d5293" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystem="2.16.840.1.113883.5.1100" code="INTERR" displayName="Internal System Error"/>
<text>Multiple Matches Found</text>
</acknowledgementDetail>
<acknowledgementDetail>
<text>Multiple Matches Found</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<queryAck>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<queryResponseCode code="AE"/>
<resultCurrentQuantity value="0"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectAdministrativeGender>
<value code="M"/>
<semanticsText>Gender</semanticsText>
</livingSubjectAdministrativeGender>
<livingSubjectBirthTime>
<value value="19900220"/>
<semanticsText>Date of Birth</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="796295980" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
<livingSubjectName>
<value use="L">
<given>KENNETH DONALD</given>
<family>ANDREWS</family>
</value>
<semanticsText>Legal Name</semanticsText>
</livingSubjectName>
<otherIDsScopingOrganization>
<value extension="VBA" root="2.16.840.1.113883.4.349"/>
<semanticsText>MVI.ORCHESTRATION</semanticsText>
</otherIDsScopingOrganization>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_valid_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd"
xmlns:idm="http://vaww.oed.oit.va.gov"
xmlns="urn:hl7-org:v3">
<id extension="WSDOC1908281447208280163390431" root="2.16.840.1.113883.4.349"/>
<creationTime value="20190828144720"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="200VGOV-fe439bec-01f4-4772-af20-ff952f18e8a4" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystemName="MVI" code="132" displayName="IMT"/>
<text>Identity Match Threshold</text>
</acknowledgementDetail>
<acknowledgementDetail>
<code codeSystemName="MVI" code="120" displayName="PDT"/>
<text>Potential Duplicate Threshold</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<subject typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id nullFlavor="NA"/>
<statusCode code="active"/>
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<id extension="1008714701V416111^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
<id extension="796122306^PI^200BRLS^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="9100792239^PI^200CORP^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="1008714701^PN^200PROV^USDVA^A" root="2.16.840.1.113883.4.349"/>
<statusCode code="active"/>
<patientPerson>
<name use="L">
<given>MITCHELL</given>
<given>G</given>
<family>JENKINS</family>
</name>
<administrativeGenderCode code="M"/>
<birthTime value="19490304"/>
<addr use="PHYS">
<streetAddressLine>121 A St</streetAddressLine>
<city>Austin</city>
<state>TX</state>
<postalCode>78772</postalCode>
<country>USA</country>
</addr>
<asOtherIDs classCode="SSN">
<id extension="796122306" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
</patientPerson>
<subjectOf1>
<queryMatchObservation classCode="COND" moodCode="EVN">
<code code="IHE_PDQ"/>
<value value="169" xsi:type="INT"/>
</queryMatchObservation>
</subjectOf1>
<subjectOf2 typeCode="SBJ">
<administrativeObservation classCode="VERIF">
<code codeSystem="2.16.840.1.113883.4.349" code="PERSON_TYPE" displayName="Person Type"/>
<value xsi:type="CD" code="PAT" displayName="Patient"/>
</administrativeObservation>
</subjectOf2>
</patient>
</subject1>
<custodian typeCode="CST">
<assignedEntity classCode="ASSIGNED">
<id root="2.16.840.1.113883.4.349"/>
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
<queryAck>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<queryResponseCode code="OK"/>
<resultCurrentQuantity value="1"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectAdministrativeGender>
<value code="M"/>
<semanticsText>Gender</semanticsText>
</livingSubjectAdministrativeGender>
<livingSubjectBirthTime>
<value value="19490304"/>
<semanticsText>Date of Birth</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="796122306" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
<livingSubjectName>
<value use="L">
<given>MITCHELL</given>
<given>G</given>
<family>JENKINS</family>
</value>
<semanticsText>Legal Name</semanticsText>
</livingSubjectName>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_missing_attrs_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd"
xmlns:idm="http://vaww.oed.oit.va.gov"
xmlns="urn:hl7-org:v3">
<id extension="WSDOC1908201553145951848240311" root="2.16.840.1.113883.4.349"/>
<creationTime value="20190820155314"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="200VGOV-28315f85-bc45-4069-9cb4-4ad9280ddfac" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<subject typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id nullFlavor="NA"/>
<statusCode code="active"/>
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<id extension="1008714701V416111^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
<id extension="796122306^PI^200BRLS^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="9100792239^PI^200CORP^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="1008714701^PN^200PROV^USDVA^A" root="2.16.840.1.113883.4.349"/>
<id extension="1100792239^PI^200MHS^USVHA^A" root="2.16.840.1.113883.4.349"/>
<statusCode code="active"/>
<patientPerson>
<name use="L">
<given>MITCHELL</given>
<family>JENKINS</family>
</name>
<administrativeGenderCode code="M"/>
<birthTime value="19490304"/>
<addr use="PHYS">
<streetAddressLine>121 A St</streetAddressLine>
<city>Austin</city>
<state>TX</state>
<postalCode>78772</postalCode>
<country>USA</country>
</addr>
<asOtherIDs classCode="SSN">
<id extension="796122306" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
</patientPerson>
<subjectOf1>
<queryMatchObservation classCode="COND" moodCode="EVN">
<code code="IHE_PDQ"/>
<value nullFlavor="NA" xsi:type="INT"/>
</queryMatchObservation>
</subjectOf1>
<subjectOf2 typeCode="SBJ">
<administrativeObservation classCode="VERIF">
<code codeSystem="2.16.840.1.113883.4.349" code="PERSON_TYPE" displayName="Person Type"/>
<value xsi:type="CD" code="PAT" displayName="Patient"/>
</administrativeObservation>
</subjectOf2>
</patient>
</subject1>
<custodian typeCode="CST">
<assignedEntity classCode="ASSIGNED">
<id root="2.16.840.1.113883.4.349"/>
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
<queryAck>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<queryResponseCode code="OK"/>
<resultCurrentQuantity value="1"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<id extension="1008714701V416111^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_missing_name_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 xmlns="urn:hl7-org:v3" xmlns:idm="http://vaww.oed.oit.va.gov" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd">
<id extension="WSDOC1609131753362231779394902" root="2.16.840.1.113883.4.349"/>
<creationTime value="20160913175336"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="MCID-12345" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystemName="MVI" code="132" displayName="IMT"/>
<text>Identity Match Threshold</text>
</acknowledgementDetail>
<acknowledgementDetail>
<code codeSystemName="MVI" code="120" displayName="PDT"/>
<text>Potential Duplicate Threshold</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<subject typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id nullFlavor="NA"/>
<statusCode code="active"/>
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<id extension="1000123456V123456^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
<id extension="12345^PI^516^USVHA^PCE" root="2.16.840.1.113883.4.349"/>
<id extension="2^PI^553^USVHA^PCE" root="2.16.840.1.113883.4.349"/>
<id extension="12345^PI^200HD^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="TKIP123456^PI^200IP^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123456^PI^200MHV^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="1234567890^NI^200DOD^USDOD^A" root="2.16.840.1.113883.3.42.10001.100001.12" />
<id extension="87654321^PI^200CORP^USVBA^H" root="2.16.840.1.113883.4.349"/>
<id extension="12345678^PI^200CORP^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123456789^PI^200VETS^USDVA^A" root="2.16.840.1.113883.4.349" />
<statusCode code="active"/>
<patientPerson>
<telecom value="1112223333" use="HP"/>
<administrativeGenderCode code="M"/>
<birthTime value="19800101"/>
<addr use="PHYS">
<streetAddressLine>121 A St</streetAddressLine>
<city>Austin</city>
<state>TX</state>
<postalCode>78772</postalCode>
<country>USA</country>
</addr>
<multipleBirthInd value="true"/>
<asOtherIDs classCode="SSN">
<id extension="555443333" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
<birthPlace>
<addr>
<city>JOHNSON CITY</city>
<state>MS</state>
<country>USA</country>
</addr>
</birthPlace>
</patientPerson>
<subjectOf1>
<queryMatchObservation classCode="COND" moodCode="EVN">
<code code="IHE_PDQ"/>
<value value="162" xsi:type="INT"/>
</queryMatchObservation>
</subjectOf1>
<subjectOf2 typeCode="SBJ">
<administrativeObservation classCode="VERIF">
<code codeSystem="2.16.840.1.113883.4.349" code="PERSON_TYPE" displayName="Person Type"/>
<value xsi:type="CD" code="PAT" displayName="Patient"/>
</administrativeObservation>
</subjectOf2>
</patient>
</subject1>
<custodian typeCode="CST">
<assignedEntity classCode="ASSIGNED">
<id root="2.16.840.1.113883.4.349"/>
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
<queryAck>
<queryId extension="18204" root="2.16.840.1.113883.3.933"/>
<queryResponseCode code="OK"/>
<resultCurrentQuantity value="1"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="2.16.840.1.113883.3.933"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectName>
<value use="L">
<given>John</given>
<given>William</given>
<family>Smith</family>
</value>
<semanticsText>LivingSubject.name</semanticsText>
</livingSubjectName>
<livingSubjectBirthTime>
<value value="19800101"/>
<semanticsText>LivingSubject..birthTime</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="555-44-3333" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_no_match_response.xml
|
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd"
xmlns="urn:hl7-org:v3"
xmlns:idm="http://vaww.oed.oit.va.gov">
<id extension="WSDOC2301091930081411234928027" root="2.16.840.1.113883.4.349"/>
<creationTime value="20230109193008"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device classCode="DEV" determinerCode="INSTANCE">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device classCode="DEV" determinerCode="INSTANCE">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="200VGOV-0de5c0b9-a5c5-486d-aab2-8f4e9a5ac6a5" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystemName="MVI" code="127" displayName="IMT"/>
<text>Identity Match Threshold</text>
</acknowledgementDetail>
<acknowledgementDetail>
<code codeSystemName="MVI" code="103" displayName="PDT"/>
<text>Potential Duplicate Threshold</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code code="PRPA_TE201306UV02" codeSystem="2.16.840.1.113883.1.6"/>
<queryAck>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<queryResponseCode code="NF"/>
<resultCurrentQuantity value="0"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP2"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectBirthTime>
<value value="19700101"/>
<semanticsText>Date of Birth</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="XXXXXXXXX" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
<livingSubjectName>
<value use="L">
<given>A</given>
<given/>
<family>B</family>
</value>
<semanticsText>Legal Name</semanticsText>
</livingSubjectName>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_with_relationship_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd"
xmlns="urn:hl7-org:v3"
xmlns:idm="http://vaww.oed.oit.va.gov">
<id extension="WSDOC2005221733165441605720989" root="2.16.840.1.113883.4.349"/>
<creationTime value="20200522173316"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="200VGOV-c88239c0-ee47-455c-867b-3a6941beeaa0" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystemName="MVI" code="132" displayName="IMT"/>
<text>Identity Match Threshold</text>
</acknowledgementDetail>
<acknowledgementDetail>
<code codeSystemName="MVI" code="120" displayName="PDT"/>
<text>Potential Duplicate Threshold</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<subject typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id nullFlavor="NA"/>
<statusCode code="active"/>
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<statusCode code="active"/>
<patientPerson>
<name use="L">
<given>RANDY</given>
<family>LITTLE</family>
<suffix>JR</suffix>
</name>
<telecom value="1112223333" use="HP"/>
<administrativeGenderCode code="M"/>
<birthTime value="19901004"/>
<multipleBirthInd value="false"/>
<asOtherIDs classCode="SSN">
<id extension="999123456" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
<personalRelationship>
<code codeSystemName="RoleCode" codeSystem="2.16.840.1.113883.5.111" code="DEL" displayName="VA Healthcare Proxy"></code>
<translation codeSystemName="RoleCode" codeSystem="2.16.840.1.113883.5.111" code="PRS"/>
<telecom value="mailto:Daniel.Rocha@va.gov" use="H"/>
<statusCode code="ACTIVE"/>
<effectiveTime value="20160705"/>
<relationshipHolder1 determinerCode="INSTANCE" classCode="PAT">
<id extension="1008709396V637156^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
<id extension="1013590059^NI^200DOD^USDOD^A" root="2.16.840.1.113883.3.42.10001.100001.12"/>
<id extension="0001740097^PN^200PROV^USDVA^A" root="2.16.840.1.113883.4.349"/>
<id extension="796104437^PI^200BRLS^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="13367440^PI^200CORP^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="0000027647^PN^200PROV^USDVA^A" root="2.16.840.1.113883.4.349"/>
<id extension="0000027648^PN^200PROV^USDVA^A" root="2.16.840.1.113883.4.349"/>
<id extension="1babbd957ca14e44880a534b65bb0ed4^PN^200VIDM^USDVA^A" root="2.16.840.1.113883.4.349"/>
<id extension="4795335^PI^200MH^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="7909^PI^200VETS^USDVA^A" root="2.16.840.1.113883.4.349"/>
<id extension="6400bbf301eb4e6e95ccea7693eced6f^PN^200VIDM^USDVA^A" root="2.16.840.1.113883.4.349"/>
<name use="L">
<given>MARK</given>
<family>WEBB</family>
<suffix>JR</suffix>
</name>
<administrativeGenderCode code="M"/>
<birthTime value="19501004"/>
<asOtherIDs classCode="SSN">
<id extension="796104437" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
<asOtherIDs classCode="EXP">
<id extension="20160705" root="2.16.840.1.113883.4.349"/>
</asOtherIDs>
<asOtherIDs classCode="PREF">
<id extension="FULL" root="2.16.840.1.113883.4.349"/>
</asOtherIDs>
</relationshipHolder1>
</personalRelationship>
</patientPerson>
<subjectOf1>
<queryMatchObservation classCode="COND" moodCode="EVN">
<code code="IHE_PDQ"/>
<value value="167" xsi:type="INT"/>
</queryMatchObservation>
</subjectOf1>
<subjectOf2 typeCode="SBJ">
<administrativeObservation classCode="VERIF">
<code codeSystem="2.16.840.1.113883.4.349" code="PERSON_TYPE" displayName="Person Type"/>
<value xsi:type="CD" code="DEP~VET" displayName="Dependent, Veteran"/>
</administrativeObservation>
</subjectOf2>
</patient>
</subject1>
<custodian typeCode="CST">
<assignedEntity classCode="ASSIGNED">
<id root="2.16.840.1.113883.4.349"/>
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
<queryAck>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<queryResponseCode code="OK"/>
<resultCurrentQuantity value="1"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectAdministrativeGender>
<value code="M"/>
<semanticsText>Gender</semanticsText>
</livingSubjectAdministrativeGender>
<livingSubjectBirthTime>
<value value="199001004"/>
<semanticsText>Date of Birth</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="999123456" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
<livingSubjectName>
<value use="L">
<given>RANDY</given>
<family>LITTLE</family>
</value>
<semanticsText>Legal Name</semanticsText>
</livingSubjectName>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_incomplete_dob_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 xmlns="urn:hl7-org:v3" xmlns:idm="http://vaww.oed.oit.va.gov" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd">
<id extension="WSDOC1609131753362231779394902" root="2.16.840.1.113883.4.349"/>
<creationTime value="20160913175336"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="MCID-12345" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystemName="MVI" code="132" displayName="IMT"/>
<text>Identity Match Threshold</text>
</acknowledgementDetail>
<acknowledgementDetail>
<code codeSystemName="MVI" code="120" displayName="PDT"/>
<text>Potential Duplicate Threshold</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<subject typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id nullFlavor="NA"/>
<statusCode code="active"/>
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<id extension="1000123456V123456^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
<id extension="12345^PI^516^USVHA^PCE" root="2.16.840.1.113883.4.349"/>
<id extension="2^PI^553^USVHA^PCE" root="2.16.840.1.113883.4.349"/>
<id extension="12345^PI^200HD^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="TKIP123456^PI^200IP^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123456^PI^200MHV^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="1234567890^NI^200DOD^USDOD^A" root="2.16.840.1.113883.3.42.10001.100001.12" />
<id extension="87654321^PI^200CORP^USVBA^H" root="2.16.840.1.113883.4.349"/>
<id extension="12345678^PI^200CORP^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123456789^PI^200VETS^USDVA^A" root="2.16.840.1.113883.4.349" />
<statusCode code="active"/>
<patientPerson>
<name use="L">
<given>JOHN</given>
<given>WILLIAM</given>
<family>SMITH</family>
</name>
<telecom value="1112223333" use="HP"/>
<administrativeGenderCode code="M"/>
<birthTime value="198003"/>
<addr use="PHYS">
<streetAddressLine>121 A St</streetAddressLine>
<city>Austin</city>
<state>TX</state>
<postalCode>78772</postalCode>
<country>USA</country>
</addr>
<multipleBirthInd value="true"/>
<asOtherIDs classCode="SSN">
<id extension="555443333" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
<birthPlace>
<addr>
<city>JOHNSON CITY</city>
<state>MS</state>
<country>USA</country>
</addr>
</birthPlace>
</patientPerson>
<subjectOf1>
<queryMatchObservation classCode="COND" moodCode="EVN">
<code code="IHE_PDQ"/>
<value value="162" xsi:type="INT"/>
</queryMatchObservation>
</subjectOf1>
<subjectOf2 typeCode="SBJ">
<administrativeObservation classCode="VERIF">
<code codeSystem="2.16.840.1.113883.4.349" code="PERSON_TYPE" displayName="Person Type"/>
<value xsi:type="CD" code="PAT" displayName="Patient"/>
</administrativeObservation>
</subjectOf2>
</patient>
</subject1>
<custodian typeCode="CST">
<assignedEntity classCode="ASSIGNED">
<id root="2.16.840.1.113883.4.349"/>
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
<queryAck>
<queryId extension="18204" root="2.16.840.1.113883.3.933"/>
<queryResponseCode code="OK"/>
<resultCurrentQuantity value="1"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="2.16.840.1.113883.3.933"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectName>
<value use="L">
<given>JOHN</given>
<given>WILLIAM</given>
<family>SMITH</family>
</value>
<semanticsText>LivingSubject.name</semanticsText>
</livingSubjectName>
<livingSubjectBirthTime>
<value value="198003"/>
<semanticsText>LivingSubject..birthTime</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="555-44-3333" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_soap_fault.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header/><env:Body>
<env:Fault>
<env:Code><env:Value>env:Sender</env:Value></env:Code>
<env:Reason><env:Text xml:lang="en-US">
Message does not have necessary info
</env:Text></env:Reason>
<env:Role>http://gizmos.com/order</env:Role>
<env:Detail>
<PO:order xmlns:PO="http://gizmos.com/orders/">
Quantity element does not have a value</PO:order>
<PO:confirmation xmlns:PO="http://gizmos.com/confirm">
Incomplete address: no zip code</PO:confirmation>
</env:Detail></env:Fault>
</env:Body></env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_response_nil_address.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 xmlns="urn:hl7-org:v3" xmlns:idm="http://scraped.gov" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd">
<id extension="WSDOC1609131753362231779394902" root="2.16.840.1.113883.4.349"/>
<creationTime value="20160913175336"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="MCID-12345" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystemName="MVI" code="132" displayName="IMT"/>
<text>Identity Match Threshold</text>
</acknowledgementDetail>
<acknowledgementDetail>
<code codeSystemName="MVI" code="120" displayName="PDT"/>
<text>Potential Duplicate Threshold</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<subject typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id nullFlavor="NA"/>
<statusCode code="active"/>
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<id extension="1000123456V123456^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
<id extension="12345^PI^516^USVHA^PCE" root="2.16.840.1.113883.4.349"/>
<id extension="2^PI^553^USVHA^PCE" root="2.16.840.1.113883.4.349"/>
<id extension="12345^PI^200HD^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="TKIP123456^PI^200IP^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123456^PI^200MHV^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="UNK^NI^200DOD^USDOD^A" root="2.16.840.1.113883.3.42.10001.100001.12" />
<id extension="UNK^PI^200CORP^USVBA^A" root="2.16.840.1.113883.4.349"/>
<statusCode code="active"/>
<patientPerson>
<name use="L">
<given>JOHN</given>
<given>WILLIAM</given>
<family>SMITH</family>
<prefix>MR</prefix>
<suffix>SR</suffix>
</name>
<name use="P">
<delimiter>101</delimiter>
<family>SMITH</family>
</name>
<name use="C">
<family>SMITH</family>
</name>
<telecom value="1112223333" use="HP"/>
<administrativeGenderCode code="M"/>
<birthTime value="19800101"/>
<multipleBirthInd value="true"/>
<asOtherIDs classCode="SSN">
<id extension="555443333" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
<birthPlace>
<addr>
<city>JOHNSON CITY</city>
<state>MS</state>
<country>USA</country>
</addr>
</birthPlace>
</patientPerson>
<subjectOf1>
<queryMatchObservation classCode="COND" moodCode="EVN">
<code code="IHE_PDQ"/>
<value value="162" xsi:type="INT"/>
</queryMatchObservation>
</subjectOf1>
<subjectOf2 typeCode="SBJ">
<administrativeObservation classCode="VERIF">
<code codeSystem="2.16.840.1.113883.4.349" code="PERSON_TYPE" displayName="Person Type"/>
<value xsi:type="CD" code="PAT" displayName="Patient"/>
</administrativeObservation>
</subjectOf2>
</patient>
</subject1>
<custodian typeCode="CST">
<assignedEntity classCode="ASSIGNED">
<id root="2.16.840.1.113883.4.349"/>
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
<queryAck>
<queryId extension="18204" root="2.16.840.1.113883.3.933"/>
<queryResponseCode code="OK"/>
<resultCurrentQuantity value="1"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="2.16.840.1.113883.3.933"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectName>
<value use="L">
<given>John</given>
<given>William</given>
<family>Smith</family>
</value>
<semanticsText>LivingSubject.name</semanticsText>
</livingSubjectName>
<livingSubjectBirthTime>
<value value="19800101"/>
<semanticsText>LivingSubject..birthTime</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="555-44-3333" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_inactive_mhv_ids.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd"
xmlns:idm="http://vaww.oed.oit.va.gov"
xmlns="urn:hl7-org:v3">
<id extension="WSDOC1908141602159601500112018" root="2.16.840.1.113883.4.349"/>
<creationTime value="20190814160216"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="200VGOV-387d3ca5-8074-4aaf-9bda-ed1aa8c83f58" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<subject typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id nullFlavor="NA"/>
<statusCode code="active"/>
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<id extension="12345678901234567^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
<id extension="12345678^PI^200CORP^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="12345678901^PI^200MH^USVHA^U" root="2.16.840.1.113883.4.349"/>
<id extension="12345678902^PI^200MH^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="1122334455^NI^200DOD^USDOD^A" root="2.16.840.1.113883.3.42.10001.100001.12"/>
<id extension="0001234567^PN^200PROV^USDVA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123412345^PI^200BRLS^USVBA^A" root="2.16.840.1.113883.4.349"/>
<statusCode code="active"/>
<patientPerson>
<name use="L">
<given>BENJAMIIN</given>
<given>TWO</given>
<family>CHESNEY</family>
</name>
<administrativeGenderCode code="M"/>
<birthTime value="19701231"/>
<asOtherIDs classCode="SSN">
<id extension="024018711" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
</patientPerson>
<subjectOf1>
<queryMatchObservation classCode="COND" moodCode="EVN">
<code code="IHE_PDQ"/>
<value nullFlavor="NA" xsi:type="INT"/>
</queryMatchObservation>
</subjectOf1>
</patient>
</subject1>
<custodian typeCode="CST">
<assignedEntity classCode="ASSIGNED">
<id root="2.16.840.1.113883.4.349"/>
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
<queryAck>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<queryResponseCode code="OK"/>
<resultCurrentQuantity value="1"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<id extension="1025062341" root="2.16.840.1.113883.3.42.10001.100001.12"/>
<otherIDsScopingOrganization>
<value extension="VBA" root="2.16.840.1.113883.4.349"/>
<semanticsText>MVI.ORCHESTRATION</semanticsText>
</otherIDsScopingOrganization>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_multiple_name_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 xmlns="urn:hl7-org:v3"
xmlns:idm="http://vaww.oed.oit.va.gov"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd">
<id extension="WSDOC1609131753362231779394902" root="2.16.840.1.113883.4.349"/>
<creationTime value="20160913175336"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="MCID-12345" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystemName="MVI" code="132" displayName="IMT"/>
<text>Identity Match Threshold</text>
</acknowledgementDetail>
<acknowledgementDetail>
<code codeSystemName="MVI" code="120" displayName="PDT"/>
<text>Potential Duplicate Threshold</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<subject typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id nullFlavor="NA"/>
<statusCode code="active"/>
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<id extension="1000123456V123456^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
<id extension="12345^PI^516^USVHA^PCE" root="2.16.840.1.113883.4.349"/>
<id extension="2^PI^553^USVHA^PCE" root="2.16.840.1.113883.4.349"/>
<id extension="12345^PI^200HD^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="TKIP123456^PI^200IP^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123456^PI^200MHV^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="1234567890^NI^200DOD^USDOD^A" root="2.16.840.1.113883.3.42.10001.100001.12" />
<id extension="87654321^PI^200CORP^USVBA^H" root="2.16.840.1.113883.4.349"/>
<id extension="12345678^PI^200CORP^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123456789^PI^200VETS^USDVA^A" root="2.16.840.1.113883.4.349" />
<statusCode code="active"/>
<patientPerson>
<name use="ASGN">
<given>GENERAL</given>
</name>
<name use="L">
<given>JOHN</given>
<given>WILLIAM</given>
<family>SMITH</family>
<prefix>MR</prefix>
<suffix>SR</suffix>
</name>
<name use="P">
<delimiter>101</delimiter>
<family>SMITH</family>
</name>
<name use="C">
<family>SMITH</family>
</name>
<telecom value="1112223333" use="HP"/>
<administrativeGenderCode code="M"/>
<birthTime value="19800101"/>
<addr use="PHYS">
<streetAddressLine>121 A St</streetAddressLine>
<city>Austin</city>
<state>TX</state>
<postalCode>78772</postalCode>
<country>USA</country>
</addr>
<multipleBirthInd value="true"/>
<asOtherIDs classCode="SSN">
<id extension="555443333" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
<birthPlace>
<addr>
<city>JOHNSON CITY</city>
<state>MS</state>
<country>USA</country>
</addr>
</birthPlace>
</patientPerson>
<subjectOf1>
<queryMatchObservation classCode="COND" moodCode="EVN">
<code code="IHE_PDQ"/>
<value value="162" xsi:type="INT"/>
</queryMatchObservation>
</subjectOf1>
<subjectOf2 typeCode="SBJ">
<administrativeObservation classCode="VERIF">
<code codeSystem="2.16.840.1.113883.4.349" code="PERSON_TYPE" displayName="Person Type"/>
<value xsi:type="CD" code="PAT" displayName="Patient"/>
</administrativeObservation>
</subjectOf2>
</patient>
</subject1>
<custodian typeCode="CST">
<assignedEntity classCode="ASSIGNED">
<id root="2.16.840.1.113883.4.349"/>
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
<queryAck>
<queryId extension="18204" root="2.16.840.1.113883.3.933"/>
<queryResponseCode code="OK"/>
<resultCurrentQuantity value="1"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="2.16.840.1.113883.3.933"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectName>
<value use="L">
<given>John</given>
<given>William</given>
<family>Smith</family>
</value>
<semanticsText>LivingSubject.name</semanticsText>
</livingSubjectName>
<livingSubjectBirthTime>
<value value="19800101"/>
<semanticsText>LivingSubject..birthTime</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="555-44-3333" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 xmlns="urn:hl7-org:v3" xmlns:idm="http://vaww.oed.oit.va.gov" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd">
<id extension="WSDOC1609131753362231779394902" root="2.16.840.1.113883.4.349"/>
<creationTime value="20160913175336"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200VGOV" root="2.16.840.1.113883.4.349"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AA"/>
<targetMessage>
<id extension="MCID-12345" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystemName="MVI" code="132" displayName="IMT"/>
<text>Identity Match Threshold</text>
</acknowledgementDetail>
<acknowledgementDetail>
<code codeSystemName="MVI" code="120" displayName="PDT"/>
<text>Potential Duplicate Threshold</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<subject typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id nullFlavor="NA"/>
<statusCode code="active"/>
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<id extension="1000123456V123456^NI^200M^USVHA^P" root="2.16.840.1.113883.4.349"/>
<id extension="12345^PI^516^USVHA^PCE" root="2.16.840.1.113883.4.349"/>
<id extension="2^PI^553^USVHA^PCE" root="2.16.840.1.113883.4.349"/>
<id extension="12345^PI^200HD^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="TKIP123456^PI^200IP^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123456^PI^200MHV^USVHA^A" root="2.16.840.1.113883.4.349"/>
<id extension="1234567890^NI^200DOD^USDOD^A" root="2.16.840.1.113883.3.42.10001.100001.12" />
<id extension="87654321^PI^200CORP^USVBA^H" root="2.16.840.1.113883.4.349"/>
<id extension="12345678^PI^200CORP^USVBA^A" root="2.16.840.1.113883.4.349"/>
<id extension="123456789^PI^200VETS^USDVA^A" root="2.16.840.1.113883.4.349" />
<statusCode code="active"/>
<patientPerson>
<name use="L">
<given>JOHN</given>
<given>WILLIAM</given>
<family>SMITH</family>
<prefix>MR</prefix>
<suffix>SR</suffix>
</name>
<name use="P">
<delimiter>101</delimiter>
<family>SMITH</family>
</name>
<name use="C">
<family>SMITH</family>
</name>
<telecom value="1112223333" use="HP"/>
<administrativeGenderCode code="M"/>
<birthTime value="19800101"/>
<addr use="PHYS">
<streetAddressLine>121 A St</streetAddressLine>
<city>Austin</city>
<state>TX</state>
<postalCode>78772</postalCode>
<country>USA</country>
</addr>
<multipleBirthInd value="true"/>
<asOtherIDs classCode="SSN">
<id extension="555443333" root="2.16.840.1.113883.4.1"/>
<scopingOrganization determinerCode="INSTANCE" classCode="ORG">
<id root="1.2.840.114350.1.13.99997.2.3412"/>
</scopingOrganization>
</asOtherIDs>
<birthPlace>
<addr>
<city>JOHNSON CITY</city>
<state>MS</state>
<country>USA</country>
</addr>
</birthPlace>
</patientPerson>
<subjectOf1>
<queryMatchObservation classCode="COND" moodCode="EVN">
<code code="IHE_PDQ"/>
<value value="162" xsi:type="INT"/>
</queryMatchObservation>
</subjectOf1>
<subjectOf2 typeCode="SBJ">
<administrativeObservation classCode="VERIF">
<code codeSystem="2.16.840.1.113883.4.349" code="PERSON_TYPE" displayName="Person Type"/>
<value xsi:type="CD" code="PAT" displayName="Patient"/>
</administrativeObservation>
</subjectOf2>
</patient>
</subject1>
<custodian typeCode="CST">
<assignedEntity classCode="ASSIGNED">
<id root="2.16.840.1.113883.4.349"/>
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
<queryAck>
<queryId extension="18204" root="2.16.840.1.113883.3.933"/>
<queryResponseCode code="OK"/>
<resultCurrentQuantity value="1"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="2.16.840.1.113883.3.933"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectName>
<value use="L">
<given>John</given>
<given>William</given>
<family>Smith</family>
</value>
<semanticsText>LivingSubject.name</semanticsText>
</livingSubjectName>
<livingSubjectBirthTime>
<value value="19800101"/>
<semanticsText>LivingSubject..birthTime</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="555-44-3333" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/mpi/find_candidate_invalid_response.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<env:Header/>
<env:Body>
<idm:PRPA_IN201306UV02 ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201306UV02.xsd"
xmlns:idm="http://vaww.oed.oit.va.gov"
xmlns="urn:hl7-org:v3">
<id extension="WSDOC1909051245402750982473010" root="2.16.840.1.113883.4.349"/>
<creationTime value="20190905124540"/>
<versionCode code="4.1"/>
<interactionId extension="PRPA_IN201306UV02" root="2.16.840.1.113883.1.6"/>
<processingCode code="T"/>
<processingModeCode code="T"/>
<acceptAckCode code="NE"/>
<receiver typeCode="RCV">
<device determinerCode="INSTANCE" classCode="DEV">
<id root="null"/>
</device>
</receiver>
<sender typeCode="SND">
<device determinerCode="INSTANCE" classCode="DEV">
<id extension="200M" root="2.16.840.1.113883.4.349"/>
</device>
</sender>
<acknowledgement>
<typeCode code="AE"/>
<targetMessage>
<id extension="200VGOV-2c3c0c78-5e44-4ad2-b542-11388c3e45cd" root="1.2.840.114350.1.13.0.1.7.1.1"/>
</targetMessage>
<acknowledgementDetail>
<code codeSystem="2.16.840.1.113883.5.1100" code="INTERR" displayName="Internal System Error"/>
<text>MVI[S]:INVALID REQUEST</text>
</acknowledgementDetail>
<acknowledgementDetail>
<text>MVI[S]:INVALID REQUEST</text>
</acknowledgementDetail>
</acknowledgement>
<controlActProcess classCode="CACT" moodCode="EVN">
<code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV02"/>
<queryAck>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<queryResponseCode code="AE"/>
<resultCurrentQuantity value="0"/>
</queryAck>
<queryByParameter>
<queryId extension="18204" root="1.2.840.114350.1.13.28.1.18.5.999"/>
<statusCode code="new"/>
<modifyCode code="MVI.COMP1.RMS"/>
<initialQuantity value="1"/>
<parameterList>
<livingSubjectAdministrativeGender>
<value code="M"/>
<semanticsText>Gender</semanticsText>
</livingSubjectAdministrativeGender>
<livingSubjectBirthTime>
<value value="19490304"/>
<semanticsText>Date of Birth</semanticsText>
</livingSubjectBirthTime>
<livingSubjectId>
<value extension="796122306" root="2.16.840.1.113883.4.1"/>
<semanticsText>SSN</semanticsText>
</livingSubjectId>
<livingSubjectName>
<value use="L">
<given>Mitchell</given>
<given>G</given>
<family>Jenkins</family>
</value>
<semanticsText>Legal Name</semanticsText>
</livingSubjectName>
</parameterList>
</queryByParameter>
</controlActProcess>
</idm:PRPA_IN201306UV02>
</env:Body>
</env:Envelope>
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/sidekiq/batch.rb
|
# frozen_string_literal: true
module Sidekiq
class Batch
attr_accessor :description
attr_reader :bid
def initialize(bid = nil)
@bid = bid || SecureRandom.hex(8)
@callbacks = []
end
def status
nil
end
def on(*args)
@callbacks << args
end
def jobs(*)
yield
end
end
end
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/sign_in/service_account_authorization_context.rb
|
# frozen_string_literal: true
RSpec.shared_context 'with service account authentication' do |service_account_id, scopes, optional_claims = {}|
let(:service_account_auth_header) { { 'Authorization' => "Bearer #{encoded_service_account_access_token}" } }
let(:encoded_service_account_access_token) do
SignIn::ServiceAccountAccessTokenJwtEncoder.new(service_account_access_token:).perform
end
let(:service_account_access_token) do
create(
:service_account_access_token,
**optional_claims.merge(
{
service_account_id: service_account_config.service_account_id,
scopes: service_account_config.scopes
}
)
)
end
let(:service_account_config) do
create(:service_account_config, service_account_id:, scopes:)
end
end
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/sign_in/shared_examples.rb
|
# frozen_string_literal: true
require_relative 'shared_examples/authorize/api_error_response'
require_relative 'shared_examples/authorize/error_response'
require_relative 'shared_examples/authorize/successful_response'
require_relative 'shared_examples/callback/api_error_response'
require_relative 'shared_examples/callback/error_response'
require_relative 'shared_examples/token/error_response'
require_relative 'shared_examples/refresh/error_response'
require_relative 'shared_examples/revoke/error_response'
require_relative 'shared_examples/logout/authorization_error_response'
require_relative 'shared_examples/logout/error_response'
require_relative 'shared_examples/logingov_logout_proxy/error_response'
require_relative 'shared_examples/revoke_all_sessions/error_response'
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts.rb
|
# frozen_string_literal: true
require_relative 'shared_contexts/authorize/setup'
require_relative 'shared_contexts/authorize/client_state_handling'
require_relative 'shared_contexts/callback/setup'
require_relative 'shared_contexts/callback/state_jwt_setup'
require_relative 'shared_contexts/token/setup'
require_relative 'shared_contexts/refresh/setup'
require_relative 'shared_contexts/revoke/setup'
require_relative 'shared_contexts/logout/setup'
require_relative 'shared_contexts/logingov_logout_proxy/setup'
require_relative 'shared_contexts/revoke_all_sessions/setup'
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts/token/setup.rb
|
# frozen_string_literal: true
RSpec.shared_context 'token_setup' do
subject do
get(:token,
params: {}
.merge(code)
.merge(code_verifier)
.merge(grant_type)
.merge(client_assertion)
.merge(client_assertion_type)
.merge(assertion)
.merge(subject_token)
.merge(subject_token_type)
.merge(actor_token)
.merge(actor_token_type)
.merge(client_id_param))
end
let(:user_verification) { create(:user_verification) }
let(:user_verification_id) { user_verification.id }
let!(:user) { create(:user, :loa3, user_verification:, user_account: user_verification.user_account) }
let(:user_uuid) { user_verification.credential_identifier }
let(:code) { { code: code_value } }
let(:code_verifier) { { code_verifier: code_verifier_value } }
let(:grant_type) { { grant_type: grant_type_value } }
let(:assertion) { { assertion: assertion_value } }
let(:subject_token) { { subject_token: subject_token_value } }
let(:subject_token_type) { { subject_token_type: subject_token_type_value } }
let(:actor_token) { { actor_token: actor_token_value } }
let(:actor_token_type) { { actor_token_type: actor_token_type_value } }
let(:client_id_param) { { client_id: client_id_value } }
let(:assertion_value) { nil }
let(:subject_token_value) { 'some-subject-token' }
let(:subject_token_type_value) { 'some-subject-token-type' }
let(:actor_token_value) { 'some-actor-token' }
let(:actor_token_type_value) { 'some-actor-token-type' }
let(:client_id_value) { 'some-client-id' }
let(:code_value) { 'some-code' }
let(:code_verifier_value) { 'some-code-verifier' }
let(:grant_type_value) { SignIn::Constants::Auth::AUTH_CODE_GRANT }
let(:client_assertion) { { client_assertion: client_assertion_value } }
let(:client_assertion_type) { { client_assertion_type: client_assertion_type_value } }
let(:client_assertion_value) { 'some-client-assertion' }
let(:client_assertion_type_value) { nil }
let(:type) { nil }
let(:client_id) { client_config.client_id }
let(:authentication) { SignIn::Constants::Auth::API }
let!(:client_config) do
create(:client_config,
authentication:,
anti_csrf:,
pkce:,
enforced_terms:,
shared_sessions:)
end
let(:enforced_terms) { nil }
let(:pkce) { true }
let(:anti_csrf) { false }
let(:loa) { nil }
let(:shared_sessions) { false }
let(:statsd_token_success) { SignIn::Constants::Statsd::STATSD_SIS_TOKEN_SUCCESS }
let(:expected_error_status) { :bad_request }
before { allow(Rails.logger).to receive(:info) }
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts/revoke/setup.rb
|
# frozen_string_literal: true
RSpec.shared_context 'revoke_setup' do
subject { post(:revoke, params: {}.merge(refresh_token_param).merge(anti_csrf_token_param)) }
let!(:user) { create(:user) }
let(:user_uuid) { user.uuid }
let(:refresh_token_param) { { refresh_token: } }
let(:refresh_token) { 'example-refresh-token' }
let(:anti_csrf_token_param) { { anti_csrf_token: } }
let(:anti_csrf_token) { 'example-anti-csrf-token' }
let(:enable_anti_csrf) { false }
let(:user_verification) { user.user_verification }
let(:user_account) { user.user_account }
let(:validated_credential) do
create(:validated_credential, user_verification:, client_config:)
end
let(:authentication) { SignIn::Constants::Auth::API }
let!(:client_config) { create(:client_config, authentication:, anti_csrf:, enforced_terms:) }
let(:enforced_terms) { nil }
let(:anti_csrf) { false }
before { allow(Rails.logger).to receive(:info) }
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts/refresh/setup.rb
|
# frozen_string_literal: true
RSpec.shared_context 'refresh_setup' do
subject { post(:refresh, params: {}.merge(refresh_token_param).merge(anti_csrf_token_param)) }
let!(:user) { create(:user, uuid: user_uuid) }
let(:user_uuid) { user_verification.credential_identifier }
let(:refresh_token_param) { { refresh_token: } }
let(:anti_csrf_token_param) { { anti_csrf_token: } }
let(:refresh_token) { 'some-refresh-token' }
let(:anti_csrf_token) { 'some-anti-csrf-token' }
let(:user_verification) { create(:user_verification) }
let(:user_account) { user_verification.user_account }
let(:validated_credential) do
create(:validated_credential, user_verification:, client_config:)
end
let(:authentication) { SignIn::Constants::Auth::API }
let!(:client_config) { create(:client_config, authentication:, anti_csrf:, enforced_terms:) }
let(:enforced_terms) { nil }
let(:anti_csrf) { false }
let(:expected_error_status) { :unauthorized }
before { allow(Rails.logger).to receive(:info) }
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts/logingov_logout_proxy/setup.rb
|
# frozen_string_literal: true
RSpec.shared_context 'logingov_logout_proxy_setup' do
subject { get(:logingov_logout_proxy, params: logingov_logout_proxy_params) }
let(:logingov_logout_proxy_params) do
{}.merge(state)
end
let(:state) { { state: state_value } }
let(:state_value) { 'some-state-value' }
before { allow(Rails.logger).to receive(:info) }
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts/logout/setup.rb
|
# frozen_string_literal: true
RSpec.shared_context 'logout_setup' do
subject { get(:logout, params: logout_params) }
let(:logout_params) do
{}.merge(client_id)
end
let(:client_id) { { client_id: client_id_value } }
let(:client_id_value) { client_config.client_id }
let!(:client_config) { create(:client_config, logout_redirect_uri:) }
let(:logout_redirect_uri) { 'some-logout-redirect-uri' }
let(:access_token) { SignIn::AccessTokenJwtEncoder.new(access_token: access_token_object).perform }
let(:authorization) { "Bearer #{access_token}" }
let(:oauth_session) { create(:oauth_session, user_verification:) }
let(:user_verification) { create(:user_verification) }
let(:access_token_object) do
create(:access_token, session_handle: oauth_session.handle, client_id: client_config.client_id, expiration_time:)
end
let(:expiration_time) { Time.zone.now + SignIn::Constants::AccessToken::VALIDITY_LENGTH_SHORT_MINUTES }
before do
request.headers['Authorization'] = authorization
allow(Rails.logger).to receive(:info)
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts/authorize/client_state_handling.rb
|
# frozen_string_literal: true
RSpec.shared_context 'authorize_client_state_handling' do
let(:state) { 'some-state' }
let(:statsd_auth_success) { SignIn::Constants::Statsd::STATSD_SIS_AUTHORIZE_SUCCESS }
let(:expected_log) { '[SignInService] [V0::SignInController] authorize' }
let(:expected_logger_context) do
{
type: type[:type],
client_id: client_id_value,
acr: acr_value,
operation: operation_value
}
end
before { allow(JWT).to receive(:encode).and_return(state) }
context 'and client_state is not given' do
let(:client_state) { {} }
context 'and scope is device_sso' do
let(:scope) { { scope: SignIn::Constants::Auth::DEVICE_SSO } }
context 'and client config is not set up to enable device_sso' do
let(:shared_sessions) { false }
let(:expected_error) { 'Scope is not valid for Client' }
it_behaves_like 'authorize_error_response'
end
context 'and client config is set up to enable device_sso' do
let(:shared_sessions) { true }
let(:authentication) { SignIn::Constants::Auth::API }
it_behaves_like 'authorize_successful_response'
end
end
context 'and scope is not given' do
let(:scope) { {} }
it_behaves_like 'authorize_successful_response'
end
end
context 'and client_state is greater than minimum client state length' do
let(:client_state) do
{ state: SecureRandom.alphanumeric(SignIn::Constants::Auth::CLIENT_STATE_MINIMUM_LENGTH + 1) }
end
context 'and scope is device_sso' do
let(:scope) { { scope: SignIn::Constants::Auth::DEVICE_SSO } }
context 'and client config is not set up to enable device_sso' do
let(:shared_sessions) { false }
let(:expected_error) { 'Scope is not valid for Client' }
it_behaves_like 'authorize_error_response'
end
context 'and client config is set up to enable device_sso' do
let(:shared_sessions) { true }
let(:authentication) { SignIn::Constants::Auth::API }
it_behaves_like 'authorize_successful_response'
end
end
context 'and scope is not given' do
let(:scope) { {} }
it_behaves_like 'authorize_successful_response'
end
end
context 'and client_state is less than minimum client state length' do
let(:client_state) do
{ state: SecureRandom.alphanumeric(SignIn::Constants::Auth::CLIENT_STATE_MINIMUM_LENGTH - 1) }
end
let(:expected_error) { 'Attributes are not valid' }
it_behaves_like 'authorize_error_response'
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts/authorize/setup.rb
|
# frozen_string_literal: true
RSpec.shared_context 'authorize_setup' do
subject { get(:authorize, params: authorize_params) }
let!(:client_config) do
create(:client_config, authentication:, pkce:, credential_service_providers:, service_levels:, shared_sessions:)
end
let(:client_id_value) { client_config.client_id }
let(:authentication) { SignIn::Constants::Auth::COOKIE }
let(:pkce) { true }
let(:shared_sessions) { false }
let(:credential_service_providers) { %w[idme logingov dslogon mhv] }
let(:service_levels) { %w[loa1 loa3 ial1 ial2 min] }
let(:type) { { type: type_value } }
let(:type_value) { 'some-type' }
let(:acr) { { acr: acr_value } }
let(:acr_value) { 'some-acr' }
let(:code_challenge) { { code_challenge: 'some-code-challenge' } }
let(:code_challenge_method) { { code_challenge_method: 'some-code-challenge-method' } }
let(:client_id) { { client_id: client_id_value } }
let(:scope) { { scope: 'some-scope' } }
let(:operation) { { operation: operation_value } }
let(:operation_value) { SignIn::Constants::Auth::AUTHORIZE }
let(:client_state) { {} }
let(:client_state_minimum_length) { SignIn::Constants::Auth::CLIENT_STATE_MINIMUM_LENGTH }
let(:authorize_params) do
{}.merge(type)
.merge(code_challenge)
.merge(code_challenge_method)
.merge(client_state)
.merge(client_id)
.merge(acr)
.merge(operation)
.merge(scope)
end
let(:statsd_tags) do
["type:#{type_value}", "client_id:#{client_id_value}", "acr:#{acr_value}", "operation:#{operation_value}"]
end
before { allow(Rails.logger).to receive(:info) }
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts/revoke_all_sessions/setup.rb
|
# frozen_string_literal: true
RSpec.shared_context 'revoke_all_sessions_setup' do
subject { get(:revoke_all_sessions) }
let(:access_token) { SignIn::AccessTokenJwtEncoder.new(access_token: access_token_object).perform }
let(:authorization) { "Bearer #{access_token}" }
let(:user) { create(:user, :loa3) }
let(:user_verification) { user.user_verification }
let(:user_account) { user.user_account }
let(:user_uuid) { user.uuid }
let(:oauth_session) { create(:oauth_session, user_account:) }
let(:access_token_object) do
create(:access_token, session_handle: oauth_session.handle, user_uuid:)
end
let(:oauth_session_count) { SignIn::OAuthSession.where(user_account:).count }
let(:statsd_success) { SignIn::Constants::Statsd::STATSD_SIS_REVOKE_ALL_SESSIONS_SUCCESS }
let(:expected_log) { '[SignInService] [V0::SignInController] revoke all sessions' }
let(:expected_log_params) do
{
uuid: access_token_object.uuid,
user_uuid: access_token_object.user_uuid,
session_handle: access_token_object.session_handle,
client_id: access_token_object.client_id,
audience: access_token_object.audience,
version: access_token_object.version,
last_regeneration_time: access_token_object.last_regeneration_time.to_i,
created_time: access_token_object.created_time.to_i,
expiration_time: access_token_object.expiration_time.to_i
}
end
let(:expected_status) { :ok }
before do
request.headers['Authorization'] = authorization
allow(Rails.logger).to receive(:info)
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts/callback/state_jwt_setup.rb
|
# frozen_string_literal: true
RSpec.shared_context 'callback_state_jwt_setup' do
let(:code_challenge) { Base64.urlsafe_encode64('some-code-challenge') }
let(:code_challenge_method) { SignIn::Constants::Auth::CODE_CHALLENGE_METHOD }
let(:client_state) { SecureRandom.alphanumeric(SignIn::Constants::Auth::CLIENT_STATE_MINIMUM_LENGTH) }
let(:acr) { SignIn::Constants::Auth::ACR_VALUES.first }
let(:type) { SignIn::Constants::Auth::CSP_TYPES.first }
let(:state_value) do
SignIn::StatePayloadJwtEncoder.new(code_challenge:,
code_challenge_method:,
acr:,
client_config:,
type:,
client_state:).perform
end
let(:uplevel_state_value) do
SignIn::StatePayloadJwtEncoder.new(code_challenge:,
code_challenge_method:,
acr:,
client_config:,
type:,
client_state:).perform
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts
|
code_files/vets-api-private/spec/support/sign_in/shared_contexts/callback/setup.rb
|
# frozen_string_literal: true
RSpec.shared_context 'callback_setup' do
subject { get(:callback, params: {}.merge(code).merge(state).merge(error_params)) }
let(:code) { { code: code_value } }
let(:state) { { state: state_value } }
let(:error_params) { {} }
let(:state_value) { 'some-state' }
let(:code_value) { 'some-code' }
let(:statsd_tags) { ["type:#{type}", "client_id:#{client_id}", "ial:#{ial}", "acr:#{acr}"] }
let(:type) {}
let(:acr) { nil }
let(:ial) { nil }
let(:mpi_update_profile_response) { create(:add_person_response) }
let(:mpi_add_person_response) { create(:add_person_response, parsed_codes: { icn: add_person_icn }) }
let(:add_person_icn) { nil }
let(:find_profile) { create(:find_profile_response, profile: mpi_profile) }
let(:mpi_profile) { nil }
let(:client_id) { client_config.client_id }
let(:authentication) { SignIn::Constants::Auth::API }
let!(:client_config) do
create(:client_config,
authentication:,
enforced_terms:,
terms_of_use_url:,
credential_service_providers: %w[idme logingov dslogon mhv],
service_levels: %w[loa1 loa3 ial1 ial2 min])
end
let(:enforced_terms) { nil }
let(:terms_of_use_url) { 'some-terms-of-use-url' }
before do
allow(Rails.logger).to receive(:info)
allow_any_instance_of(MPI::Service).to receive(:update_profile).and_return(mpi_update_profile_response)
allow_any_instance_of(MPIData).to receive(:response_from_redis_or_service).and_return(find_profile)
allow_any_instance_of(MPI::Service).to receive(:find_profile_by_identifier).and_return(find_profile)
allow_any_instance_of(MPI::Service).to receive(:add_person_implicit_search).and_return(mpi_add_person_response)
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/token/error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'token_error_response' do
let(:expected_error_json) { { 'errors' => expected_error } }
let(:statsd_token_failure) { SignIn::Constants::Statsd::STATSD_SIS_TOKEN_FAILURE }
let(:expected_error_log) { '[SignInService] [V0::SignInController] token error' }
let(:expected_error_context) { { errors: expected_error.to_s, grant_type: grant_type_value } }
it 'renders expected error' do
expect(JSON.parse(subject.body)).to eq(expected_error_json)
end
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'logs the failed token request' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_context)
subject
end
it 'updates StatsD with a token request failure' do
expect { subject }.to trigger_statsd_increment(statsd_token_failure)
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/revoke/error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'revoke_error_response' do
let(:expected_error_json) { { 'errors' => expected_error } }
let(:statsd_revoke_failure) { SignIn::Constants::Statsd::STATSD_SIS_REVOKE_FAILURE }
let(:expected_error_log) { '[SignInService] [V0::SignInController] revoke error' }
let(:expected_error_context) { { errors: expected_error.to_s } }
it 'renders expected error' do
expect(JSON.parse(subject.body)).to eq(expected_error_json)
end
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'logs the failed revocation attempt' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_context)
subject
end
it 'updates StatsD with a revoke request failure' do
expect { subject }.to trigger_statsd_increment(statsd_revoke_failure)
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/refresh/error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'refresh_error_response' do
let(:expected_error_json) { { 'errors' => expected_error } }
let(:statsd_refresh_error) { SignIn::Constants::Statsd::STATSD_SIS_REFRESH_FAILURE }
let(:expected_error_log) { '[SignInService] [V0::SignInController] refresh error' }
let(:expected_error_context) { { errors: expected_error.to_s } }
it 'renders expected error' do
expect(JSON.parse(subject.body)).to eq(expected_error_json)
end
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'logs the failed refresh attempt' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_context)
subject
end
it 'updates StatsD with a refresh request failure' do
expect { subject }.to trigger_statsd_increment(statsd_refresh_error)
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/logingov_logout_proxy/error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'logingov_logout_proxy_error_response' do
let(:expected_error_json) { { 'errors' => expected_error } }
let(:expected_error_status) { :bad_request }
let(:expected_error_log) { '[SignInService] [V0::SignInController] logingov_logout_proxy error' }
let(:expected_error_message) do
{ errors: expected_error }
end
it 'renders expected error' do
expect(JSON.parse(subject.body)).to eq(expected_error_json)
end
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'logs the failed logingov_logout_proxy attempt' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_message)
subject
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/logout/error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'logout_error_response' do
let(:statsd_failure) { SignIn::Constants::Statsd::STATSD_SIS_LOGOUT_FAILURE }
let(:expected_error_log) { '[SignInService] [V0::SignInController] logout error' }
let(:expected_error_context) { { errors: expected_error_message, client_id: client_id_value } }
let(:expected_error_status) { :bad_request }
let(:expected_error_json) { { 'errors' => expected_error_message } }
it 'renders expected error' do
expect(JSON.parse(subject.body)).to eq(expected_error_json)
end
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'triggers statsd increment for failed call' do
expect { subject }.to trigger_statsd_increment(statsd_failure)
end
it 'logs the error message' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_context)
subject
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/logout/authorization_error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'logout_authorization_error_response' do
let(:statsd_failure) { SignIn::Constants::Statsd::STATSD_SIS_LOGOUT_FAILURE }
let(:expected_error_log) { '[SignInService] [V0::SignInController] logout error' }
let(:expected_error_context) { { errors: expected_error_message, client_id: client_id_value } }
it 'triggers statsd increment for failed call' do
expect { subject }.to trigger_statsd_increment(statsd_failure)
end
it 'logs the error message' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_context)
subject
end
context 'when client configuration has not configured a logout redirect uri' do
let(:logout_redirect_uri) { nil }
let(:expected_error_status) { :ok }
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
end
context 'when client configuration has configured a logout redirect uri' do
let(:logout_redirect_uri) { 'some-logout-redirect-uri' }
let(:expected_error_status) { :redirect }
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'redirects to logout redirect url' do
expect(subject).to redirect_to(logout_redirect_uri)
end
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/authorize/error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'authorize_error_response' do
let(:expected_error_json) { { 'errors' => expected_error } }
let(:expected_error_status) { :bad_request }
let(:statsd_auth_failure) { SignIn::Constants::Statsd::STATSD_SIS_AUTHORIZE_FAILURE }
let(:expected_error_log) { '[SignInService] [V0::SignInController] authorize error' }
let(:expected_error_message) do
{ errors: expected_error, client_id: client_id_value, type: type_value, acr: acr_value,
operation: operation_value || SignIn::Constants::Auth::AUTHORIZE }
end
context 'and client_id maps to a web based configuration' do
let(:authentication) { SignIn::Constants::Auth::COOKIE }
let(:expected_error_status) { :ok }
let(:error_code) { SignIn::Constants::ErrorCode::INVALID_REQUEST }
let(:auth_param) { 'fail' }
let(:request_id) { SecureRandom.uuid }
let(:meta_refresh_tag) { '<meta http-equiv="refresh" content="0;' }
before do
allow_any_instance_of(ActionController::TestRequest).to receive(:request_id).and_return(request_id)
end
it 'renders the oauth_get_form template with meta refresh tag' do
expect(subject.body).to include(meta_refresh_tag)
end
it 'directs to the given redirect url set in the client configuration' do
expect(subject.body).to include(client_config.redirect_uri)
end
it 'includes expected auth param' do
expect(subject.body).to include(auth_param)
end
it 'includes expected code param' do
expect(subject.body).to include(error_code)
end
it 'includes expected request_id param' do
expect(subject.body).to include(request_id)
end
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'logs the failed authorize attempt' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_message)
subject
end
it 'updates StatsD with a auth request failure' do
expect { subject }.to trigger_statsd_increment(statsd_auth_failure)
end
end
context 'and client_id maps to an api based configuration' do
let(:authentication) { SignIn::Constants::Auth::API }
it_behaves_like 'authorize_api_error_response'
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/authorize/successful_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'authorize_successful_response' do
it 'returns ok status' do
expect(subject).to have_http_status(:ok)
end
it 'renders expected state' do
expect(subject.body).to match(state)
end
it 'renders expected redirect_uri in template' do
expect(subject.body).to match(expected_redirect_uri_param)
end
it 'renders expected op value in template' do
expect(subject.body).to match(expected_op_value)
end
it 'logs the authentication attempt' do
expect(Rails.logger).to receive(:info).with(expected_log, expected_logger_context)
subject
end
it 'updates StatsD with a auth request success' do
expect { subject }.to trigger_statsd_increment(statsd_auth_success, tags: statsd_tags)
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/authorize/api_error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'authorize_api_error_response' do
let(:expected_error_json) { { 'errors' => expected_error } }
let(:expected_error_status) { :bad_request }
let(:statsd_auth_failure) { SignIn::Constants::Statsd::STATSD_SIS_AUTHORIZE_FAILURE }
let(:expected_error_log) { '[SignInService] [V0::SignInController] authorize error' }
let(:expected_error_message) do
{ errors: expected_error, client_id: client_id_value, type: type_value, acr: acr_value,
operation: operation_value || SignIn::Constants::Auth::AUTHORIZE }
end
it 'renders expected error' do
expect(JSON.parse(subject.body)).to eq(expected_error_json)
end
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'logs the failed authorize attempt' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_message)
subject
end
it 'updates StatsD with a auth request failure' do
expect { subject }.to trigger_statsd_increment(statsd_auth_failure)
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/revoke_all_sessions/error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'revoke_all_sessions_error_response' do
let(:statsd_failure) { SignIn::Constants::Statsd::STATSD_SIS_REVOKE_ALL_SESSIONS_FAILURE }
let(:expected_error_json) { { 'errors' => expected_error_message } }
let(:expected_error_status) { :unauthorized }
let(:expected_error_log) { '[SignInService] [V0::SignInController] revoke all sessions error' }
let(:expected_error_context) { { errors: expected_error_message } }
it 'renders expected error' do
expect(JSON.parse(subject.body)).to eq(expected_error_json)
end
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'logs the failed revoke all sessions call' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_context)
subject
end
it 'triggers statsd increment for failed call' do
expect { subject }.to trigger_statsd_increment(statsd_failure)
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/callback/error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'callback_error_response' do
let(:expected_error_json) { { 'errors' => expected_error } }
let(:expected_error_status) { :bad_request }
let(:statsd_callback_failure) { SignIn::Constants::Statsd::STATSD_SIS_CALLBACK_FAILURE }
let(:expected_statsd_tags) do
["type:#{type || ''}", "client_id:#{client_id || ''}", "acr:#{acr || ''}"]
end
context 'and client_id maps to a web based configuration' do
let(:authentication) { SignIn::Constants::Auth::COOKIE }
let(:expected_error_status) { :ok }
let(:auth_param) { 'fail' }
let(:expected_error_log) { '[SignInService] [V0::SignInController] callback error' }
let(:expected_error_message) { { errors: expected_error, client_id:, type:, acr: } }
let(:request_id) { SecureRandom.uuid }
let(:meta_refresh_tag) { '<meta http-equiv="refresh" content="0;' }
before do
allow_any_instance_of(ActionController::TestRequest).to receive(:request_id).and_return(request_id)
end
it 'renders the oauth_get_form template with meta refresh tag' do
expect(subject.body).to include(meta_refresh_tag)
end
it 'directs to the given redirect url set in the client configuration' do
expect(subject.body).to include(client_config.redirect_uri)
end
it 'includes expected auth param' do
expect(subject.body).to include(auth_param)
end
it 'includes expected code param' do
expect(subject.body).to include(error_code)
end
it 'includes expected request_id param' do
expect(subject.body).to include(request_id)
end
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'logs the failed callback' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_message)
subject
end
it 'updates StatsD with a callback request failure' do
expect { subject }.to trigger_statsd_increment(statsd_callback_failure, tags: expected_statsd_tags)
end
end
context 'and client_id maps to an api based configuration' do
let(:authentication) { SignIn::Constants::Auth::API }
it_behaves_like 'callback_api_error_response'
end
end
|
0
|
code_files/vets-api-private/spec/support/sign_in/shared_examples
|
code_files/vets-api-private/spec/support/sign_in/shared_examples/callback/api_error_response.rb
|
# frozen_string_literal: true
RSpec.shared_examples 'callback_api_error_response' do
let(:expected_error_json) { { 'errors' => expected_error } }
let(:expected_error_status) { :bad_request }
let(:statsd_callback_failure) { SignIn::Constants::Statsd::STATSD_SIS_CALLBACK_FAILURE }
let(:expected_error_log) { '[SignInService] [V0::SignInController] callback error' }
let(:expected_error_message) do
{ errors: expected_error, client_id:, type:, acr: }
end
let(:expected_statsd_tags) do
["type:#{type || ''}", "client_id:#{client_id || ''}", "acr:#{acr || ''}"]
end
it 'renders expected error' do
expect(JSON.parse(subject.body)).to eq(expected_error_json)
end
it 'returns expected status' do
expect(subject).to have_http_status(expected_error_status)
end
it 'logs the failed callback' do
expect(Rails.logger).to receive(:info).with(expected_error_log, expected_error_message)
subject
end
it 'updates StatsD with a callback request failure' do
expect { subject }.to trigger_statsd_increment(statsd_callback_failure, tags: expected_statsd_tags)
end
end
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/decision_reviews/with_4142_2024.json
|
{
"form526": {
"form526": {
"veteran": {
"currentMailingAddress": {
"country": "USA",
"addressLine1": "1234 Couch Street",
"addressLine2": "Apt. 22",
"type": "DOMESTIC",
"city": "Portland",
"state": "OR",
"zipFirstFive": "12345",
"zipLastFour": "6789"
},
"changeOfAddress": {
"country": "USA",
"addressLine1": "5678 Couch Street",
"addressLine2": "Apt. 2",
"beginningDate": "2018-02-01",
"type": "DOMESTIC",
"city": "Portland",
"state": "OR",
"zipFirstFive": "23451",
"zipLastFour": "6789",
"addressChangeType": "PERMANENT"
},
"homelessness": {
"pointOfContact": {
"pointOfContactName": "Jane Doe",
"primaryPhone": {
"areaCode": "123",
"phoneNumber": "1231231"
}
},
"currentlyHomeless": {
"homelessSituationType": "FLEEING_CURRENT_RESIDENCE",
"otherLivingSituation": "other living situation"
}
},
"currentlyVAEmployee": false
},
"claimantCertification": true,
"standardClaim": false,
"autoCestPDFGenerationDisabled": false,
"applicationExpirationDate": "2015-08-28T19:53:45+00:00",
"directDeposit": {
"accountType": "CHECKING",
"accountNumber": "123123123123",
"routingNumber": "123123123",
"bankName": "SomeBank"
},
"servicePay": {
"waiveVABenefitsToRetainTrainingPay": true,
"waiveVABenefitsToRetainRetiredPay": false,
"militaryRetiredPay": {
"receiving": true,
"payment": {
"serviceBranch": "Air Force"
}
},
"separationPay": {
"received": true,
"payment": {
"serviceBranch": "Air Force"
},
"receivedDate": {
"year": "2000"
}
}
},
"serviceInformation": {
"servicePeriods": [
{
"serviceBranch": "Air Force",
"activeDutyBeginDate": "1980-02-05",
"activeDutyEndDate": "1990-01-02"
},
{
"serviceBranch": "Air Force Reserves",
"activeDutyBeginDate": "1990-04-05",
"activeDutyEndDate": "1999-01-01"
}
],
"confinements": [
{
"confinementBeginDate": "1987-02-01",
"confinementEndDate": "1989-01-01"
},
{
"confinementBeginDate": "1990-03-06",
"confinementEndDate": "1999-01-01"
}
],
"reservesNationalGuardService": {
"title10Activation": {
"anticipatedSeparationDate": "2020-01-01",
"title10ActivationDate": "1999-03-04"
},
"obligationTermOfServiceFromDate": "2000-01-04",
"obligationTermOfServiceToDate": "2004-01-04",
"unitName": "Seal Team Six",
"unitPhone": {
"areaCode": "123",
"phoneNumber": "1231231"
},
"receivingInactiveDutyTrainingPay": true
},
"alternateNames": [
{
"firstName": "JKack",
"middleName": "Clint",
"lastName": "Bauer"
}
]
},
"treatments": [
{
"startDate": "2018-03-02",
"endDate": "2018-03-03",
"treatedDisabilityNames": [
"PTSD (post traumatic stress disorder)"
],
"center": {
"name": "Private Facility 2",
"country": "USA"
}
},
{
"startDate": "2015-04-03",
"endDate": "2018-03-04",
"treatedDisabilityNames": [
"PTSD personal trauma"
],
"center": {
"name": "Huntsville VA Facility",
"country": "USA"
}
}
],
"disabilities": [
{
"diagnosticCode": 9999,
"disabilityActionType": "NEW",
"name": "PTSD (post traumatic stress disorder)",
"ratedDisabilityId": "1100583",
"secondaryDisabilities": [
{
"name": "PTSD personal trauma",
"disabilityActionType": "SECONDARY",
"serviceRelevance": "Caused by a service-connected disability\nLengthy description"
}
]
}
]
}
},
"form526_uploads": null,
"form4142": {
"privacyAgreementAccepted": true,
"limitedConsent": "Test data for limiting consent",
"providerFacility": [
{
"providerFacilityName": "provider 1",
"conditionsTreated": "PTSD (post traumatic stress disorder)",
"treatmentDateRange": [
{
"from": "1980-01-01",
"to": "1985-01-01"
}
],
"providerFacilityAddress": {
"street": "123 Main Street",
"street2": "1B",
"city": "Baltimore",
"state": "MD",
"country": "USA",
"postalCode": "21200-1111"
}
},
{
"providerFacilityName": "provider 2",
"conditionsTreated": "Coding Trauma",
"treatmentDateRange": [
{
"from": "1980-02-01",
"to": "1985-02-01"
}
],
"providerFacilityAddress": {
"street": "456 Main Street",
"street2": "1B",
"city": "Baltimore",
"state": "MD",
"country": "USA",
"postalCode": "21200-1111"
}
},
{
"providerFacilityName": "provider 3",
"conditionsTreated": "Nasal Trauma",
"treatmentDateRange": [
{
"from": "1980-03-01",
"to": "1985-03-01"
}
],
"providerFacilityAddress": {
"street": "789 Main Street",
"street2": "1B",
"city": "Baltimore",
"state": "MD",
"country": "USA",
"postalCode": "21200-1111"
}
},
{
"providerFacilityName": "provider 4",
"conditionsTreated": "Hearing Loss",
"treatmentDateRange": [
{
"from": "1980-04-01",
"to": "1985-04-01"
}
],
"providerFacilityAddress": {
"street": "101 Main Street",
"street2": "1B",
"city": "Baltimore",
"state": "MD",
"country": "USA",
"postalCode": "21200-1111"
}
},
{
"providerFacilityName": "provider 5",
"conditionsTreated": "Verdigo",
"treatmentDateRange": [
{
"from": "1980-05-01",
"to": "1985-05-01"
}
],
"providerFacilityAddress": {
"street": "102 Main Street",
"street2": "1B",
"city": "Baltimore",
"state": "MD",
"country": "USA",
"postalCode": "21200-1111"
}
}
],
"vaFileNumber": "796068949",
"veteranSocialSecurityNumber": "796068949",
"veteranFullName": {
"first": "Beyonce",
"middle": "L",
"last": "Knowles"
},
"veteranDateOfBirth": "1809-02-12",
"veteranAddress": {
"city": "Portland",
"country": "USA",
"postalCode": "12345-6789",
"street": "1234 Couch Street",
"street2": "Apt. 22",
"state": "OR"
},
"email": "test@email.com",
"veteranPhone": "2024561111",
"veteranServiceNumber": "23784678"
},
"form0781": null,
"form8940": null
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/pagerduty/maintenance_windows_page_1.json
|
{
"maintenance_windows": [
{
"id": "PN5EX4A",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4A",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4A",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4B",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4C",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4D",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4E",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4F",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4G",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4H",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4I",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4J",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4K",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4L",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4M",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4N",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4O",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4P",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4Q",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4S",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4T",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4U",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4V",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4W",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4X",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4Y",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4Z",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
}
],
"limit": 25,
"offset": 0,
"total": null,
"more": true
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/pagerduty/maintenance_windows_simple.json
|
{
"maintenance_windows": [
{
"id": "PN5EX4S",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4S",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4S",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": null,
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
},
{
"id": "PN5EX4R",
"type": "maintenance_window",
"summary": "Multi-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4R",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4R",
"sequence_number": 118,
"start_time": "2017-12-26T18:59:00-05:00",
"end_time": "2017-12-27T19:59:00-05:00",
"description": "Multi-service Window",
"services": [
{
"id": "ABCDEF",
"type": "service_reference",
"summary": "Staging: External: EVSS",
"self": "https://api.pagerduty.com/services/ABCDEF",
"html_url": "https://ecc.pagerduty.com/services/ABCDEF"
},
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
}
],
"limit": 25,
"offset": 0,
"total": null,
"more": false
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/pagerduty/maintenance_windows_page_2.json
|
{
"maintenance_windows": [
{
"id": "PN5EX41",
"type": "maintenance_window",
"summary": "Single-service Window",
"self": "https://api.pagerduty.com/maintenance_windows/PN5EX4A",
"html_url": "https://ecc.pagerduty.com/maintenance_windows#/show/PN5EX4A",
"sequence_number": 117,
"start_time": "2017-12-25T18:59:00-05:00",
"end_time": "2017-12-26T19:59:00-05:00",
"description": "Single-service Window",
"services": [
{
"id": "BCDEFG",
"type": "service_reference",
"summary": "Staging: External: MHV",
"self": "https://api.pagerduty.com/services/BCDEFG",
"html_url": "https://ecc.pagerduty.com/services/BCDEFG"
}
],
"created_by": {
"id": "ZYX123",
"type": "user_reference",
"summary": "Jane Doe",
"self": "https://api.pagerduty.com/users/ZYX123",
"html_url": "https://ecc.pagerduty.com/users/ZYX123"
},
"teams": []
}
],
"limit": 25,
"offset": 25,
"total": null,
"more": false
}
|
0
|
code_files/vets-api-private/spec/support/pagerduty
|
code_files/vets-api-private/spec/support/pagerduty/services/spec_setup.rb
|
# frozen_string_literal: true
require 'pagerduty/external_services/service'
RSpec.shared_context 'simulating Redis caching of PagerDuty#get_services' do
let(:get_services_response) do
VCR.use_cassette('pagerduty/external_services/get_services', VCR::MATCH_EVERYTHING) do
PagerDuty::ExternalServices::Service.new.get_services
end
end
before do
allow_any_instance_of(
PagerDuty::ExternalServices::Service
).to receive(:get_services).and_return(get_services_response)
allow_any_instance_of(ExternalServicesRedis::Status).to receive(:cache).and_return(true)
end
end
|
0
|
code_files/vets-api-private/spec/support/pagerduty
|
code_files/vets-api-private/spec/support/pagerduty/services/invalid.rb
|
# frozen_string_literal: true
# rubocop:disable Metrics/MethodLength
#
# Sample response from https://api-reference.pagerduty.com/#!/Services/get_services
# with a `name: nil`
#
def nil_name
[
{
'id' => 'P9S4RFU',
'name' => nil,
'description' => 'https://github.com/department-of-veterans-affairs/devops/blob/master/docs/External%20Service%20Integrations/Appeals.md',
'auto_resolve_timeout' => 14_400,
'acknowledgement_timeout' => nil,
'created_at' => '2019-01-10T17:18:09-05:00',
'status' => 'active',
'last_incident_timestamp' => '2019-03-01T02:55:55-05:00',
'teams' => [],
'incident_urgency_rule' => {
'type' => 'use_support_hours',
'during_support_hours' => {
'type' => 'constant',
'urgency' => 'high'
},
'outside_support_hours' => {
'type' => 'constant',
'urgency' => 'low'
}
},
'scheduled_actions' => [],
'support_hours' => {
'type' => 'fixed_time_per_day',
'time_zone' => 'America/New_York',
'days_of_week' => [
1,
2,
3,
4,
5
],
'start_time' => '09:00:00',
'end_time' => '17:00:00'
},
'escalation_policy' => {
'id' => 'P6CEGGU',
'type' => 'escalation_policy_reference',
'summary' => 'Kraken Critical',
'self' => 'https://api.pagerduty.com/escalation_policies/P6CEGGU',
'html_url' => 'https://ecc.pagerduty.com/escalation_policies/P6CEGGU'
},
'addons' => [],
'alert_creation' => 'create_alerts_and_incidents',
'alert_grouping' => nil,
'alert_grouping_timeout' => nil,
'integrations' => [
{
'id' => 'P3SDLYP',
'type' => 'generic_events_api_inbound_integration_reference',
'summary' => 'Prometheus: Appeals',
'self' => 'https://api.pagerduty.com/services/P9S4RFU/integrations/P3SDLYP',
'html_url' => 'https://ecc.pagerduty.com/services/P9S4RFU/integrations/P3SDLYP'
}
],
'response_play' => nil,
'type' => 'service',
'summary' => 'External: Appeals',
'self' => 'https://api.pagerduty.com/services/P9S4RFU',
'html_url' => 'https://ecc.pagerduty.com/services/P9S4RFU'
}
]
end
# Sample response from https://api-reference.pagerduty.com/#!/Services/get_services
# with an invalid `status`
#
def invalid_status
[
{
'id' => 'P9S4RFU',
'name' => 'External: Appeals',
'description' => 'https://github.com/department-of-veterans-affairs/devops/blob/master/docs/External%20Service%20Integrations/Appeals.md',
'auto_resolve_timeout' => 14_400,
'acknowledgement_timeout' => nil,
'created_at' => '2019-01-10T17:18:09-05:00',
'status' => 'fine',
'last_incident_timestamp' => '2019-03-01T02:55:55-05:00',
'teams' => [],
'incident_urgency_rule' => {
'type' => 'use_support_hours',
'during_support_hours' => {
'type' => 'constant',
'urgency' => 'high'
},
'outside_support_hours' => {
'type' => 'constant',
'urgency' => 'low'
}
},
'scheduled_actions' => [],
'support_hours' => {
'type' => 'fixed_time_per_day',
'time_zone' => 'America/New_York',
'days_of_week' => [
1,
2,
3,
4,
5
],
'start_time' => '09:00:00',
'end_time' => '17:00:00'
},
'escalation_policy' => {
'id' => 'P6CEGGU',
'type' => 'escalation_policy_reference',
'summary' => 'Kraken Critical',
'self' => 'https://api.pagerduty.com/escalation_policies/P6CEGGU',
'html_url' => 'https://ecc.pagerduty.com/escalation_policies/P6CEGGU'
},
'addons' => [],
'alert_creation' => 'create_alerts_and_incidents',
'alert_grouping' => nil,
'alert_grouping_timeout' => nil,
'integrations' => [
{
'id' => 'P3SDLYP',
'type' => 'generic_events_api_inbound_integration_reference',
'summary' => 'Prometheus: Appeals',
'self' => 'https://api.pagerduty.com/services/P9S4RFU/integrations/P3SDLYP',
'html_url' => 'https://ecc.pagerduty.com/services/P9S4RFU/integrations/P3SDLYP'
}
],
'response_play' => nil,
'type' => 'service',
'summary' => 'External: Appeals',
'self' => 'https://api.pagerduty.com/services/P9S4RFU',
'html_url' => 'https://ecc.pagerduty.com/services/P9S4RFU'
}
]
end
# rubocop:enable Metrics/MethodLength
|
0
|
code_files/vets-api-private/spec/support/pagerduty
|
code_files/vets-api-private/spec/support/pagerduty/services/valid.rb
|
# frozen_string_literal: true
# rubocop:disable Metrics/MethodLength
#
# Sample response from https://api-reference.pagerduty.com/#!/Services/get_services
#
def valid_service
[
{
'id' => 'P9S4RFU',
'name' => 'External: Appeals',
'description' => 'https://github.com/department-of-veterans-affairs/devops/blob/master/docs/External%20Service%20Integrations/Appeals.md',
'auto_resolve_timeout' => 14_400,
'acknowledgement_timeout' => nil,
'created_at' => '2019-01-10T17:18:09-05:00',
'status' => 'active',
'last_incident_timestamp' => '2019-03-01T02:55:55-05:00',
'teams' => [],
'incident_urgency_rule' => {
'type' => 'use_support_hours',
'during_support_hours' => {
'type' => 'constant',
'urgency' => 'high'
},
'outside_support_hours' => {
'type' => 'constant',
'urgency' => 'low'
}
},
'scheduled_actions' => [],
'support_hours' => {
'type' => 'fixed_time_per_day',
'time_zone' => 'America/New_York',
'days_of_week' => [
1,
2,
3,
4,
5
],
'start_time' => '09:00:00',
'end_time' => '17:00:00'
},
'escalation_policy' => {
'id' => 'P6CEGGU',
'type' => 'escalation_policy_reference',
'summary' => 'Kraken Critical',
'self' => 'https://api.pagerduty.com/escalation_policies/P6CEGGU',
'html_url' => 'https://ecc.pagerduty.com/escalation_policies/P6CEGGU'
},
'addons' => [],
'alert_creation' => 'create_alerts_and_incidents',
'alert_grouping' => nil,
'alert_grouping_timeout' => nil,
'integrations' => [
{
'id' => 'P3SDLYP',
'type' => 'generic_events_api_inbound_integration_reference',
'summary' => 'Prometheus: Appeals',
'self' => 'https://api.pagerduty.com/services/P9S4RFU/integrations/P3SDLYP',
'html_url' => 'https://ecc.pagerduty.com/services/P9S4RFU/integrations/P3SDLYP'
}
],
'response_play' => nil,
'type' => 'service',
'summary' => 'External: Appeals',
'self' => 'https://api.pagerduty.com/services/P9S4RFU',
'html_url' => 'https://ecc.pagerduty.com/services/P9S4RFU'
}
]
end
# Sample response from https://api-reference.pagerduty.com/#!/Services/get_services
# with `name: Staging: ...`
#
def valid_staging_service
[
{
'id' => 'P9S4RFU',
'name' => 'Staging: External: Appeals',
'description' => 'https://github.com/department-of-veterans-affairs/devops/blob/master/docs/External%20Service%20Integrations/Appeals.md',
'auto_resolve_timeout' => 14_400,
'acknowledgement_timeout' => nil,
'created_at' => '2019-01-10T17:18:09-05:00',
'status' => 'active',
'last_incident_timestamp' => '2019-03-01T02:55:55-05:00',
'teams' => [],
'incident_urgency_rule' => {
'type' => 'use_support_hours',
'during_support_hours' => {
'type' => 'constant',
'urgency' => 'high'
},
'outside_support_hours' => {
'type' => 'constant',
'urgency' => 'low'
}
},
'scheduled_actions' => [],
'support_hours' => {
'type' => 'fixed_time_per_day',
'time_zone' => 'America/New_York',
'days_of_week' => [
1,
2,
3,
4,
5
],
'start_time' => '09:00:00',
'end_time' => '17:00:00'
},
'escalation_policy' => {
'id' => 'P6CEGGU',
'type' => 'escalation_policy_reference',
'summary' => 'Kraken Critical',
'self' => 'https://api.pagerduty.com/escalation_policies/P6CEGGU',
'html_url' => 'https://ecc.pagerduty.com/escalation_policies/P6CEGGU'
},
'addons' => [],
'alert_creation' => 'create_alerts_and_incidents',
'alert_grouping' => nil,
'alert_grouping_timeout' => nil,
'integrations' => [
{
'id' => 'P3SDLYP',
'type' => 'generic_events_api_inbound_integration_reference',
'summary' => 'Prometheus: Appeals',
'self' => 'https://api.pagerduty.com/services/P9S4RFU/integrations/P3SDLYP',
'html_url' => 'https://ecc.pagerduty.com/services/P9S4RFU/integrations/P3SDLYP'
}
],
'response_play' => nil,
'type' => 'service',
'summary' => 'External: Appeals',
'self' => 'https://api.pagerduty.com/services/P9S4RFU',
'html_url' => 'https://ecc.pagerduty.com/services/P9S4RFU'
}
]
end
# rubocop:enable Metrics/MethodLength
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/rakelib/users_serialized.json
|
[
{
"uuid": "7700bbf301eb4e6e95ccea7693eced6f",
"users_b": {
":uuid": "7700bbf301eb4e6e95ccea7693eced6f",
":last_signed_in": {
"^t": "2021-04-05T22:18:26.625Z"
},
":mhv_last_signed_in": null
},
"user_identities": {
":uuid": "7700bbf301eb4e6e95ccea7693eced6f",
":email": "user+1@foo.com",
":first_name": "Abraham",
":middle_name": null,
":last_name": "Lincoln",
":preferred_name": "abe",
":gender": "M",
":birth_date": "1809-02-12",
":zip": null,
":ssn": "777000000",
":loa": {
":current": 3,
":highest": 3
},
":multifactor": true,
":authn_context": null,
":mhv_icn": null,
":mhv_correlation_id": null,
":sign_in": {
":service_name": "idme"
}
},
"mpi-profile-response": {
":uuid": "7700bbf301eb4e6e95ccea7693eced6f",
":response": {
"^o": "MPI::Responses::FindProfileResponse",
"status": "OK",
"profile": {
"^o": "MPI::Models::MviProfile",
"given_names": [
"Abraham"
],
"preferred_names": [
"abe"
],
"family_name": "Lincoln",
"suffix": "Jr",
"gender": "M",
"birth_date": "18090212",
"ssn": "777000000",
"address": {
"^o": "MPI::Models::MviProfileAddress",
"city": "Washington",
"state": "DC",
"postal_code": "20011",
"country": "USA",
"street": "140 Rock Creek Church Rd"
},
"home_phone": "(202)829-0436",
"icn": "1012592956V095840",
"mhv_ids": [
"14522380"
],
"edipi": "1013590059",
"participant_id": "13367440",
"vha_facility_ids": [
"984",
"992",
"987",
"983",
"200ESR",
"556",
"668",
"200MHS"
],
"birls_id": "796104437"
}
}
}
},
{
"uuid": "76c38ec8bfb447b19dfd0c9808357d46",
"users_b": {
":uuid": "76c38ec8bfb447b19dfd0c9808357d46",
":last_signed_in": {
"^t": "2021-04-05T22:18:26.625Z"
},
":mhv_last_signed_in": null
},
"user_identities": {
":uuid": "76c38ec8bfb447b19dfd0c9808357d46",
":email": "user+2@foo.com",
":first_name": "Abraham",
":middle_name": "Jebediah",
":last_name": "Simpson",
":gender": "M",
":birth_date": "1969-04-06",
":zip": null,
":ssn": "777000001",
":loa": {
":current": 3,
":highest": 3
},
":multifactor": true,
":authn_context": null,
":mhv_icn": null,
":mhv_correlation_id": null,
":sign_in": {
":service_name": "idme"
}
},
"mpi-profile-response": {
":uuid": "76c38ec8bfb447b19dfd0c9808357d46",
":response": {
"^o": "MPI::Responses::FindProfileResponse",
"status": "OK",
"profile": {
"^o": "MPI::Models::MviProfile",
"given_names": [
"Abraham",
"Jebediah"
],
"family_name": "Simpson",
"preferred_names": [
"abe"
],
"suffix": null,
"gender": "M",
"birth_date": "19690406",
"ssn": "777000001",
"address": null,
"home_phone": null,
"icn": "1012592966V272192",
"mhv_ids": [
"14700316"
],
"edipi": "1015218343",
"participant_id": "13397095",
"vha_facility_ids": [
"984",
"200ESR",
"983",
"668",
"556",
"200MHS"
],
"birls_id": "796056674"
}
}
}
}
]
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/certificates/vic-signing-cert.pem
|
-----BEGIN CERTIFICATE-----
MIID1zCCAr+gAwIBAgIJAMluVhY/DohKMA0GCSqGSIb3DQEBCwUAMIGBMQswCQYD
VQQGEwJVUzELMAkGA1UECAwCREMxEzARBgNVBAcMCldhc2hpbmd0b24xGTAXBgNV
BAoMEFZldGVyYW5zIEFmZmFpcnMxETAPBgNVBAsMCFZldHMuZ292MSIwIAYDVQQD
DBl2aWMtc2lnbmluZy1jZXJ0LnZldHMuZ292MB4XDTE3MDkwNjIzMDkyOVoXDTE3
MTAwNjIzMDkyOVowgYExCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJEQzETMBEGA1UE
BwwKV2FzaGluZ3RvbjEZMBcGA1UECgwQVmV0ZXJhbnMgQWZmYWlyczERMA8GA1UE
CwwIVmV0cy5nb3YxIjAgBgNVBAMMGXZpYy1zaWduaW5nLWNlcnQudmV0cy5nb3Yw
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGtzr9AINtGdnakzQtekie
QRzRnWNIBs5ocmZlbMAKgboxpFSyC+R3bPBwV+wN6a0KXkaKjJaBz6NfujOMPFjd
/IojXdsNFO/tqim4iLUG78vUE6P1cp3lalXPwHGsgWTQcaZi9aO1CK+fVVNyzGUl
ixd/+IkB3BhpkbfG4rCnhHZdRONXpQvR6EJ2YNuB2BMjmMwHYR9WJup21w9ZQGZ8
PK2lzXP8TnJyoMlijDKQmGeMYpoUV39KCCGRjvx2Z+N+3wZvdXQMDOKz66QkyZF0
28vXdX998hQDTyBLwKciw1ITmTqCaUFIqFkxG+16Ebt598eBPgzIVJ4Lmngo92b7
AgMBAAGjUDBOMB0GA1UdDgQWBBSLFtImTkoPgNgUiJVk3e+9RxUcLzAfBgNVHSME
GDAWgBSLFtImTkoPgNgUiJVk3e+9RxUcLzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3
DQEBCwUAA4IBAQCLbBOLRnn4I/Gqx8DOB8hqFzG1S51fVhJwfUUZbFjbry0moQ82
sym3kPgvwQwzCFnuiewQgLkP3QgYBjplg8rKgPDu56I02kfyrDXzXVnbLp7Xqn7t
oH+47xOD3oeLb2o4t4/WRM0b0dssOlk8O01ulyNbeFj+FzPYeGw3QoIV9sroQON2
7yRE2szso0jdNOoWKwLwOXgA4MNq01sXk8lWvoVdgBEkiNTiVU5yN8XpH+gUJgMF
L79hRzDun16NTNKjP18dm3mG/LqjrqL6HpEqubc3DzSTU7/mRbGIT7F1CmSFyF/3
9R/m/AjtEP5XqCQvDVcfwyWy7n9en0bXJyur
-----END CERTIFICATE-----
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/certificates/notification-private.pem
|
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEICAmd7vmYVfIbJ1xAucJteHmXOuik/KO8rxs3OaU8p9xoAoGCCqGSM49
AwEHoUQDQgAEpX+wVlFDO4dQVKMwHGNRt9JdwfvncZxc9B6VLibRj+y5IDQMeKz+
fn9NMkMDd0WYj5pmnmk4BS0dLQ7kwuJWDA==
-----END EC PRIVATE KEY-----
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/certificates/lhdd-fake-public.pem
|
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA45Un0tvwjj/3SvDLV5mY
ZifTRnfiH5xoLzsq1ZfxLpegGEVDVslX7p7YScZhIJgFjEQFX321ha1GBJ0Bn841
crGS8S+J3HE6fLrF7itEpC3w/X1bRDiU+AJeRbdQlUoQTamK1mVnsyCr4oLU4QoC
dCZPWU1zaCqQdJDmnh8NmwfirYC8DdtPSJMQLUKS4j4j8h+LK85UxA9H5NVluvvf
zXuymGRegGQOBCa9LAGVBZynjtkp9vjTISLCuZe90oPdqGy5FXX18GvJ6qfM4QYg
aeyBxjbFgLpzSebLP4U5z34WMxVdphq9UaUa743LRflwGmHeBOowzu85bVDHO/ry
TwIDAQAB
-----END PUBLIC KEY-----
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/certificates/ruby-saml.crt
|
-----BEGIN CERTIFICATE-----
MIICGzCCAYQCCQCNNcQXom32VDANBgkqhkiG9w0BAQUFADBSMQswCQYDVQQGEwJV
UzELMAkGA1UECBMCSU4xFTATBgNVBAcTDEluZGlhbmFwb2xpczERMA8GA1UEChMI
T25lTG9naW4xDDAKBgNVBAsTA0VuZzAeFw0xNDA0MjMxODQxMDFaFw0xNTA0MjMx
ODQxMDFaMFIxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJJTjEVMBMGA1UEBxMMSW5k
aWFuYXBvbGlzMREwDwYDVQQKEwhPbmVMb2dpbjEMMAoGA1UECxMDRW5nMIGfMA0G
CSqGSIb3DQEBAQUAA4GNADCBiQKBgQDo6m+QZvYQ/xL0ElLgupK1QDcYL4f5Pckw
sNgS9pUvV7fzTqCHk8ThLxTk42MQ2McJsOeUJVP728KhymjFCqxgP4VuwRk9rpAl
0+mhy6MPdyjyA6G14jrDWS65ysLchK4t/vwpEDz0SQlEoG1kMzllSm7zZS3XregA
7DjNaUYQqwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBALM2vGCiQ/vm+a6v40+VX2zd
qHA2Q/1vF1ibQzJ54MJCOVWvs+vQXfZFhdm0OPM2IrDU7oqvKPqP6xOAeJK6H0yP
7M4YL3fatSvIYmmfyXC9kt3Svz/NyrHzPhUnJ0ye/sUSXxnzQxwcm/9PwAqrQaA3
QpQkH57ybF/OoryPe+2h
-----END CERTIFICATE-----
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/certificates/notification-public.pem
|
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEpX+wVlFDO4dQVKMwHGNRt9Jdwfvn
cZxc9B6VLibRj+y5IDQMeKz+fn9NMkMDd0WYj5pmnmk4BS0dLQ7kwuJWDA==
-----END PUBLIC KEY-----
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/certificates/vic-signing-key.pem
|
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDGtzr9AINtGdna
kzQtekieQRzRnWNIBs5ocmZlbMAKgboxpFSyC+R3bPBwV+wN6a0KXkaKjJaBz6Nf
ujOMPFjd/IojXdsNFO/tqim4iLUG78vUE6P1cp3lalXPwHGsgWTQcaZi9aO1CK+f
VVNyzGUlixd/+IkB3BhpkbfG4rCnhHZdRONXpQvR6EJ2YNuB2BMjmMwHYR9WJup2
1w9ZQGZ8PK2lzXP8TnJyoMlijDKQmGeMYpoUV39KCCGRjvx2Z+N+3wZvdXQMDOKz
66QkyZF028vXdX998hQDTyBLwKciw1ITmTqCaUFIqFkxG+16Ebt598eBPgzIVJ4L
mngo92b7AgMBAAECggEBALfsC6rz+LDYRm0p5hdZoTDobzYMCEI4Gn9NszyY5T5U
R/N+d+27WCC5MempVxChgcmg7IV8Dinj9wC5JNDdYhtEjM6jJgX7pP5Ciw8DaRoc
hHmsHAsnpMEcJIR/SDc0JA1Rw4DAfl8mxPYiUXRlfhC7pmqJrLWN8wJzHrf0RTEl
pNLMmwpS4BFZAPqswyCTHtAqc29dzdJsfqSLqrNGFeLbDltmDsQJYYb2+iGee/uK
taEztjFXm1AhBiMRXTXtGIq8I0oai6eWyRGvPFig8w1a49Dy7vIyJJFGDQ6rwVgi
rhHqzyXZUlRa5rdTcDttC4txl1jYb6exAxDGbV+KqQECgYEA8GLBYJxy4Zz/+Eqv
wYybUWEvG6k3DqKLhJ6IgkzutMSL/VHd64o2Qom2jOy3wYJEK139a+0Sxxpp5m4q
e6F0pncwR4YXSx0qQN7rNaFdCO4G7pXN7vSsreIVP31ykvBN+7wZtKitbX4IMXCJ
9s8VOtxWlW4hOAa0kzwxX9OuiUECgYEA05+RHiwmkMt4IKBnQy1RFbbcTKHr61eA
AvCqY8KnOmDFinGclbsmEMuzCZGBKIQTJt5hKj/Szv57o76JNgHnhUiffBftgqzA
AV7/nOELINJ4LgKMV/P3WjbBgMOH+VseDxLpx3dc73qEfYjnFQRrV6ripFgKdBNF
FvuQ+h+vhTsCgYAzdDAISfSdLknsD7CHMV2dkbvPo+zRCSHsBTMbEPSXZOrCEl/6
Jt9uZqPYjmLW3NdSoQ+5pkk6rQC1/ibBx9F8QE7pQF6ECX4d3JlkJWIQo0KAlzg5
Sc4ceiQqLuPzZ9SJab3m2aQlp7CBRKGDXtggfUFbQvOBVo4YZe37oQffAQKBgEKi
j/NMO6iEKQM8/sbsUgfgWGXY5oxoNOq4FS7sb/O13P3G4GNVVpsbSPjOVDkJvW4T
v8yp5BtBjnT03gefeeNCBtXwQt1Ov/aujxY61mIzY5w5OS/Ipi5F55BAAWTHCCP+
9JXWQ/E0Rtuwa/L2PUaRjGPrRP9fwfWGqRPZPk9ZAoGAf2YydWxnJk3OjzXWZ4l3
8NMt/ryV0iktt3UFBGJVEffqpxSpXp0pFpYdrA4bcP9dSJnJewWHcVHmfyXaCoKR
bNHWNxoZP91Zy2FDPlxlQbUlpfF6gOYGMS2AoWfjlfzBY7jEb0unxy8ECqZLxcCe
ss7ZGQ4KRHjgzI7roGMHhoY=
-----END PRIVATE KEY-----
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/certificates/lhdd-fake-private.pem
|
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEA45Un0tvwjj/3SvDLV5mYZifTRnfiH5xoLzsq1ZfxLpegGEVD
VslX7p7YScZhIJgFjEQFX321ha1GBJ0Bn841crGS8S+J3HE6fLrF7itEpC3w/X1b
RDiU+AJeRbdQlUoQTamK1mVnsyCr4oLU4QoCdCZPWU1zaCqQdJDmnh8NmwfirYC8
DdtPSJMQLUKS4j4j8h+LK85UxA9H5NVluvvfzXuymGRegGQOBCa9LAGVBZynjtkp
9vjTISLCuZe90oPdqGy5FXX18GvJ6qfM4QYgaeyBxjbFgLpzSebLP4U5z34WMxVd
phq9UaUa743LRflwGmHeBOowzu85bVDHO/ryTwIDAQABAoIBAQCEUqAiCMF4ZBbL
2u/QEj07AGLmcSPnz1AATj2cjUitF3n9QqBhoJXg5zjIxHCKu/lV0eLx36ygedvh
KMzd9s66ziaq10IoCym/hfU5gqzZbODW8oETTHbJMM9RZ8GR28tY7IAOIk3GJ/Po
srtF0UUV9YRjXxX/9eeh7vI388Q8Y6OC6DGIGfEtrDRf0AdX/hq5rSGZkekckzis
4oOfsh64nf+jdWFC10b1Ke/eAsdiLRTNzgaKL936J6xT3nZaMJoYlt6Bzldv4ES0
FS72yNyMdLtoeOsLckb5y0mdAwf21M6pkHh2knTXspXXinEHDIlKwJsfjJRYpUln
A7ZcOybZAoGBAPlC3aaJRg8MuNQ2EI0DiM0J3yLkpanKA1cHu1vilbP0SeXsZ3wF
e/+FtaP+1kVW/AYb3xucqY0bK8sCXunzXydBKestNhLSCtJXIZBjTbzHFaavC1pS
YNO5byf3hJgA5ul5LI6e8IMcgcrSA73PH+T69OhXEDMRKb7nORDpVz57AoGBAOm8
QK9pWcPxB0es6lg1gyEDwdb/SIV42F6jvxpnilwe+qrnFqGKLGqcqwQzy7iPvYvY
Cn5OAzHT+Do5GCzgs82e1bSfLr2RmWdJErqGteNEj06cJG2eChAHH7FcWsIHXkR/
7E1RYd9BJbifw7R9pRdwU+vnKRKexN3uoNYiXX09AoGAM7bgv7WJWIP+MOEKrAcI
semTZuzjRgfIi5zqDVVEU/KiBlb23W9R26DFH8I2eGpknWvY7SSitMjnXBYg1Q8O
Ndm6NbXKmzsCzcMQDqHbtgfkARIeG94tgp/dZQBgfRzqy5O9X9Wv9rPKZecOqam4
Z0x91VqC3OV5sMbOOyj+VdMCgYEArBBmefsPFtx3pH8ZoMf7+TDf4JrbU05r0fev
Ngvk4f34QBmQImkqW21rw9MxdHN0cN8gkmxxk5vcj1f6gQcFtifoYGgSq4DkshEs
FV4Xxe9xo8f0VTHTbIsh/JnlQhLUhY66cQypBQXbc/dAxbz87K1HSlFIfimc+Vey
1RBFTG0CgYEAjMdB/c3xhqpPNY407XwJVaGi/FCQA8UgG98ci4TDABVnVkvfjmNG
VPmxKWBTwKcs3kHp9lhm4deLrWtZGybCZeBAUmsk6SNbIvgcdu3ZRpj0N+Z2S+/c
gZqdHvzYywIAYVcCt3TaTfKvLiI193u2Iwue7XKOXiKDA3fBdDUvhzg=
-----END RSA PRIVATE KEY-----
|
0
|
code_files/vets-api-private/spec/support/models
|
code_files/vets-api-private/spec/support/models/shared_examples/submission.rb
|
# frozen_string_literal: true
shared_examples_for 'a Submission model' do
it { is_expected.to validate_presence_of :form_id }
describe 'encrypted attributes' do
it 'responds to encrypted fields' do
subject = described_class.new
expect(subject).to respond_to(:reference_data)
end
end
describe '#latest_attempt' do
it 'returns the last attempt' do
expect(subject.latest_attempt).to be_nil
# subject at this point is an instance of the calling class
submission = subject.class.create(form_id: 'TEST', saved_claim_id: 1)
attempts = []
5.times { attempts << submission.submission_attempts.create }
expect(submission.submission_attempts.length).to eq 5
expect(submission.latest_attempt).to eq attempts.last
end
end
end
|
0
|
code_files/vets-api-private/spec/support/models
|
code_files/vets-api-private/spec/support/models/shared_examples/submission_attempt.rb
|
# frozen_string_literal: true
shared_examples_for 'a SubmissionAttempt model' do
it { is_expected.to validate_presence_of :submission }
describe 'associations' do
it { expect(subject).to belong_to(:submission) }
it { is_expected.to have_one(:saved_claim).through(:submission) }
end
describe 'encrypted attributes' do
it 'responds to encrypted fields' do
subject = described_class.new
expect(subject).to respond_to(:metadata)
expect(subject).to respond_to(:error_message)
expect(subject).to respond_to(:response)
end
end
end
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/benefits_claims/benefits_claims_provider.rb
|
# frozen_string_literal: true
require 'rails_helper'
shared_examples 'benefits claims provider' do
it { is_expected.to respond_to(:get_claims) }
it { is_expected.to respond_to(:get_claim) }
end
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/rswag/text_helpers.rb
|
# frozen_string_literal: true
module Rswag
class TextHelpers
def claims_api_docs
"modules/claims_api/app/swagger/claims_api/v2/#{project_environment}swagger.json"
end
private
def project_environment
environment? ? "#{ENV.fetch('DOCUMENTATION_ENVIRONMENT', nil)}/" : nil
end
def environment?
ENV['DOCUMENTATION_ENVIRONMENT'].present?
end
end
end
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/entitlement.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": ["months", "days"],
"additionalProperties": false,
"properties": {
"months": { "type": "integer" },
"days": { "type": "integer" }
}
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/evss_claims.json
|
{
"$schema" : "http://json-schema.org/draft-04/schema#",
"type" : "object",
"required": ["data"],
"properties": {
"data": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"required": ["id", "type", "attributes"],
"properties": {
"id": { "type": "string"},
"type": { "enum": ["evss_claims"] },
"attributes": {
"type": "object",
"required": [
"evss_id",
"date_filed",
"min_est_date",
"max_est_date",
"open",
"waiver_submitted",
"requested_decision",
"phase_change_date",
"documents_needed",
"development_letter_sent",
"decision_letter_sent",
"updated_at",
"phase",
"ever_phase_back",
"current_phase_back",
"claim_type"
],
"properties": {
"evss_id": { "type": "integer" },
"date_filed": { "type": "string" },
"min_est_date": { "type": ["string", "null"] },
"max_est_date": { "type": ["string", "null"] },
"phase_change_date": { "type": ["string", "null"] },
"open": { "type": "boolean" },
"waiver_submitted": { "type": "boolean" },
"requested_decision": { "type": "boolean" },
"documents_needed": { "type": "boolean" },
"development_letter_sent": { "type": "boolean" },
"decision_letter_sent" : { "type": "boolean" },
"updated_at": { "type": "string" },
"phase": { "type": ["integer", "null"] },
"ever_phase_back": { "type": "boolean" },
"current_phase_back": { "type": "boolean" },
"claim_type": { "type": ["string", "null"] }
}
}
}
}
},
"meta": {
"type": "object",
"required": ["successful_sync"],
"properties": {
"successful_sync": { "type": "boolean" }
}
}
}
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/folder.json
|
{
"$schema" : "http://json-schema.org/draft-04/schema#",
"type": "object",
"oneOf":[{
"required": ["folder_id", "name", "count", "unread_count", "system_folder"],
"properties": {
"folder_id": { "type": "integer" },
"name": { "type": "string" },
"count": { "type": "integer" },
"unread_count": { "type": "integer" },
"system_folder": { "type": "boolean" }
}
},
{
"required": ["data"],
"properties": {
"data": {
"type": "object",
"required": ["id", "type", "attributes", "links"],
"properties": {
"id": { "type": "string" },
"type": { "enum": ["folders"] },
"attributes": {
"type": "object",
"required": ["folder_id", "name", "count", "unread_count", "system_folder"],
"properties": {
"folder_id": { "type": "integer" },
"name": { "type": "string" },
"count": { "type": "integer" },
"unread_count": { "type": "integer" },
"system_folder": { "type": "boolean" }
}
},
"links": {
"type": "object",
"required": ["self"],
"properties": {
"self": { "type": "string" }
}
}
}
}
}
}]
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/suggested_conditions.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {},
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"attributes": {
"properties": {
"code": {
"type": "integer"
},
"medical_term": {
"type": "string"
},
"lay_term": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
},
"type": "object"
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/appeals_issue.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"active": {
"type": "boolean"
},
"description": {
"type": ["string", "null"]
},
"diagnosticCode": {
"type": ["string", "null"]
},
"lastAction": {
"type": {
"enum": [
"field_grant",
"withdrawn",
"allowed",
"denied",
"remand",
"cavc_remand"
]
}
},
"date": {
"type": ["string", "null"]
}
},
"type": "object"
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/extract_statuses.json
|
{
"$schema" : "http://json-schema.org/draft-04/schema#",
"type" : "object",
"required": ["data", "meta"],
"properties": {
"data" : {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"required": ["id", "type", "attributes"],
"properties": {
"id": { "type": "string"},
"type": { "enum": ["extract_statuses"] },
"attributes": {
"type": "object",
"required": ["extract_type", "last_updated", "status", "created_on", "station_number"],
"properties": {
"extract_type": { "type": "string" },
"last_updated": { "type": ["string", null] },
"status": { "type": ["string", null] },
"created_on": { "type": ["integer", null] },
"station_number": { "type": "string" }
}
}
}
}
},
"meta": {
"type": "object",
"required": ["updated_at", "failed_station_list"],
"properties": {
"updated_at": { "type": ["string", null] },
"failed_station_list": { "type": ["string", null] }
}
}
}
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/evss_claims_async.json
|
{
"$schema" : "http://json-schema.org/draft-04/schema#",
"type" : "object",
"required": ["data"],
"properties": {
"data": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"required": ["id", "type", "attributes"],
"properties": {
"id": { "type": "string"},
"type": { "enum": ["evss_claims"] },
"attributes": {
"type": "object",
"required": [
"evss_id",
"date_filed",
"min_est_date",
"max_est_date",
"open",
"waiver_submitted",
"requested_decision",
"phase_change_date",
"documents_needed",
"development_letter_sent",
"decision_letter_sent",
"updated_at",
"phase",
"ever_phase_back",
"current_phase_back",
"claim_type"
],
"properties": {
"evss_id": { "type": "integer" },
"date_filed": { "type": "string" },
"min_est_date": { "type": ["string", "null"] },
"max_est_date": { "type": ["string", "null"] },
"phase_change_date": { "type": ["string", "null"] },
"open": { "type": "boolean" },
"waiver_submitted": { "type": "boolean" },
"requested_decision": { "type": "boolean" },
"documents_needed": { "type": "boolean" },
"development_letter_sent": { "type": "boolean" },
"decision_letter_sent" : { "type": "boolean" },
"updated_at": { "type": "string" },
"phase": { "type": ["integer", "null"] },
"ever_phase_back": { "type": "boolean" },
"current_phase_back": { "type": "boolean" },
"claim_type": { "type": ["string", "null"] }
}
}
}
}
},
"meta": {
"type": "object",
"required": ["sync_status"],
"properties": {
"sync_status": { "enum": ["REQUESTED", "SUCCESS", "FAILED"] }
}
}
}
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/intake_status.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": ["data"],
"properties": {
"data": {
"type": "object",
"required": ["id", "type", "attributes"],
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"required": ["status"],
"properties": {
"status": {
"type": {
"enum": [
"processed",
"attempted",
"submitted",
"canceled",
"not_yet_submitted"
]
}
}
}
}
}
}
}
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/debts.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "",
"type": "object",
"properties": {
"has_dependent_debts": {
"type": "boolean"
},
"debts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fileNumber": {
"type": "string"
},
"payeeNumber": {
"type": "string"
},
"personEntitled": {
"type": ["string", "null"]
},
"deductionCode": {
"type": "string"
},
"benefitType": {
"type": "string"
},
"diaryCode": {
"type": "string"
},
"diaryCodeDescription": {
"type": "string"
},
"amountOverpaid": {
"type": "number"
},
"amountWithheld": {
"type": "number"
},
"originalAR": {
"type": "number"
},
"currentAR": {
"type": "number"
},
"compositeDebtId": {
"type": "string"
},
"debtHistory": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"letterCode": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
},
"fiscalTransactionData": {
"type": "array",
"items": {
"type": "object",
"properties": {
"debtId": {
"type": "integer"
},
"debtIncreaseAmount": {
"type": "number"
},
"hinesCode": {
"type": "string"
},
"offsetAmount": {
"type": "number"
},
"offsetType": {
"type": "string"
},
"paymentType": {
"type": "string"
},
"transactionAdminAmount": {
"type": "number"
},
"transactionCourtAmount": {
"type": "number"
},
"transactionDate": {
"type": "string"
},
"transactionDescription": {
"type": "string"
},
"transactionExplanation": {
"type": "string"
},
"transactionFiscalCode": {
"type": "string"
},
"transactionFiscalSource": {
"type": "string"
},
"transactionFiscalYear": {
"type": "string"
},
"transactionInterestAmount": {
"type": "number"
},
"transactionMarshallAmount": {
"type": "number"
},
"transactionPrincipalAmount": {
"type": "number"
},
"transactionTotalAmount": {
"type": "number"
}
}
}
}
}
}
}
}
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/appeals_alert.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"type": {
"type": {
"enum": [
"form9_needed",
"scheduled_hearing",
"hearing_no_show",
"held_for_evidence",
"cavc_option",
"ramp_eligible",
"ramp_ineligible",
"decision_soon",
"blocked_by_vso",
"scheduled_dro_hearing",
"dro_hearing_no_show"
]
}
},
"details": {
"type": "object",
"additionalProperties": true,
"properties": {
}
}
},
"type": "object"
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/trackings.json
|
{
"$schema" : "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": ["data", "meta"],
"properties": {
"data": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"required": ["id", "type", "attributes", "links"],
"properties": {
"id": { "type": "string" },
"type": { "enum": ["trackings"] },
"attributes": {
"type": "object",
"required": [
"tracking_number",
"prescription_id",
"prescription_number",
"prescription_name",
"facility_name",
"rx_info_phone_number",
"ndc_number",
"shipped_date",
"delivery_service"
],
"properties": {
"tracking_number": { "type": "string" },
"prescription_id": { "type": "integer" },
"prescription_number": { "type": "string" },
"prescription_name": { "type": "string" },
"facility_name": { "type": "string" },
"rx_info_phone_number": { "type": "string" },
"ndc_number": { "type": "string" },
"shipped_date": { "type": "string", "format": "date" },
"delivery_service": { "type": "string" },
"other_prescriptions": {
"type": "array",
"attributes": {
"required": [
"prescription_name",
"prescription_number",
"ndc_number",
"station_number"
],
"properties": {
"prescription_name": { "type": "string" },
"prescription_number": { "type": "string" },
"ndc_number": { "type": "string" },
"station_number": { "type": "string" }
}
}
}
}
},
"links": {
"type": "object",
"required": ["self", "prescription", "tracking_url"],
"properties": {
"self": { "type": "string" },
"prescription": { "type": "string" },
"tracking_url": { "type": "string" }
}
}
}
}
},
"links": {
"type": "object",
"required": ["self", "first", "prev", "next", "last"],
"properties": {
"self": { "type": "string" },
"first": { "type": "string" },
"prev": { "type": ["string", "null"] },
"next": { "type": ["string", "null"] },
"last": { "type": "string" }
}
},
"meta": {
"type": "object",
"required": ["updated_at", "failed_station_list", "sort", "pagination"],
"properties": {
"updated_at": { "type": "string" },
"failed_station_list": { "type": ["string", "null"] },
"sort": {
"type": "object",
"required": ["shipped_date"],
"properties": {
"shipped_date": { "type": "string", "format": "date" }
}
},
"pagination": {
"type": "object",
"required": ["current_page", "per_page", "total_pages", "total_entries"],
"properties": {
"current_page": { "type": "integer" },
"per_page": { "type": "integer" },
"total_pages": { "type": "integer" },
"total_entries": { "type": "integer" }
}
}
}
}
}
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/rated_disability_base.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [
"decision_code",
"decision_text",
"diagnostic_code",
"name",
"effective_date",
"rated_disability_id",
"rating_decision_id",
"rating_percentage",
"related_disability_date",
"special_issues"
],
"properties": {
"decision_code": {
"type": "string"
},
"decision_text": {
"type": "string"
},
"diagnostic_code": {
"type": "integer"
},
"hyphenated_diagnostic_code": {
"type": ["integer", "null"]
},
"name": {
"type": "string"
},
"approximate_date": {
"type": ["string", "null"]
},
"effective_date": {
"type": "datetime"
},
"rated_disability_id": {
"type": "string"
},
"rating_decision_id": {
"type": "string"
},
"rating_percentage": {
"type": "integer"
},
"maximum_rating_percentage": {
"type": ["integer", "null"]
},
"related_disability_date": {
"type": "datetime"
},
"special_issues": {
"type": "array"
}
},
"type": "object"
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/appointments_response.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {},
"properties": {
"data": {
"properties": {
"attributes": {
"properties": {
"appointments": {
"description": "Array of appointments",
"items": {
"type": "object",
"properties": {
"start_time": { "type": ["string", null] },
"assigning_facility": { "type": ["string", null] },
"clinic_code": { "type": ["string", null] },
"clinic_name": { "type": ["string", null] },
"facility_code": { "type": ["string", null] },
"facility_name": { "type": ["string", null] },
"other_information": { "type": ["string", null] },
"status_code": { "type": ["string", null] },
"status_name": { "type": ["string", null] },
"type_code": { "type": ["string", null] },
"type_name": { "type": ["string", null] },
"appointment_status_code": { "type": ["string", null] },
"appointment_status_name": { "type": ["string", null] },
"local_id": { "type": ["string", null] }
}
},
"type": "array"
}
},
"type": "object"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/service_history_response.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {},
"properties": {
"data": {
"properties": {
"attributes": {
"properties": {
"service_history": {
"description": "Array of service history objects",
"items": {
"type": "object"
},
"properties": {
"service_type": {
"type": "string"
},
"branch_of_service": {
"type": "string"
},
"begin_date": {
"type": "string"
},
"end_date": {
"type": "string"
},
"termination_reason_code": {
"type": "string"
},
"termination_reason_text": {
"type": "string"
},
"period_of_service_type_code": {
"type": "string"
},
"period_of_service_type_text": {
"type": "string"
}
},
"type": "array"
},
"vet_status_eligibility": {
"description": "Proof of status card eligibility confirmation and message",
"items": {
"type": "object"
},
"properties": {
"confirmed": {
"type": "boolean"
},
"message" : {
"type": "array"
},
"title" : {
"type": "string"
},
"status": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/post911_gi_bill_status.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": [
"object",
"null"
],
"required": [
"id",
"type",
"attributes"
],
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"required": [
"first_name",
"last_name"
],
"properties": {
"first_name": {
"type": [
"string",
"null"
]
},
"last_name": {
"type": [
"string",
"null"
]
},
"name_suffix": {
"type": [
"string",
"null"
]
},
"date_of_birth": {
"type": [
"string",
"null"
]
},
"va_file_number": {
"type": [
"string",
"null"
]
},
"regional_processing_office": {
"type": [
"string",
"null"
]
},
"eligibility_date": {
"type": [
"string",
"null"
]
},
"delimiting_date": {
"type": [
"string",
"null"
]
},
"percentage_benefit": {
"type": [
"integer",
"null"
]
},
"original_entitlement": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "entitlement.json"
}
]
},
"used_entitlement": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "entitlement.json"
}
]
},
"remaining_entitlement": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "entitlement.json"
}
]
},
"veteran_is_eligible": {
"type": [
"boolean",
"null"
]
},
"active_duty": {
"type": [
"boolean",
"null"
]
},
"enrollments": {
"type": [
"array",
"null"
],
"items": {
"$ref": "enrollment.json"
}
}
}
}
}
}
}
}
|
0
|
code_files/vets-api-private/spec/support
|
code_files/vets-api-private/spec/support/schemas/appeals_event.json
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"type": {
"type": {
"enum": [
"claim_decision",
"nod",
"soc",
"form9",
"ssoc",
"certified",
"hearing_held",
"hearing_no_show",
"bva_decision",
"field_grant",
"withdrawn",
"ftr",
"ramp",
"death",
"merged",
"record_designation",
"reconsideration",
"vacated",
"other_close",
"cavc_decision",
"ramp_notice",
"transcript",
"remand_return",
"dro_hearing_held",
"dro_hearing_cancelled",
"dro_hearing_no_show"
]
}
},
"date": {
"type": "string"
}
},
"type": "object"
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.