Skip to content

Commit

Permalink
fixed sevice date
Browse files Browse the repository at this point in the history
  • Loading branch information
Jmainguy committed Oct 11, 2018
1 parent 1d5d74e commit e0d9995
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM centos:latest
ADD Sohre.repo /etc/yum.repos.d/
RUN yum install -y patient_csv_to_xml-0.5-1.el7.x86_64 && \
RUN yum install -y patient_csv_to_xml-0.5-2.x86_64 && \
yum clean all
RUN chgrp -R 0 /opt/patient_csv_to_xml \
&& chmod -R g+rwX /opt/patient_csv_to_xml
Expand Down
4 changes: 2 additions & 2 deletions addPatients.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ func addPatient(v *Import, line []string, patClass string){
fullPatBirthDate = formatBirthDate(line[10],line[11],line[12])
}
if line[106] != "" {
fullSrvFromDate = formatBirthDate(line[106],line[107],line[108])
fullSrvFromDate = formatDate(line[106],line[107],line[108])
}
if line[109] != "" {
fullSrvToDate = formatBirthDate(line[109],line[110],line[111])
fullSrvToDate = formatDate(line[109],line[110],line[111])
}
if line[37] != "" {
fullInsBirthDate = formatBirthDate(line[37],line[38],line[39])
Expand Down
8 changes: 5 additions & 3 deletions funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ func formatBirthDate(month, day, year string) (birthday string) {
return
}

func formatDate(month, day, year string) (date string) {
date = fmt.Sprintf("%s%s/20%s", rm_lead_space(month), rm_lead_space(day), rm_lead_space(year))
return
}

func formatPhoneNumber(areacode, number string) (phonenumber string) {
lastFour := number[3:len(number)]
firstThree := number[0:3]
phonenumber = fmt.Sprintf("%s-%s-%s", areacode, firstThree, lastFour)
return
}

//func addPayer(v *Import, line []string){
//}
5 changes: 4 additions & 1 deletion patient_csv_to_xml.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%define debug_package %{nil}
Name: patient_csv_to_xml
Version: 0.5
Release: 1%{?dist}
Release: 2
Summary: A golang http server to convert generations csv to ez claim xml

License: GPLv2
Expand Down Expand Up @@ -38,6 +38,9 @@ exit 0
chown -R patient_csv_to_xml:patient_csv_to_xml /opt/patient_csv_to_xml

%changelog
* Thu Oct 11 2018 Jonathan Mainguy <jon@soh.re> - 0.5-2
- fixed service dates

* Thu Oct 11 2018 Jonathan Mainguy <jon@soh.re> - 0.5-1
- moved price around, fixed birthdate

Expand Down

0 comments on commit e0d9995

Please sign in to comment.