How to add special service for passenger? - sabre

I using SpecialServiceLLSRQ to add special service for passenger, but the response Sabre return errors, i dont understand what mean's of response ?
This is my request:
<SpecialServiceRQ Version="2.3.0" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:ns2="http://services.sabre.com/STL/v01" ReturnHostCommand="true">
<SpecialServiceInfo>
<Service SSR_Code="SPML" SegmentNumber="1">
<PersonName NameNumber="1.1" />
<Text>TEST</Text>
</Service>
</SpecialServiceInfo>
</SpecialServiceRQ>
This is the response:
<SpecialServiceRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01" Version="2.3.0">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="BusinessLogic" timeStamp="2019-03-06T04:06:21-06:00">
<stl:SystemSpecificResults>
<stl:HostCommand LNIATA="623814">3SPML1/TEST-1.1</stl:HostCommand>
<stl:Message>.USE 4 ENTRY.NOT ENT BGNG WITH</stl:Message>
<stl:Message>3SPML1/TEST-1.1</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</SpecialServiceRS>
How can i fix this issue? Thanks !

Just to contextualize, SPML it is the acronym for Special Meals. try to use a code to specify what kind of food you would like. Ex.: VGML - Vegetarian Lacto-ovo Meal
Note: for VVML - Vegetarian Vegan Meal (some airlines require VGML). You have to consider this kind of limitation.
To add a SSR you have to Retrieve the reservation (TravelItineraryReadRQ), add the SSR (PassengerDetailsRQ) and Save the information(PassengerDetailsRQ)
I'm abstracting the factor of open/close sessions, I'm presume you have a valid token
properly inserted into header for each request.
To retrieve the reservation (TravelItineraryReadRQ):
<v3:TravelItineraryReadRQ TimeStamp="${P-S#Timestamp}" Version="3.8.0">
<v3:MessagingDetails>
<v3:SubjectAreas>
<v3:SubjectArea>FULL</v3:SubjectArea>
</v3:SubjectAreas>
</v3:MessagingDetails>
<v3:UniqueID ID="YOUR PNR CODE"/>
</v3:TravelItineraryReadRQ>
To add SSR - (PassengerDetailsRQ):
<v3:PassengerDetailsRQ version="3.3.0" HaltOnError="true" IgnoreOnError="false">
<v3:SpecialReqDetails>
<!--Optional:-->
<v3:SpecialServiceRQ>
<v3:SpecialServiceInfo>
<!--Mandatory-->
<!--Repeat Factor=1-99-->
<v3:Service SegmentNumber="1" SSR_Code="VGML">
<v3:PersonName NameNumber="1.1"/>
<v3:VendorPrefs>
<v3:Airline Hosted="true"/>
</v3:VendorPrefs>
</v3:Service>
</v3:SpecialServiceInfo>
</v3:SpecialServiceRQ>
</v3:SpecialReqDetails>
</v3:PassengerDetailsRQ>
To save the information added (ER) - (PassengerDetailsRQ):
<v3:PassengerDetailsRQ version="3.3.0" HaltOnError="true" IgnoreOnError="false">
<v3:PostProcessing IgnoreAfter="false" RedisplayReservation="true">
<v3:EndTransactionRQ>
<v3:EndTransaction Ind="true">
<v3:Email Ind="true"/>
</v3:EndTransaction>
<v3:Source ReceivedFrom="APPNAME/USERNAME"/>
</v3:EndTransactionRQ>
</v3:PostProcessing>
</v3:PassengerDetailsRQ>
xmlns:v3="http://services.sabre.com/sp/pd/v3_3"
IATA meal codes
ALML - Allergen Meal
AVML - Asian Vegetarian Meal
BBML - Baby Meal
CAKE - Birthday Cake (on SAS)
BLML - Bland Meal
CHML - Children Meal
CLML - Celebration Cake Meal
DBML - Diabetic Meal
FPML - Fruit Platter Meal
GFML - Gluten Intolerant Meal
HFML - High Fibre Meal
HNML - Hindu Non-Vegetarian Meal
OBML - Japanese Obento Meal (on United Airlines)
JPML - Japanese Meal (on Japan Airlines)
JNML - Junior Meal
KSML - Kosher Meal
KSMLS - Kosher Meal (Snack)
LCML - Low Calorie Meal
LFML - Low Fat Meal
NBML - No Beef Meal (on China Airlines)
NFML - No Fish Meal (on Lufthansa)
NLML - No Lactose Meal
LPML - Low Protein Meal
PRML - Low Purin Meal
LSML - Low Salt Meal
MOML - Muslim Meal
ORML - Oriental Meal
PFML - Peanut Free Meal
RFML - Refugee Meal (on United Airlines)
SFML - Seafood Meal
SPML - Special Meal, Specify Food
VJML - Vegetarian Jain Meal
VLML - Vegetarian Lacto-ovo Meal
VOML - Vegetarian Oriental Meal
RVML - Vegetarian Raw Meal
VVML - Vegetarian Vegan Meal (some airlines require VGML)
Important note: When you add text to further define a generic SSR code such as OTHS, or SPML, use plain text. You can use a space between the words. Avoid special characters because the system returns the error message: INVALID FREE TEXT CHARACTERS. MODIFY AND RE-ENTER.NOT ENT BGNG WITH

Related

How to reverse check the parent in a dictionary YAML

I have a dictionary that is the exact same structure as below.
Where I am struggling is in Ansible code, how would I go about a user enters apple, and I identify the type is fruit?
When a user enters spinach, Ansible identifies it as veggie?
Basically, how do I reverse check the parent in a dictionary? EDIT: after using selectattr, how do i assign that to one variable to use in the future ? currently, i get food_groups | selectattr('names', 'contains', food) | first).type: fruit as output, how do i only get FRUIT assigned to a variable?
groups:
- type: fruit
names:
- apple
- oranges
- grapes
- type: veggie
names:
- broccoli
- spinach
You can use selectattr and the contains test of Ansible for this.
Important note: do not name your dictionary groups, as you risk a collision with the special variable of the same name. Here, I named it food_groups.
So, the task of giving the type of food is as simple as:
- debug:
var: (food_groups | selectattr('names', 'contains', food) | first).type
given that the food you want to assert is in a variable name food
Given the playbook:
- hosts: localhost
gather_facts: no
vars_prompt:
- name: food
prompt: What food to you want to know the group?
private: no
tasks:
- debug:
var: (food_groups | selectattr('names', 'contains', food) | first).type
vars:
food_groups:
- type: fruit
names:
- apple
- oranges
- grapes
- type: veggie
names:
- broccoli
- spinach
This yields:
What food to you want to know the group?: grapes
PLAY [localhost] *******************************************************************
TASK [debug] ***********************************************************************
ok: [localhost] =>
(food_groups | selectattr('names', 'contains', food) | first).type: fruit
Q: "How would I go about a user entering 'apple', and I identify the type is 'fruit'?"
A: Create a dictionary mapping the items to groups, e.g. given the data
my_groups:
- type: fruit
names:
- apple
- oranges
- grapes
- tomato
- type: veggie
names:
- broccoli
- spinach
- tomato
The task below
- set_fact:
my_dict: "{{ my_dict|d({'undef': 'undef'})|
combine({item.1: [item.0.type]}, list_merge='append') }}"
with_subelements:
- "{{ my_groups }}"
- names
gives
my_dict:
apple: [fruit]
broccoli: [veggie]
grapes: [fruit]
oranges: [fruit]
spinach: [veggie]
tomato: [fruit, veggie]
undef: undef
I added 'tomato' to both groups to test the membership in multiple groups. The identification of the item's groups is now trivial, e.g.
- debug:
msg: "{{ my_item|d('undef') }} is {{ my_dict[my_item|d('undef')]|d('none') }}"
gives by default
msg: undef is undef
When you enter an item not present in the dictionary you get
shell> ansible-playbook playbook.yml -e my_item=foo
...
msg: foo is none
and when you enter an item present in the dictionary you get the group(s)
shell> ansible-playbook playbook.yml -e my_item=spinach
...
msg: spinach is ['veggie']

What is the dish shown below tracking?

<?xml version="1.0" encoding="UTF-8"?><dsn>
<station
name="gdscc"
friendlyName="Goldstone"
timeUTC="1415478847476"
timeZoneOffset="-28800000" />
<dish
name="DSS25"
azimuthAngle="187.97"
elevationAngle="37.30"
windSpeed="9.27"
isMSPA="false"
isArray="false"
isDDOR="false"
created="2014-11-08T17:50:08.220Z"
updated="2014-11-08T17:50:44.263Z">
<downSignal
signalType="data"
signalTypeDebug="IN LOCK OFF 1 MCD3"
dataRate="22119.933594"
frequency="8429852703.323329"
power="-153.442429"
spacecraft="CAS"
spacecraftId="82"/>
<upSignal
signalType="none"
signalTypeDebug="OFF 0 "
power="0.000000"
frequency="7152"
dataRate=""
spacecraft="CAS"
spacecraftId="82"/>
<target name="CAS" id="82" uplegRange="1.634442012999E9" downlegRange="1.634454516607E9" rtlt="10903.761527"/>
</dish>
so what is DSS25 tracking??
I have this information from wire shark and am confused on what exactly it's "tracking."
I just have to answer some questions on the specific parts such as the windspeed but in all what is this specific dish tracking?
It's tracking spacecraft n. -82, which is Cassini, all official NASA codes are here:
https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1&COMMAND=%27*%27

Documenting/Documentation for Traffic Flow data

I've found bits and pieces of documentation for traffic flow data, but I haven't stumbled on a comprehensive document that includes all of the elements and attributes. Does such a document exist? If not can you help clarify the definition of some of the attributes and elements below?
<RW LI="114+01594" DE="12th Ave" PBT="2019-06-13T16:35:58Z" mid="61fc647b-9e52-41d0-9e18-435ec64b2f8f">
<FIS>
<FI><TMC PC="11761" DE="SE Milwaukie Ave/SE Gideon St" QD="-" LE="0.02134"/><CF CN="0.83" FF="13.67" JF="2.00696" SP="8.51" SU="8.51" TY="TR"/></FI>
<FI><TMC PC="11762" DE="SE Morrison St" QD="-" LE="0.98349"/>
<CF CN="0.83" FF="21.62" JF="3.41486" SP="10.9" SU="10.9" TY="TR">
<SSS><SS FF="22.56" JF="2.28167" LE="0.68918" SP="16.38" SU="16.38"/><SS FF="19.68" JF="6.46892" LE="0.2943" SP="8.41" SU="8.41"/></SSS>
</CF>
</FI>
<FI><TMC PC="15730" DE="SE Sandy Blvd" QD="-" LE="0.38267"/><CF CN="0.72" FF="21.81" JF="3.64183" SP="10.41" SU="10.41" TY="TR"/></FI>
<FI><TMC PC="11763" DE="I-84/US-30/Irving St/NE Lloyd Blvd" QD="-" LE="0.4496"/>
<CF CN="0.79" FF="23.8" JF="3.21584" SP="12.75" SU="12.75" TY="TR">
<SSS><SS FF="24.38" JF="3.14159" LE="0.16714" SP="12.11" SU="12.11"/><SS FF="23.44" JF="2.41069" LE="0.28245" SP="16.66" SU="16.66"/></SSS>
</CF>
</FI>
</FIS>
</RW>
RW - Roadway
RW#LI - ?
RW#DE - Looks like the roadway name, but not sure what "DE" translates too.
RW#PBT - The timestamp the resource was requested/computed?
RW#mid - A unique id for the roadway?
FIS - Flow items
FI - Flow item
TMC - Some sort of region?
TMC#PC - ?
TMC#DE - Same as RW#DE, but for a segment of the RW?
TMC#QD - Queue direction +/-
TMC#LE - ?
CF - Current flow
CF#CN - Confidence attribute per this doc
CF#FF - ?
CF#JF - Jam factor
CF#SP - Documented here
CF#SU - Documented here
CF#TY - ?
SSS - Street segments?
SS - Street segment?
SS#FF - ?
SS#JF - Jam factor
SS#LE - ?
SS#SP - Same as Documented here
SS#SU - Same as Documented here
please see meta resources document page.
https://developer.here.com/documentation/traffic/topics/additional-parameters.html
you can request the definition of acronyms based on traffic or incidents api version.
Fro example below request will return a flow xsd.
https://traffic.api.here.com/traffic/6.0/xsd/flow.xsd
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
Happy coding!

sample credit card number on my Sandbox Account on Vault getting below error

When i am trying to add sample credit card number on my Sandbox Account on Vault getting below error.
here is request JSON
{
"number": "4769424246660779",
"type": "visa",
"expire_month": 11,
"expire_year": 2018,
"cvv2": "0123"
}
Response code: 400 Error response: {"name":"VALIDATION_ERROR","debug_id":"c7f1d5bd16eef","message":"Invalid request - see details","information_link":"https://developer.paypal.com/docs/api/#VALIDATION_ERROR","details":[{"field":"number","issue":"Value is invalid"}]}
{"name":"VALIDATION_ERROR","debug_id":"c7f1d5bd16eef","message":"Invalid request - see details","information_link":"https://developer.paypal.com/docs/api/#VALIDATION_ERROR","details":[{"field":"number","issue":"Value is invalid"}]}
Credit card numbers have an algorithm called Luhn Algorithm and your sample card number does not match with this calculation.
You may also check it online. http://www.freeformatter.com/credit-card-number-generator-validator.html
Here are some sample credit card numbers can be used for testing:
Visa: 4111111111111111
Visa: 4012888888881881
Visa: 4222222222222
JCB: 3530111333300000
JCB: 3566002020360505
JCB: 3088000000000009
MasterCard: 5555555555554444
MasterCard: 5105105105105100
MasterCard: 5500000000000004
American Express: 378282246310005
American Express: 371449635398431
American Express: 340000000000009
American Express Corporate: 378734493671000
Australian BankCard: 5610591081018250
Diners Club: 30569309025904
Diners Club: 38520000023237
Diners Club: 30000000000004
Discover: 6011111111111117
Discover: 6011000990139424
Discover: 6011000000000004
Carte Blanche: 30000000000004

HL7 Data Type Error

I have an ORU R01 version 2.4 message that I'm trying to get through, but for some reason, it keeps giving me a data type error on the receive side. Below is the message:
MSH|^~\&|HMED|DMC|||20110527104101||ORU^R01|M-TEST05|P|2.4|
PID|1|333333333|000009999999||MTEST^MALEPAT5^L^""|""|19900515|M|""|2||||||S|PRO|9999999995|333333333|""||
PV1|1|E|ED^OFF UNIT^OFFUNIT^02|1|||070706^TestDoc^Edward^S^""^""||||||||||||9999999995||||||||||||||||||||DMC|||||20110526231400|20110701014900||||||||
ORC|RE|339999-333333333-1-77777|339999-333333333-1-77777||||||||||
OBR|1|339999-333333333-1-77777|339999-333333333-1-77777|ED HP|||20110527003054|||||||||||||77777^MedVa Chart|77777-RES333333333-339999-1-9999999995|
OBX|1|FT|ED HP||~Depaul Medical Center - Norfolk, VA 23505~~Patient: MALEPAT5 L MEDVATEST DOB: 5/15/1990~~MR #: 333333333 Age/Gender: 21y M~~DOS: 5/26/2011 23:14 Acct #: 9999999995~~Private Phys: Patient denies having a primary ED Phys: Edward S. TestDoc, NP-C~ care physician.~~CHIEF COMPLAINT: Enc. Type: ACUITY:~~Sore throat Initial 4_Level 4~~HISTORY OF PRESENT ILLNESS ~Note~~Medical screening exam initiated: May 26, 2011 00:36~~HPI text: 21 year old male to the emergency room with a c/o sore throat pain~for the past week. Pt denies cough, N\T\V, diarrhea, and fever.~~Approximate time of injury/onset of symptoms 1 week(s) ago~~Medical and surgical history obtained.~~PAST HISTORY ~Past Medical/Surgical History~~ The history is provided by the patient~~ The patient's pertinent past medical history is as follows: Obesity~~ The patient's pertinent past surgical history is as follows: None~~ Patient allergies: No known allergies.~~ Home medications: Ibuprofen PO~~ The medication history was obtained from: verbally from the patient~~At the time of this signature, I have reviewed and agree with documented Past~History, Home Medications, Allergies, Social History and Family History.~~Past Social History~~Patient does not use tobacco.~~Patient does not use alcohol.~~Patient does not use drugs.~~EXAM ~CONSTITUTIONAL: Alert, in no apparent distress; well-developed;~well-nourished.~HEAD: Normocephalic, atraumatic~EYES: PERRL; EOM's intact.~ENTM: Nose: no rhinorrhea; Throat: no erythema or exudate, mucous membranes~moist. The bilateral tonsils are edematous and the uvula is mildly enlarged.~No exudates are noted. the tonsils do not touch.~Neck: No JVD, supple without lymphadenopathy~RESP: Chest clear, equal breath sounds.~CV: S1 and S2 WNL; No murmurs, gallops or rubs.~GI: Normal bowel sounds, abdomen soft and non-tender. No masses or~organomegaly.~GU: No costo-vertebral angle tenderness.~BACK: Non-tender~UPPER EXT: Normal inspection~LOWER EXT: No edema, no calf tenderness. Distal pulses intact.~NEURO: CN intact, reflexes 2/4 and sym, strength 5/5 and sym, sensation~intact.~SKIN: No rashes; Normal for age and stage.~PSYCH: Alert and oriented, normal affect.~~Printed By User N. Interface on 5/27/2011 12:30 AM~~Discharge Summary~~||||||S|
And here are the error messages I'm getting:
Error happened in body during parsing
Error # 1
Segment Id: PV1_PatientVisit
Sequence Number: 1
Field Number: 52
Error Number: 102
Error Description: Data type error
Encoding System: HL7nnnn 
Error # 2
Segment Id: OBR_ObservationRequest
Sequence Number: 1
Field Number: 20
Error Number: 102
Error Description: Data type error
Encoding System: HL7nnnn
I have ensured that my party is set up properly and that Validate Body Segments is unchecked and Allow Trailing delimiters is checked.
This has been resolved. I ended up having to customize the segment and data type schemas in order to resolve the two errors above. The segment schema needed to be altered to add another field at the end of the PV1 segment in order to accept the last field. The OBR20 needed to reference a custom data type that took in two strings in order to process properly

Resources