{"id":17364320,"url":"https://github.com/arcward/edx12","last_synced_at":"2025-04-23T01:43:35.113Z","repository":{"id":193928534,"uuid":"689741278","full_name":"arcward/edx12","owner":"arcward","description":"Golang X12 parser, validator and transformer","archived":false,"fork":false,"pushed_at":"2023-10-08T21:07:09.000Z","size":283,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T20:51:13.797Z","etag":null,"topics":["270","271","835","edi","eligibility","go","golang","health-insurance","healthcare","insurance","x12","x270"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arcward.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-10T18:56:23.000Z","updated_at":"2025-01-13T16:54:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1384fc6-a406-4a87-8ba0-838903818303","html_url":"https://github.com/arcward/edx12","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"a5cdf282c30162271b884fb89652aa626620e7e2"},"previous_names":["arcward/edx12"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcward%2Fedx12","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcward%2Fedx12/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcward%2Fedx12/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcward%2Fedx12/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arcward","download_url":"https://codeload.github.com/arcward/edx12/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250354290,"owners_count":21416748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["270","271","835","edi","eligibility","go","golang","health-insurance","healthcare","insurance","x12","x270"],"created_at":"2024-10-15T20:03:42.728Z","updated_at":"2025-04-23T01:43:35.096Z","avatar_url":"https://github.com/arcward.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edx12\n\nGolang X12 EDI parser, validator and JSON converter for \nX12 270, 271 and 835... though it will work for most X12 messages in general,\nincluding envelope validation, but without transaction set-specific validation\noutside of those three.\n\n(*warning*: I'm fairly new to Go, so much of this will likely be \nnon-idiomatic and/or inefficient for a while.)\n\n## Installation\n\n```bash\n$ go get github.com/arcward/edx12\n```\n\n## Example\n\nExample message is from: https://x12.org/examples/005010x279/example-1b-response-generic-request-clinic-patients-subscriber-eligibility\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"os\"\n\t\"github.com/arcward/edx12\"\n)\n\nfunc main() {\n\tmessageText := `\n\t\tISA*00*Authorizat*00*Security  *ZZ*Interchange Rec*ZZ*Interchange Sen*141001*1037*\u003e*00501*000031033*0*T*:~\n\t\tGS*HB*Sample Rec*Sample Sen*20141001*1037*123456*X*005010X279A1~\n\t\tST*271*1234*005010X279A1~\n\t\tBHT*0022*11*10001234*20060501*1319~\n\t\tHL*1**20*1~\n\t\tNM1*PR*2*ABC COMPANY*****PI*842610001~\n\t\tHL*2*1*21*1~\n\t\tNM1*1P*2*BONE AND JOINT CLINIC*****SV*2000035~\n\t\tHL*3*2*22*0~\n\t\tTRN*2*93175-012547*9877281234~\n\t\tNM1*IL*1*SMITH*JOHN****MI*123456789~\n\t\tN3*15197 BROADWAY AVENUE*APT 215~\n\t\tN4*KANSAS CITY*MO*64108~\n\t\tDMG*D8*19630519*M~\n\t\tDTP*346*D8*20060101~\n\t\tEB*1**30**GOLD 123 PLAN~\n\t\tEB*L~\n\t\tEB*1**1\u003e33\u003e35\u003e47\u003e86\u003e88\u003e98\u003eAL\u003eMH\u003eUC~\n\t\tEB*B**1\u003e33\u003e35\u003e47\u003e86\u003e88\u003e98\u003eAL\u003eMH\u003eUC*HM*GOLD 123 PLAN*27*10*****Y~\n\t\tEB*B**1\u003e33\u003e35\u003e47\u003e86\u003e88\u003e98\u003eAL\u003eMH\u003eUC*HM*GOLD 123 PLAN*27*30*****N~\n\t\tLS*2120~\n\t\tNM1*P3*1*JONES*MARCUS****SV*0202034~\n\t\tLE*2120~\n\t\tSE*22*1234~\n\t\tGE*1*123456~\n\t\tIEA*1*000031033~`\n\t\n\trawMessage, _ := edx12.Read([]byte(messageText))\n\tmessage, _ := rawMessage.Message(context.Background())\n\t\n\tencoder := json.NewEncoder(os.Stdout)\n\tencoder.SetEscapeHTML(false)  // avoid '\u003e' being escaped to '\\u003e'\n\tencoder.SetIndent(\"\", \"  \")\n\t_ = encoder.Encode(message)\n}\n```\n\nOutput:\n\n```json\n{\n  \"functionalGroups\": [\n    {\n      \"header\": {\n        \"applicationReceiverCode\": \"Sample Sen\",\n        \"applicationSenderCode\": \"Sample Rec\",\n        \"controlNumber\": 123456,\n        \"date\": \"2014-10-01T00:00:00Z\",\n        \"functionalIdentifierCode\": \"HB\",\n        \"responsibleAgencyCode\": \"X\",\n        \"time\": \"0000-01-01T10:37:00Z\",\n        \"versionCode\": \"005010X279A1\"\n      },\n      \"trailer\": {\n        \"controlNumber\": 123456,\n        \"transactionSetCount\": 1\n      },\n      \"transactionSets\": [\n        {\n          \"beginningOfHierarchicalTransaction\": {\n            \"Date\": \"2006-05-01T00:00:00Z\",\n            \"Time\": \"0000-01-01T13:19:00Z\",\n            \"hierarchicalStructureCode\": \"0022\",\n            \"referenceIdentification\": \"10001234\",\n            \"transactionSetPurposeCode\": \"11\"\n          },\n          \"header\": {\n            \"controlNumber\": \"1234\",\n            \"transactionSetCode\": \"271\",\n            \"versionCode\": \"005010X279A1\"\n          },\n          \"informationSourceLevel\": {\n            \"informationReceiverLevel\": {\n              \"informationReceiverLevel\": {\n                \"hierarchicalChildCode\": \"1\",\n                \"hierarchicalIdNumber\": \"2\",\n                \"hierarchicalLevelCode\": \"21\",\n                \"hierarchicalParentIdNumber\": \"1\"\n              },\n              \"informationReceiverName\": {\n                \"informationReceiverAdditionalIdentification\": [],\n                \"informationReceiverAddress\": {},\n                \"informationReceiverCityStateZipCode\": {},\n                \"informationReceiverName\": {\n                  \"entityIdentifierCode\": \"1P\",\n                  \"entityTypeQualifier\": \"2\",\n                  \"identificationCode\": \"2000035\",\n                  \"identificationCodeQualifier\": \"SV\",\n                  \"nameFirst\": \"\",\n                  \"nameLastOrOrganizationName\": \"BONE AND JOINT CLINIC\",\n                  \"nameMiddle\": \"\",\n                  \"nameSuffix\": \"\"\n                },\n                \"informationReceiverProviderInfo\": {},\n                \"informationReceiverRequestValidation\": []\n              },\n              \"subscriberLevel\": {\n                \"dependentLevel\": {},\n                \"subscriberLevel\": {\n                  \"hierarchicalChildCode\": \"0\",\n                  \"hierarchicalIdNumber\": \"3\",\n                  \"hierarchicalLevelCode\": \"22\",\n                  \"hierarchicalParentIdNumber\": \"2\"\n                },\n                \"subscriberName\": {\n                  \"providerInfo\": {},\n                  \"subscriberAdditionalIdentification\": [],\n                  \"subscriberAddress\": {\n                    \"addressInfo00\": \"15197 BROADWAY AVENUE\",\n                    \"addressInfo01\": \"APT 215\"\n                  },\n                  \"subscriberCityStateZipCode\": {\n                    \"cityName\": \"KANSAS CITY\",\n                    \"countryCode\": \"\",\n                    \"countrySubdivisionCode\": \"\",\n                    \"postalCode\": \"64108\",\n                    \"stateOrProvinceCode\": \"MO\"\n                  },\n                  \"subscriberDate\": [\n                    {\n                      \"dateTimePeriod\": \"20060101\",\n                      \"dateTimePeriodFormatQualifier\": \"D8\",\n\n                      \"dateTimeQualifier\": \"346\"\n                    }\n                  ],\n                  \"subscriberDemographicInfo\": {\n                    \"dateTimePeriod\": \"19630519\",\n                    \"dateTimePeriodFormatQualifier\": \"D8\",\n                    \"genderCode\": \"M\"\n                  },\n                  \"subscriberEligibilityOrBenefitInfo\": {\n                    \"healthCareServicesDelivery\": [],\n                    \"loopHeader\": {\n                      \"loopIdentifierCode\": \"2120\"\n                    },\n                    \"messageText\": [],\n                    \"subscriberAdditionalIdentification\": [],\n                    \"subscriberBenefitRelatedEntityName\": [\n                      {\n                        \"loopTrailer\": {\n                          \"loopIdentifierCode\": \"2120\"\n                        },\n                        \"subscriberBenefitRelatedEntityAddress\": {},\n                        \"subscriberBenefitRelatedEntityCityStateZipCode\": {},\n                        \"subscriberBenefitRelatedEntityContactInfo\": [],\n                        \"subscriberBenefitRelatedEntityName\": {\n                          \"entityIdentifierCode\": \"P3\",\n                          \"entityRelationshipCode\": \"\",\n                          \"entityTypeQualifier\": \"1\",\n                          \"identificationCode\": \"0202034\",\n                          \"identificationCodeQualifier\": \"SV\",\n                          \"nameFirst\": \"MARCUS\",\n                          \"nameLastOrOrganizationName\": \"JONES\",\n                          \"nameMiddle\": \"\",\n                          \"nameSuffix\": \"\"\n                        },\n                        \"subscriberBenefitRelatedProviderInfo\": {}\n                      }\n                    ],\n                    \"subscriberEligibilityBenefitDate\": [],\n                    \"subscriberEligibilityOrBenefitAdditionalInfo\": [],\n                    \"subscriberEligibilityOrBenefitInfo\": {\n                      \"compositeDiagnosisCodePointer\": {},\n                      \"compositeMedicalProcedureIdentifier\": {},\n                      \"coverageLevelCode\": \"\",\n                      \"eligibilityOrBenefitInfoCode\": \"B\",\n                      \"insuranceTypeCode\": \"HM\",\n                      \"monetaryAmount\": 30,\n                      \"percentageAsDecimal\": null,\n                      \"planCoverageDescription\": \"GOLD 123 PLAN\",\n                      \"quantity\": null,\n                      \"quantityQualifier\": \"\",\n                      \"serviceTypeCode\": [\n                        \"1\",\n                        \"33\",\n                        \"35\",\n                        \"47\",\n                        \"86\",\n                        \"88\",\n                        \"98\",\n                        \"AL\",\n                        \"MH\",\n                        \"UC\"\n                      ],\n                      \"timePeriodQualifier\": \"27\",\n                      \"yesNoConditionOrResponseCode00\": \"\",\n                      \"yesNoConditionOrResponseCode01\": \"N\"\n                    },\n                    \"subscriberRequestValidation\": []\n                  },\n                  \"subscriberHealthCareDiagnosisCode\": {},\n                  \"subscriberMilitaryPersonnelInfo\": {},\n                  \"subscriberName\": {\n                    \"entityIdentifierCode\": \"IL\",\n                    \"entityTypeQualifier\": \"1\",\n                    \"identificationCode\": \"123456789\",\n                    \"identificationCodeQualifier\": \"MI\",\n                    \"nameFirst\": \"JOHN\",\n                    \"nameLastOrOrganizationName\": \"SMITH\",\n                    \"nameMiddle\": \"\",\n                    \"nameSuffix\": \"\"\n                  },\n                  \"subscriberRelationship\": {},\n                  \"subscriberRequestValidation\": []\n                },\n                \"subscriberTraceNumber\": [\n                  {\n                    \"originatingCompanyIdentifier\": \"9877281234\",\n                    \"referenceIdentification00\": \"93175-012547\",\n                    \"referenceIdentification01\": \"\",\n                    \"traceTypeCode\": \"2\"\n                  }\n                ]\n              }\n            },\n            \"informationSourceLevel\": {\n              \"hierarchicalChildCode\": \"1\",\n              \"hierarchicalIdNumber\": \"1\",\n              \"hierarchicalLevelCode\": \"20\"\n            },\n            \"informationSourceName\": {\n              \"informationSourceContactInfo\": [],\n              \"informationSourceName\": {\n                \"entityIdentifierCode\": \"PR\",\n                \"entityTypeQualifier\": \"2\",\n                \"identificationCode\": \"842610001\",\n                \"identificationCodeQualifier\": \"PI\",\n                \"nameFirst\": \"\",\n                \"nameLastOrOrganizationName\": \"ABC COMPANY\",\n\n                \"nameMiddle\": \"\",\n                \"nameSuffix\": \"\"\n              },\n              \"requestValidation\": []\n            },\n            \"requestValidation\": []\n          },\n          \"trailer\": {\n            \"controlNumber\": \"1234\",\n            \"segmentCount\": 22\n          }\n        }\n      ]\n    }\n  ],\n  \"header\": {\n    \"acknowledgmentRequested\": \"0\",\n    \"authorizationInformation\": \"Authorizat\",\n    \"authorizationQualifier\": \"00\",\n    \"componentElementSeparator\": \":\",\n    \"controlNumber\": 31033,\n    \"controlVersionNumber\": \"00501\",\n    \"date\": \"2014-10-01T00:00:00Z\",\n    \"receiverId\": \"Interchange Sen\",\n    \"receiverIdQualifier\": \"ZZ\",\n    \"repetitionSeparator\": \"\u003e\",\n    \"securityInformation\": \"Security  \",\n    \"securityInformationQualifier\": \"00\",\n    \"senderId\": \"Interchange Rec\",\n    \"senderIdQualifier\": \"ZZ\",\n    \"time\": \"0000-01-01T10:37:00Z\",\n    \"usageIndicator\": \"T\"\n  },\n  \"trailer\": {\n    \"controlNumber\": 31033,\n    \"functionalGroupCount\": 1\n  }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcward%2Fedx12","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcward%2Fedx12","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcward%2Fedx12/lists"}